订单信息模块前后台代码Word下载.doc
- 文档编号:3990385
- 上传时间:2023-05-02
- 格式:DOC
- 页数:24
- 大小:158KB
订单信息模块前后台代码Word下载.doc
《订单信息模块前后台代码Word下载.doc》由会员分享,可在线阅读,更多相关《订单信息模块前后台代码Word下载.doc(24页珍藏版)》请在冰点文库上搜索。
1.1Express.asp订单录入模块
usingSystem;
usingSystem.Collections.Generic;
usingSystem.Web;
usingSystem.Web.UI;
usingSystem.Web.UI.WebControls;
usingSystem.Data.SqlClient;
usingSystem.Net;
publicpartialclassExpress:
AdminPage
{
Adinet_ExpressListServiceass=newAdinet_ExpressListService();
protectedvoidPage_Load(objectsender,EventArgse)
{
SqlConnectionscn=newSqlConnection(@"
DataSource=(local);
InitialCatalog=EXPRESS;
IntegratedSecurity=True"
);
//连接数据库
scn.Open();
IPHostEntryIpEntry=Dns.GetHostEntry(Dns.GetHostName());
//获取IP地址
stringmyip=IpEntry.AddressList[5].ToString();
//获取IP地址
System.DateTimetime=newSystem.DateTime();
//获取服务器系统时间
time=System.DateTime.Now;
stringczlx="
录入操作"
;
stringczxx=rename.Value+retel.Value+sendName.Value+sendAdd.Value+sendTel.Value+sendDate.Value;
//输入信息记录
Stringocmd1="
insertintohjbl(czip,czsj,czlx,czxx)values('
"
+myip+"
'
'
+time+"
+czlx+"
+czxx+"
)"
//存储至数据库
SqlCommandcom=newSqlCommand(ocmd1,scn);
com.ExecuteNonQuery();
scn.Close();
if(!
IsPostBack)
{
intn=65;
//定义n
System.Randomrandom=newRandom();
//定义随机数
num.Value=Convert.ToChar(n)+DateTime.Now.ToString("
yyyymmddhhmmss"
)+random.Next(100).ToString();
//将字母+系统时间+随机数附加给订单
if(!
IsNull("
id"
))
{
Adinet_ExpressListaa=ass.GetById(int.Parse(Request["
]));
num.Value=aa.Num;
thingname.Value=aa.ThingsName;
rename.Value=aa.ReceiveName;
retel.Value=aa.ReceiveTel;
sendName.Value=aa.SendBy;
sendAdd.Value=aa.SendAddress;
sendTel.Value=aa.SendTel;
sendDate.Value=aa.SendDate;
expressName.Value=aa.ExpressName;
redate.Value=aa.ArrivalDate;
getdate.Value=aa.GetDate;
getname.Value=aa.GetName;
}
}
}
publicvoidsubmitbtn_ServerClick(objectsender,EventArgse)
Adinet_ExpressListaa=ass.GetById(int.Parse(Request["
//定义和赋值
aa.Num=num.Value;
aa.ThingsName=thingname.Value;
aa.ReceiveName=rename.Value;
aa.ReceiveTel=retel.Value;
aa.SendBy=sendName.Value;
aa.SendAddress=sendAdd.Value;
aa.SendTel=sendTel.Value;
aa.SendDate=sendDate.Value;
aa.ExpressName=expressName.Value;
aa.ArrivalDate=redate.Value;
aa.GetDate=getdate.Value;
aa.GetName=getname.Value;
ass.Edit(aa);
else
Adinet_ExpressListaa=newAdinet_ExpressList();
ass.Add(aa);
Alert("
操作成¨
功!
"
ExpressList.aspx"
//页面跳转
protectedvoidButton1_Click1(objectsender,EventArgse)
System.Randomrandom=newRandom();
strings=num.Value.Substring(0,1);
//定义
intn=Convert.ToInt32(s[0]);
//转换为字母
num.Value=Convert.ToChar(n+1)+DateTime.Now.ToString("
}
1.2ExpressList.asp订单领取查询模块
publicpartialclassExpressList:
del"
ass.Delete(int.Parse(Request["
Alert("
删除成¨
功|!
1.3ddHjbl.asp订单痕迹保留模块
usingSystem.Linq;
usingSystem.IO;
usingSystem.Data;
publicpartialclassDefault2:
System.Web.UI.Page
protectedvoidButton1_Click(objectsender,EventArgse)
Export("
application/ms-excel"
痕迹保留.xls"
//导出为EXECL
privatevoidExport(stringFileType,stringFileName)
Response.Charset="
GB2312"
Response.ContentEncoding=System.Text.Encoding.UTF8;
Response.AppendHeader("
Content-Disposition"
attachment;
filename="
+HttpUtility.UrlEncode(FileName,System.Text.Encoding.UTF8).ToString());
Response.ContentType=FileType;
this.EnableViewState=false;
StringWritertw=newStringWriter();
HtmlTextWriterhw=newHtmlTextWriter(tw);
GridView1.RenderControl(hw);
Response.Write(tw.ToString());
Response.End();
publicoverridevoidVerifyRenderingInServerForm(Controlcontrol)
protectedvoidButton2_Click(objectsender,EventArgse)
stringa="
stringc="
select*fromhjblwhere"
GridView1.DataSourceID="
//连接数据库
if(RadioButton1.Checked==true)
if(TextBox1.Text!
="
)
a=a+"
czlx='
+TextBox1.Text+"
and"
if(TextBox2.Text!
{
a=a+"
czxx='
+TextBox2.Text+"
}
else
if(TextBox3.Text!
{
a=a+"
czip='
+TextBox3.Text+"
}
else
a=a=a+"
if(RadioButton2.Checked==true)
if(TextBox1.Text!
or"
if(TextBox2.Text!
else
if(TextBox3.Text!
{
a=a+"
}
a=a=a+"
if(RadioButton3.Checked==true)
czxx<
>
czip<
stringb=c+"
+a;
stringnum=b;
SqlCommandcom=newSqlCommand(num,scn);
SqlDataAdapterda=newSqlDataAdapter();
DataSetds=newDataSet();
da.SelectCommand=com;
da.Fill(ds);
GridView1.DataSource=ds;
GridView1.DataBind();
protectedvoidButton3_Click(objectsender,EventArgse)
SqlConnectionscn=newSqlConnection(@"
scn.O
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 订单 信息 模块 前后 代码