成功dropdownlist清空

dropdownlist清空  时间:2021-05-19  阅读:()

示靠成荚臀凉老文档下载免费文档下载http://doc.
100lw.
com/本文档下载自文档下载网,内容可能不完整,您可以点击以下网址继续阅读或下载:http://doc.
100lw.
com/doc/59d92020109522c06c7fb8ab数据库课程设计运网物流管理系统非常详细的物流管理[此处图片未下载成功][运网物流管理系统][此处图片未下载成功]《运网物流管理系统》是一个基于http://doc.
100lw.
com开发的Web物流管理管理系统.
作为B/S结构的web数据库管理系统,本系统具有所有B/S结构系统的优点,同时又具有http://doc.
100lw.
com的高效的优势.

从技术上说,本系统采用了C#编写,充分利用http://doc.
100lw.
com强大的组件DATAGRID,结合http://doc.
100lw.
com对任务书中的物流管理的SQLServer2000数据库进行管理.
通过本系统可以对数据库执行添加、删除、修改、查询等全面的操作.
系统支持分页功能,能支持大量数据的存储.
我利用具有高安全性的Cookie作为安全校验的依据,对用户的权限进行审核,提供系统的安全保障.

从功能上说,本系统主要分为2大模块:用户登陆模块和数据操作模块.
通过用户登陆模块能对用户身份进行核实和验证,通过数据操作模块能对物流系统的相关信息进行操作,添加删除修改在一个页面内完成,直观简洁.
作为课程设计,本系统达到了设计任务的基本要求,并在其上才用了更先进的语言,提供了更强大的扩展能力和更好的执行效率,作为一个完善的系统的雏形,本系统只要进入软件开发的螺旋法则,不久之后就可以进化为一个成熟的,能让最终用户所接受的系统.

此次课程设计内容则是以c#作为开发语言,编写http://doc.
100lw.
com程序,c#是一门全新的语言,具有更强大的编辑和操作能力,在此过程中,我又开始了认真的从无到有的学习,通过锲而不舍的实践操作和对各种相关书籍的钻研,终于理解了c#的语言,并迅速开发出了本系统.

在学习和实践的过程中,我充分体会到了c#和.
Net技术的强大,在学习的过程中,我认识了几个来自Microsoft社区的MVP,在通过和他们交流和认真学习他们编写的经验文章后,我已经能更好的理解.
Net平台的运行机制,从内核这个层次认识到了Microsoft给作为程序员的我们带来了什么.
本文关于运网物流管理系统的设计是在何迎生老师的指导下完http://doc.
100lw.
com/doc/59d92020109522c06c7fb8ab成的.
经过一个学期的设计,我们基本完成了任务.
设计过程中,何迎生老师给予了我们极大的帮助与鼓励,在此,我们对他的悉心指导表示衷心的感谢!

关键字:运网物流管理,C#,http://doc.
100lw.
com,B/S,Web[此处图片未下载成功]心.
于是,基于Web的数据库也就应运而生了.
随着Internet/Intranet技术的发展,开发基于Web的应用程序势在必行,数据库技术更是需要和Web数据相结合,才是更为广阔的前景.
http://doc.
100lw.
com作为微软推出的新兴Web应用程序开发技术,在数据库应用方面发挥着越来越重要的作用.

的普及和应用使人们的现代生活方式发生了深刻的变化,现在各大企业也加快了信息化进程,并且都建立了自己的企业网.
这为企业网络现代化创收提高效率提供了必备的物质基础.
企业总是处于新技术的最前沿地带,于是一个基于网络管理的应用系统的开发也正蓬勃发展并发挥着巨大的作用.

基于以上原因,本文提出了一种网上实现物流管理系统,它能很好的解决以上的问题.
它改变了以往物流的运作方式,而是采用网上入港和出港,极大地便捷了企业的管理层了解企业的运行和业务状态显著地提高了工作效率.
系统引用了http://doc.
100lw.
com这一具有强大功能、用于Web开发的全新框架.
http://doc.
100lw.
com在系统重处于操作系统内核与应用程序之间,使得应用程序可以更好地利用操作系统提供的功能,并使得应用程序的开发更快、更简单.
本系统采用B/S模式,其最根本的目的是让在企业的管理层便捷查看企业运行状态,操作业务员入港出港操作,财务统计等,并且具有操作方便,响应快捷等优点.

第二章系统概要设计[此处图片未下载成功]物流管理系统,在不同的物流公司有着自身的特殊性,公司的大小不同,主要面对对象不同,则业务关系也相对的不同,运网物流管理系统v2.
0版主要针对的是中小型物流公司.
帮助其实现现代化信息化的管理,由于时间有限,整个系统分阶段开发,本次开发为第一阶段,http://doc.
100lw.
com/doc/59d92020109522c06c7fb8ab主要实现系统的出港制单、报表打印、进港收货确认、系统的管理员增加、删除、修改等功能.

房管理、同行管理、统计分析等方面为第二阶段设计,在此不做介绍.
2.
1用户总体业务结构物流管理系统,包括主要部分:进港业务、出港业务、客户管理、同行管理、统计分析、进港财务、出港财务、系统设置.
各业务包括的主要内容有:(在此只介绍第一阶段设计)①出港业务:本公司操作员完成客人所要托运的货物的表单制作,输入货物的基本信息,托运人基本资料和接收人基本资料,然后打印出报表与客人作为托运凭证.
②进港业务:公司操作员接收货物信息,并确认货物信息中的条形码,确认到货,并通知收货人接受货物.
③系统管理:管理员在此管理页面中管理用户,增加用户,设置用户权限、输入和修改管理员基本资料,修改个人的密码.
2.
2总体安全要求、保密性机密或敏感数据库在存储过程、处理、传输过程中要保密,确保用户在授权后才能访问.
、完整性保证系统中的信息处在一种完整和没有受到损害,防止因非授权访问、部件故障或其它错误而引起信息篡改、破坏或丢失.
企业建站数据库中.
系统管理员可以访问注册用户数据库,系统管理员分为不同的权限.
对不同的管理员有不同的权限.
如分为市场部人员、用户管理员、财务管理员、超级管理员.
不同权限的工作人员登录后,操作权限不同.
以适合实际应用的需求,如:市场部人员只能查看用户名单和联系方法;财务管理员可以为付款用户开通网站;用户管理员可以对用户资料进行修改、删除操作;超级管理员可以对管理员进行管理.
注册用户只能对自己的数据库进行管理.

、可靠性保障系统在复杂的网络环境下提供持续、可靠的服务.
一、应用背景:[此处图片未下载成功][此处图片未下载成功]成为以本地向外辐射,具有强大的多式联运能力的物流服务商.
运网物流在进行运输管理物流系统的设计规划的过程中,基于以下指导思想:按尽可能低的总成本来创建顾客目标价值.
因此,物流系统必须具有高度的客户反应能力,同http://doc.
100lw.
com/doc/59d92020109522c06c7fb8ab时能控制作业成本的变化运网物流管理系统是吉首大学运网物流自主开发的适用于广泛的公路运输企业、货代配载和第三方物流企业的运输管理系统.
1.
2背景使用户和项目人员明确系统的功能、应用范围.
1.
3定义1.
1(工作室自定义)二、系统概要分析:[此处图片未下载成功][此处图片未下载成功]系统UML用例模型系统的功能性需求功能序号功能名称功能说明2345进港业务出港业务财务管理统计分析系统管理包含对出港制单,出港调度,货物装配,查找,生成报表包含对进港受理,到货确认业务财务统计暂没实现包含操作员的增加,删除,权限的分配系统的非功能性需求:用户界面需求简洁、易用、易懂,美观、大方、标准,具备一定的兼容性.
:软硬件环境需求软件环境:客户端:兼容当前安装IE6.
0的Windows操作系统.
服务器:支持.
NET的Windows2000服务版或Windows2003Server[此处图片未下载成功]易用、健壮、兼容性好、运行稳定、有一定安全保障第三章系统总体设计:软件质量需求[此处图片未下载成功]运网物流管理系统是满足中小型物流公司对货物信息管理要求,采用MicrosoftVisualStudio.
NET2003SQLServer2000(数据库)设计,程序可运行于Windows2000/xp/2003下WindowsNT及更高版本中所有支持http://doc.
100lw.
com的网站服务器中.
用户输入特定的网络IP或域名,可以通过互联网络访问.
3.
1系统体系结构://doc.
100lw.
com/doc/59d92020109522c06c7fb8ab运网物流管理系统采用B/S多层结构的数据库应该设计,系统分为:客户端、服务器、Web服务器、数据库服务器.
基工作过程为:①客户端的电脑输入IP地址执行应用程序,连接到Web服务器,再由WEB服务器与服务器连接.
客户端不处理企业核心逻辑,只拥有部分应该逻辑.
减少负载.
②Web服务器接收并处理浏览器的网页请求,并调用应用服务器的应用程序,接收处理结果,并回送客户端.
③应用服务器处理业务逻辑,接受输入,处理后返回结果.
④数据库服务器处理业务数据,负责管理对数据的读写和维护,以及数据库的数据访问权限.
.
2系统软件开发平台3.
2.
1数据库管理系统选择SQLServer2000中文版是基于客户端/服务器模式的新一代大型数据库管理系统(DBMS),它在电子商务、数据仓库和数据库解决方案等应用中起着重要的核心作用,可为企业的数据管理提供强大的支持,对数据库中的数据提供有效的管理,并采用有效的措施实现数据的完整性及数据的安全性.

3.
2.
2开发工具选://doc.
100lw.
com是由微软公司推出的用于Web应用开发的全新框架,是.
NET框架(即.
NET)的组成部分,它从现有的ASP(ActiveServerPages,活动服务器页)结构体系上跨出了一大步,是对传统ASP技术的重大升级和更新.
http://doc.
100lw.
com是建立在.
NET框架的公共语言运行库上的编程框架,可用于在服务器上生成功能强大的Web应用程序.

微软公司的.
NET框架是继ActiveX技术之后,于2000年推出的用于构建新一代Inetnet集成服务平台的最新框架,这种集成服务平台允许各各系统环境下的应用程序通过因特网进行通信和共享数据.
目前,因特网服务平台亟待解决的重要问题是系统间的互通性问题,一些相关协议如XML(eXtensibleMarkupLanguage,可扩展标记语言)、SOAP(SimpleObjectAccessProtocol,简单对象存取协议)等http://doc.
100lw.
com/doc/59d92020109522c06c7fb8ab,.
NET平台将对这些协议提供支持,其意义可与当年Windows平台推出的意义相提并论,微软公司将其称为[此处图片未下载成功]何设备都能访问所需的信息、文件和程序.
用户不需要知道这些文件放在会地方,只需要发出请求,然后只管接收即sk,而所有后台的复杂性是完全屏蔽起来的.
同时,对于开发人员来说,更容易建立Web应用程序和Web服务,进一步简化对应用程序的开发.
.
NET框架具有两个主要组件:公共语言库和.
NETFrameWork类库.
公共语言运行库是.
NET框架的基础.
从层次上来看,.
NET框架包括三个主要组成部分:公共语言运行时(CommonLanguageRuntime,CLR或称公共语言运行库)、服务框架(ServicesFramework)和两类应用模板.
两类应用模板包括传统的Windows应用程序模板(Windows表单)和基于ASP.
NET的面向Web的应用程序模板(Web表单和Web服务),其结构如图所示.
Studio.
NET是用于快速生成企业级http://doc.
100lw.
comWeb应用程序和高性能桌面应用程序的工具.
VisualStudio包含基于组件的开发工具(如VisualC#、VisualJ#、VisualBasic和VisualC),以及许多用于简化基于小组的解决方案的设计、开发和部署的其他技术.
Studio支持Microsoft.
NETFramework,该框架提供公共语言运行库和统一编程类;http://doc.
100lw.
com使用这些组件来创建http://doc.
100lw.
comWeb应用程序和XMLWebservices.
MSDNLibrary也包括在内,它包含这些开发工具的所有文档.
3.
[此处图片未下载成功]2.
3系统总体功能模块运网物流管理系统总共划分为:用户登陆模块、进港业务模块、出港业务模块、客户管理模块、同行管理模块、统计分析模块、进港财务模块、出港财务模块、系统设置模http://doc.
100lw.
com/doc/59d92020109522c06c7fb8ab块.
如图(3-1)所示[此处图片未下载成功][此处图片未下载成功][此处图片未下载成功].
3系统需求描述.
3.
1运网物流管理系统数据流图:系统流程图[此处图片未下载成功]数据流名:(出港管理)输入请求来源:需要托运货物的物住流向:进港业务组成:托运业主ID(自动产生)托运业主身份证号码托运业主的姓名托运业主的单位名称业主地址业主联系电话号码业主邮政编码码数据流名:(进港管理)查询请求来源:出港中输入的数据输出:数据编码组成:托运业主身份证号码编码.
.
.
.
第四章数据库设计五、数据表设计:R模型[此处图片未下载成功][此处图片未下载成功].
1数据库结构及说明物流管理系统数据表及视图设计:[此处图片未下载成功][此处图片未下载成功][此处图片未下载成功]建立管理员信息用户视图:(login_VIEW)业务明细总表[此处图片未下载成功][此处图片未下载成功]业务操作日志表[此处图片未下载成功]常用包装表[此处图片未下载成功]托运人明细表[此处图片未下载成功]收货人明细表://doc.
100lw.
com/doc/59d92020109522c06c7fb8abpar[此处图片未下载成功][此处图片未下载成功]货物信息明细表[此处图片未下载成功][此处图片未下载成功]Login登陆信息表[此处图片未下载成功]LoginLog登陆日志表视图[此处图片未下载成功][此处图片未下载成功]备注:r:dbo.
Receiver,g:dbo.
Good,b:dbo.
Business一登陆测试:软件测试[此处图片未下载成功][此处图片未下载成功][此处图片未下载成功]主界面生成报表[此处图片未下载成功][此处图片未下载成功]第五章总结运网物流管理系统是运网开发小组:邓彬、汪庆春、邹奇、黄键四人在《数据库原理及设计》授课老师何迎生的带领下,经历两个月的需求分析设计及一个月的代码编写,已经初步完成系统的总体功能设计.
初步满足了中小型物流管理公司的进港和出港的信息管理及系统管理员的帐号管理.

本系统从界面设计到代码编写都为小组成员原创,系统中注入了小组成员的大量心血.
小组成员分工如下:汪庆春:系统需求分析代码编写.
邓彬:系统代码编写软件界面设计.
邹奇:系统软件测试.
黄键:系统相关材料收集.
小组成员首次接触http://doc.
100lw.
com.
并运用http://doc.
100lw.
com的知识,运用http://doc.
100lw.
com开发平台,借助SQL数据库.
在何迎生老师的大力支持和帮助下,开发出运网物流管理系统.
对本小组各成员都有很大的激励.
本次开发中,各成员的感触都很深.
系统需求阶段,小组成员汪庆春走访吉首http://doc.
100lw.
com/doc/59d92020109522c06c7fb8ab市各大中小型物流公司,详细记录了如"中铁快运"公司的管理软件中的各项需求.
为小组成员后期的代码编写提供了强有力的资料来源.
在以后的代码编写过程中,我们深深体会[此处图片未下载成功]编写代码过程中,小组成员也深深了解到了一个软件并非一个人,一朝一夕可以完成的.
编写系统,是要有很强的团队合作意识.
这需要借助每个人的力量,汇集各成员的强项.
才能开发出适用性强、可读性好的软件.
本次开发中,运网小组运用VSS6C团队开发设计软件,加强了团队代码编写之间的相互交流.
让整个代码编写事半功倍.

测试阶段,虽事先有具体分工,但在分工的过程中也有合作.
测试阶段出现的问题我们都争取当天解决.
并做好日志工作.
当然,本次系统开发过程中也出现了许多问题,比如小组成员大都是首次学习http://doc.
100lw.
com.
设计语言掌握不足.
造成系统开发出现真空地带等等.
但不管如何,我们始终相信,运网开发小组不会因为第一段的工作完成而停止.
通过第一阶段的设计.
使小组成员熟悉了http://doc.
100lw.
com语言.
也了解了整个设计过程.
相信后阶段的设计将很快完成现阶段的不足.

参考文献[1]但正刚,《http://doc.
100lw.
com高级编程》,北京:清华大学出版社,2002[2]EvangelosPetroutsos,AsliBilgin,《Visualhttp://doc.
100lw.
com数据库编程》,北京:电子工业出版社,2002,419-470[3]RebeccaM.
Riordan,《http://doc.
100lw.
com程序设计》,北京:清华大学出版社,2002,277-327[4]王树伟,王蒙,《Visualhttp://doc.
100lw.
com编程指南》,北京:电子工业出版社,2002.
[5]王兴品,《Visualhttp://doc.
100lw.
com数据库开发典型实例》,北京:电子工业出版社,2002[6]金雪云,焦桂英等,《http://doc.
100lw.
com高级开http://doc.
100lw.
com/doc/59d92020109522c06c7fb8ab发技术与范例》,北京:电子工业出版社,2002[7]孟军,王宝学,《精通http://doc.
100lw.
com网络编程》,北京:人民邮电出版社,2002[8]焦荐沧,龙晓敏,《深入体验http://doc.
100lw.
com》,西安:西安电子科技大学出版社,2001附:程序主要代码/*file:index.
aspx.
cs*//***@authorWang代码编写者*@reviewerQingchunWang*@version*@env.
0,2005-12-15代码审查者版本和时间--代码修改者Framework1.
1.
4--编译环境*@modifiedFireWolf,2005-12-17**/System;System.
Collections;usinghttp://doc.
100lw.
componentModel;usingSystem.
Data;[此处图片未下载成功]usingSystem.
Web.
UI;System.
Web.
UI.
WebControls;usingSystem.
Web.
UI.
HtmlControls;usingSystem.
Web.
Security;usingSystem.
Data.
SqlClient;yw///<summary>///WebForm1的摘要说明.
///</summary>classIndex:System.
Web.
UI.
Pagehttp://doc.
100lw.
com/doc/59d92020109522c06c7fb8abprotectedSystem.
Web.
UI.
HtmlControls.
HtmlFormForm1;protectedSystem.
Web.
UI.
WebControls.
TextBoxPasswd;protectedSystem.
Web.
UI.
WebControls.
TextBoxTxtCode;protectedSystem.
Web.
UI.
WebControls.
ImageImage1;System.
Web.
UI.
WebControls.
ImageButtonImageButton1;protectedSystem.
Web.
UI.
WebControls.
ImageButtonImageButton2;protectedhttp://doc.
100lw.
combelErrorCode;protectedhttp://doc.
100lw.
combelLabel1;protectedSystem.
Web.
UI.
WebControls.
TextBoxUserName;protectedSystem.
Data.
SqlClient.
SqlConnectionconnection;voidPage_Load(objectsender,System.
EventArgse)stringisDebug=System.
Configuration.
ConfigurationSettings.
AppSettings["IsDabug"];if(isDebug=="true")//如果为调试程态刚设置一下假登陆现场.
RedirectFromLoginPage("FireWolf",true);Response.
Redirect("use_admin/index.
aspx",false);(!
thihttp://doc.
100lw.
com/doc/59d92020109522c06c7fb8abs.
IsPostBack)this.
Passwd.
Text="";http://doc.
100lw.
comerName.
Text="";this.
ErrorCode.
Text="";[此处图片未下载成功]if(TxtCode.
Text!
=validateCode)else(http://doc.
100lw.
comerName.
Text==""||this.
Passwd.
Text=="")else#endregion///<summary>///设计器支持所需的方法-不要使用代码编辑器修改///此方法的内容.
///</summary>voidInitializeComponent()////CODEGEN:该调用是http://doc.
100lw.
comWeb窗体设计器所必需的.
//();base.
OnInit(e);.
ImageButton1.
Click=newSystem.
Web.
UI.
ImageClickEventHandler(this.
ImageButton1_Click);this.
ImageButton2.
Click=newSystem.
Web.
UI.
ImageClickEventHandler(this.
ImageButton2_Click);this.
Load=newSystem.
EventHandler(this.
Page_Load);voidImageButton1_http://doc.
100lw.
com/doc/59d92020109522c06c7fb8abClick(objectsender,System.
Web.
UI.
ImageClickEventArgse)validateCode;trycode=Session["VNum"];//得到验证码validateCode=code.
ToString();//判断用户是否已经输入了用户或密码,没有输入用户名或密码刚抛出异常thrownewException("用户名或密码不能为空");//判断用户是否已经正确输入验证码,错误则抛出异常thrownewException("验证码有错!
");[此处图片未下载成功]Session.
RemoveAll();//Session["LoginUser"]=UserName.
Text.
Trim();//登陆成功,跳转到管理首页.
RedirectFromLoginPage(http://doc.
100lw.
comerName.
Text,true);.
Redirect("use_admin/index.
aspx",false);else//登陆错误抛出异常newException("用户名或密码有错");(Exceptionex)//显示错误信息ErrorCode.
Text="<fontcolor='red'><b>"ex.
Message"</b></font>";://doc.
100lw.
com/doc/59d92020109522c06c7fb8abparprivatevoidImageButton2_Click(objectsender,System.
Web.
UI.
ImageClickEventArgse)/*清空*/.
ErrorCode.
Text="";http://doc.
100lw.
comerName.
Text="";this.
TxtCode.
Text="";this.
Passwd.
Text="";//http://doc.
100lw.
comerName.
Text=FormsAuthentication.
HashPasswordForStoringInConfigFile(Passwd.
Text,"MD5");/*检查登陆*/boolCheckLogin(stringStrUser,stringStrPwd)SqlCommandcmd=null;SqlDataAdapterad=null;DataSetds=null;tryif(CheckCanLogin()==true)[此处图片未下载成功]strcon=System.
Configuration.
ConfigurationSettings.
AppSettings["HostConnStr"];//从Web.
config文件中加载数据库连接字符串strSQL="select*from[Login]where[LoginName]='"StrUser"'";//组装登陆查询Sql语句string=FormsAuthentication.
HashPasswordForStoringInConfigFihttp://doc.
100lw.
com/doc/59d92020109522c06c7fb8able(Passwd.
Text.
Trim(),"MD5");//由于数据库里存储用户密码是用MD5算法加密的,所在以这儿把用户输入的表单中的数据进行一次MD5加密=newSqlConnection(strcon);//实例化数据库连接对象connection.
Open();//打开数据库连接对象=newSqlCommand(strSQL,connection);//实例化SqlCommand对象用于执行数据库查询命令ad=newSqlDataAdapter(cmd);//实例化数据库连接桥(.
NET里的采用的是从数据库中取得数据和记录集建立管道)//这个适配器是数据记集和数据库的连接管道ds=newDataSet();//实例化记录集对象ad.
Fill(ds,"Login");//把从数据库中的数据填充到记录集的缓冲区if(ds.
Tables[0].
Rows.
Count==0)//如果记录集为空,刚表示没有这个用户抛出异常newException("用户名或密码错误");else//从记录集中取出用户名和密码user=(string)ds.
Tables["Login"].
Rows[0]["LoginName"];stringpwd=(string)ds.
Tables["Login"].
Rows[0]["PassWord"];(StrUser!
=user.
Trim())thrownewException("用户名错误");elseif(pwd.
Trim()!
=strPass)[此处图片未下载成功]/*登陆成功后获取其权限*http://doc.
100lw.
com/doc/59d92020109522c06c7fb8ab/Permission=(int)ds.
Tables["Login"].
Rows[0]["privilege"];/*在session里保存权限*/Session["Privilege"]=Permission;/*写日志*/(StrUser,"正常登陆");/*登陆成功返回真*/returntrue;else/*记录日志*/(StrUser,"输入密码错误达到三次");/*输入登陆所需信息连三次错误不能再进行登陆!
弹出消息框给用户*/ShowMessage("您已经输入出错达到3次!
不能再登陆");/*抛出异常*/newException("你已经三次输入错误");(Exceptionex)ErrorCode.
Text="<fontcolor='red'><b>"ex.
Message/*ex.
Message*/"</b></font>";returnfalse;finally/*释放对象!
把资源返回给系统*/ds.
Clear();ds.
Dispose();ad.
Dispose();cmd.
Dispose();if(connection!
=null)connection.
Close();[此处图片未下载成功]/*检查输入错误是否已经达到三次*/phttp://doc.
100lw.
com/doc/59d92020109522c06c7fb8abrivateboolCheckCanLogin()code=Session["LoginedNum"];intiNumber=0;if(code==null)iNumber=1;["LoginedNum"]=iNumber;returntrue;elseiNumber=(int)code;if(iNumber>2)returnfalse;elseiNumber;["LoginedNum"]=iNumber;returntrue;voidShowMessage(stringstrMsg)Response.
Write("<script>alert(""strMsg"")</script>");voidWriteLog(stringuser,stringLogInfo)SqlConnectioncon=null;SqlCommandcmd=null;trystringstrcon=System.
Configuration.
ConfigurationSettings.
AppSettings["HostConnStr"];stringipAddr=Request.
ServerVariables["REMOTE_ADDR"];DateTimeTime=System.
DateTime.
Now;/*组装日志插入SQL语句*/strSql="insertintoLoghttp://doc.
100lw.
com/doc/59d92020109522c06c7fb8abinLog(LogUser,LogInfo,LogTime,LogIP)values(";[此处图片未下载成功].
Dispose();=strSql"'"ipAddr"'";strSql=strSql")";=newSqlConnection(strcon);//实例化数据库连接对象con.
Open();//打开数据库连接对象=newSqlCommand(strSql,con);intEffectNum=cmd.
ExecuteNonQuery();if(EffectNum==0)thrownewException();(Exceptionex)ErrorCode.
Text="<fontcolor='red'><b>"ex.
Message/*ex.
Message*/"</b></font>";finally//释放cmd对象cmd.
Dispose();if(con!
=null)con.
Close();[此处图片未下载成功]****@authorWang代码编写者*@reviewerQingchunWang--代码审查者*@version.
0,2005-12-15版本和时间*@ehttp://doc.
100lw.
com/doc/59d92020109522c06c7fb8abnvDotNetFramework1.
1.
4--编译环境*@modifiedFireWolf,2005-12-17代码修改者http://doc.
100lw.
come_admin.
cgywusingSystem;usingSystem.
Data;usingSystem.
Drawing;usingSystem.
Web;System.
Web.
UI.
WebControls;System.
Web.
UI.
HtmlControls;usingSystem.
Security.
Principal;usingSystem.
Data.
SqlClient;///<summary>///的摘要说明.
///</summary>classNavigation:http://doc.
100lw.
comerControlprotectedSystem.
Web.
UI.
WebControls.
ImageImage1;protectedSystem.
Web.
UI.
WebControls.
ImageImgspacer;protectedSystem.
Web.
UI.
WebControls.
ImageImage2;System.
Web.
UI.
WebControls.
ImageButtonImgBtnBook;protectedSystem.
Web.
UI.
WebControls.
ImageImage10;protectedSystem.
Web.
UI.
WebControls.
ImageImage11;System.
Web.
UI.
WebControls.
ImageButtonImgOut_http://doc.
100lw.
com/doc/59d92020109522c06c7fb8abInvoke;protectedSystem.
Web.
UI.
WebControls.
ImageImage8;protectedSystem.
Web.
UI.
WebControls.
ImageImage3;protectedSystem.
Web.
UI.
WebControls.
ImageImage6;protectedSystem.
Web.
UI.
WebControls.
ImageImage13;System.
Web.
UI.
WebControls.
ImageButtonImgBtn_Configure;protectedSystem.
Web.
UI.
WebControls.
ImageImage9;System.
Web.
UI.
WebControls.
ImageButtonImgBtn_Trace;[此处图片未下载成功]protectedSystem.
Web.
UI.
WebControls.
ImageImage12;protectedSystem.
Web.
UI.
WebControls.
ImageImage5;protectedSystem.
Web.
UI.
WebControls.
ImageImage4;protectedSystem.
Web.
UI.
WebControls.
PanelMainPanel;protectedhttp://doc.
100lw.
combelLabel1;protectedhttp://doc.
100lw.
combelLabel2;protectedhttp://doc.
100lw.
combelLabel3;protectedhttp://doc.
100lw.
combelLabel4;protectedhttp://doc.
100lw.
combelLabel5;protectedhttp://doc.
100lw.
combelLabel6;protectedSystem.
Web.
UI.
WebControls.
PanelOuhttp://doc.
100lw.
com/doc/59d92020109522c06c7fb8abtPanel;protectedSystem.
Web.
UI.
WebControls.
TextBoxTxtGDName;protectedSystem.
Web.
UI.
WebControls.
TextBoxTxtGDWrap;protectedSystem.
Web.
UI.
WebControls.
TextBoxTxtGDVol;protectedSystem.
Web.
UI.
WebControls.
TextBoxTxtGDWeight;protectedSystem.
Web.
UI.
WebControls.
TextBoxTxtGDQty;protectedSystem.
Web.
UI.
WebControls.
TextBoxTxtGDOpt;protectedhttp://doc.
100lw.
combelLabel7;protectedhttp://doc.
100lw.
combelLabel8;protectedhttp://doc.
100lw.
combelLabel9;protectedhttp://doc.
100lw.
combelLabel10;protectedhttp://doc.
100lw.
combelLabel11;protectedhttp://doc.
100lw.
combelLabel12;protectedSystem.
Web.
UI.
WebControls.
TextBoxTxtEntrust;protectedSystem.
Web.
UI.
WebControls.
TextBoxTxtEntrustPho;protectedSystem.
Web.
UI.
WebControls.
ButtonBtnEntrustRet;protectedSystem.
Web.
UI.
WebControls.
ButtonBtnGoodNext;protectedSystem.
Web.
UI.
WebControls.
ButtonBtnGood;protectedSystem.
Web.
UI.
WebControls.
ButtonBtnGoodReturn;phttp://doc.
100lw.
com/doc/59d92020109522c06c7fb8abrotectedhttp://doc.
100lw.
combelLabel13;protectedhttp://doc.
100lw.
combelLabel14;protectedhttp://doc.
100lw.
combelLabel15;protectedhttp://doc.
100lw.
combelLabel16;protectedhttp://doc.
100lw.
combelLabel17;protectedhttp://doc.
100lw.
combelLabel18;protectedSystem.
Web.
UI.
WebControls.
TextBoxTxtRecvMan;protectedSystem.
Web.
UI.
WebControls.
TextBoxTxtRecvtUnit;protectedSystem.
Web.
UI.
WebControls.
TextBoxTxtRecvAddr;protectedSystem.
Web.
UI.
WebControls.
TextBoxTxtRecvPhone;protectedSystem.
Web.
UI.
WebControls.
TextBoxTxtRecvtZone;protectedSystem.
Web.
UI.
WebControls.
TextBoxTxtRecvID;protectedSystem.
Web.
UI.
WebControls.
ButtonTxtRecvtReturn;[此处图片未下载成功]protectedSystem.
Web.
UI.
WebControls.
TextBoxTxtEntUnit;protectedSystem.
Web.
UI.
WebControls.
TextBoxTxtEntAddr;protectedSystem.
Web.
UI.
WebControls.
TextBoxTxtEntPhone;protectedSystem.
Web.
UI.
WebControls.
TextBoxTxtEntZip;protectedSystem.
Web.
UI.
Webhttp://doc.
100lw.
com/doc/59d92020109522c06c7fb8abControls.
TextBoxTxtEntID;protectedSystem.
Web.
UI.
WebControls.
ButtonBtnEntNext;protectedSystem.
Web.
UI.
WebControls.
ButtonEntBtnReturn;System.
Web.
UI.
WebControls.
RequiredFieldValidatorRequiredFieldValidator1;protectedSystem.
Web.
UI.
WebControls.
RequiredFieldValidatorRequiredFieldValidator2;protectedSystem.
Web.
UI.
WebControls.
RequiredFieldValidatorRequiredFieldValidator3;System.
Web.
UI.
WebControls.
RegularExpressionValidatorRegularExpressionValidator4;protectedSystem.
Web.
UI.
WebControls.
RegularExpressionValidatorRegularExpressionValidator5;protectedSystem.
Web.
UI.
WebControls.
RequiredFieldValidatorRequiredFieldValidator4;System.
Web.
UI.
WebControls.
RegularExpressionValidatorRegularExpressionValidator8;protectedSystem.
Web.
UI.
WebControls.
RegularExpressionValidatorRegularExpressionValidator9;protectedSystem.
Web.
UI.
WebControls.
ButtonBtnRecvNext;System.
Web.
UI.
http://doc.
100lw.
com/doc/59d92020109522c06c7fb8abWebControls.
RequiredFieldValidatorRequiredFieldValidator6;protectedSystem.
Web.
UI.
WebControls.
RequiredFieldValidatorRequiredFieldValidator5;protectedSystem.
Web.
UI.
WebControls.
PanelBusPanel;protectedhttp://doc.
100lw.
combelLabel19;protectedSystem.
Web.
UI.
WebControls.
TextBoxTxtBusGdID;protectedhttp://doc.
100lw.
combelLabel20;protectedSystem.
Web.
UI.
WebControls.
TextBoxTxtBusEntID;protectedhttp://doc.
100lw.
combelLabel21;protectedSystem.
Web.
UI.
WebControls.
TextBoxTxtBusRecID;protectedhttp://doc.
100lw.
combelLabel22;protectedhttp://doc.
100lw.
combelLabel23;protectedhttp://doc.
100lw.
combelLabel25;protectedhttp://doc.
100lw.
combelLabel26;protectedhttp://doc.
100lw.
combelLabel27;protectedSystem.
Web.
UI.
WebControls.
TextBoxTxtBusCast;protectedSystem.
Web.
UI.
WebControls.
ButtonBtnBusFinish;protectedSystem.
Web.
UI.
WebControls.
ButtonBtnBusReturn;protectedSqlConnectionBusConnection;//数据库连接桥strinhttp://doc.
100lw.
com/doc/59d92020109522c06c7fb8abgStrCon=System.
Configuration.
ConfigurationSettings.
AppSettings["HostConnStr"];//连接数据库字符串System.
Data.
SqlClient.
SqlTransactionBusTran;protectedSystem.
Web.
UI.
WebControls.
TextBoxTxtBusGDName;protectedhttp://doc.
100lw.
combelLabel28;System.
Web.
UI.
WebControls.
TextBoxTxtBusEntName;protectedhttp://doc.
100lw.
combelLabel29;protectedSystem.
Web.
UI.
WebControls.
TextBoxTxtBusRvName;[此处图片未下载成功]protectedhttp://doc.
100lw.
combelLabel32;protectedSystem.
Web.
UI.
WebControls.
TextBoxTxtGDID;protectedhttp://doc.
100lw.
combelLabel33;protectedhttp://doc.
100lw.
combelLabel34;protectedhttp://doc.
100lw.
combelLabel35;protectedhttp://doc.
100lw.
combelLabel36;protectedSystem.
Web.
UI.
WebControls.
TextBoxTxtHZID;protectedSystem.
Web.
UI.
WebControls.
TextBoxTxtSHID;protectedSystem.
Web.
UI.
WebControls.
DropDownListDropList1;protectedSystem.
Web.
UI.
WebControls.
TextBoxTxhttp://doc.
100lw.
com/doc/59d92020109522c06c7fb8abtBusFromStie;protectedSystem.
Web.
UI.
WebControls.
TextBoxTxtBusFromCity;protectedSystem.
Web.
UI.
WebControls.
TextBoxTxtBusToSite;protectedSystem.
Web.
UI.
WebControls.
TextBoxTxtBusToCity;protectedhttp://doc.
100lw.
combelLabel37;protectedhttp://doc.
100lw.
combelLabel38;protectedSystem.
Web.
UI.
WebControls.
TextBoxm_TxtBusID;protectedhttp://doc.
100lw.
combelLabel39;//业务数据操作事务处理voidPage_Load(objectsender,System.
EventArgse)BusConnection=newSqlConnection(StrCon);BusConnection.
Open();=BusConnection.
BeginTransaction();this.
EntGdPanel.
Visible=false;this.
OutPanel.
Visible=false;.
MainPanel.
Visible=true;_TxtBusID.
Visible=false;#regionWeb窗体设计器生成的代码protectedvoidOnInit(EventArgse)////CODEGEN:该调用是http://doc.
100lw.
comWeb窗体设计器所必需的.
//();base.
OnInit(e);://doc.
100lw.
com/doc/59d92020109522c06c7fb8abar///<summary>///设计器支持所需的方法-不要使用代码编辑器///修改此方法的内容.
[此处图片未下载成功].
ImgBtnBook.
Click=newSystem.
Web.
UI.
ImageClickEventHandler(this.
ImgBtnBook_Click);this.
ImgOut_Invoke.
Click=newthis.
ImgBtn_Configure.
Click=new.
Web.
UI.
ImageClickEventHandler(this.
ImgOut_Invoke_Click);.
Web.
UI.
ImageClickEventHandler(this.
ImgBtn_Configure_Click);this.
ImgBtn_Trace.
Click=newSystem.
Web.
UI.
ImageClickEventHandler(this.
ImgBtn_Trace_Click);this.
ImgBtn_Query.
Click=newSystem.
Web.
UI.
ImageClickEventHandler(this.
ImgBtn_Query_Click);this.
BtnGoodNext.
Click=newSystem.
EventHandler(this.
BtnGoodNext_Click);this.
BtnGoodReturn.
Click=newSystem.
EventHandler(this.
BtnGoodReturn_Click);this.
BtnRecvNext.
Click=newSystem.
EventHandler(this.
BtnRecvNext_Click);this.
TxtRecvtReturn.
Click=newSystem.
EventHandler(this.
TxtRecvtReturn_Click);this.
http://doc.
100lw.
com/doc/59d92020109522c06c7fb8abBtnEntNext.
Click=newSystem.
EventHandler(this.
BtnEntNext_Click);this.
EntBtnReturn.
Click=newSystem.
EventHandler(this.
EntBtnReturn_Click);this.
BtnBusFinish.
Click=newSystem.
EventHandler(this.
BtnBusFinish_Click);this.
BtnBusReturn.
Click=newSystem.
EventHandler(this.
BtnBusReturn_Click);this.
Unload=newSystem.
EventHandler(this.
Page_UnLoad);.
Load=newSystem.
EventHandler(this.
Page_Load);#endregion///<summary>///出港定单录制按钮///</summary>///<paramname="sender"></param>///<paramname="e"></param>voidImgBtnBook_Click(objectsender,System.
Web.
UI.
ImageClickEventArgse)ShowPanel(OutPanel,true);///<summary>///出港调度///</summary>///<paramname="sender"></param>///<paramname="e"></phttp://doc.
100lw.
com/doc/59d92020109522c06c7fb8abaram>voidImgOut_Invoke_Click(objectsender,System.
Web.
UI.
ImageClickEventArgse)///<summary>///货物配置///</summary>[此处图片未下载成功]///<summary>///录入货物信息,返回按钮单击事件///</summary>///<paramname="sender"></param>///<paramname="e"></param>(RecvGdPanel,true);///<summary>///货物跟踪///</summary>///<paramname="sender"></param>///<paramname="e"></param>voidImgBtn_Trace_Click(objectsender,System.
Web.
UI.
ImageClickEventArgse).
Write("<script>window.
open('cgyw/PrintReportForm.
aspxBUSID="this.
m_TxtBusID.
Text"')</scrip>");///<summary>///货物查询///</summary>://doc.
100lw.
com/doc/59d92020109522c06c7fb8abr///<paramname="sender"></param>///<paramname="e"></param>voidImgBtn_Query_Click(objectsender,System.
Web.
UI.
ImageClickEventArgse)///<summary>///录入货物信息完成,下一步按钮单击事件///</summary>///<paramname="sender"></param>///<paramname="e"></param>voidBtnGoodNext_Click(objectsender,System.
EventArgse)voidBtnGoodReturn_Click(objectsender,System.
EventArgse)ShowPanel(MainPanel,true);[此处图片未下载成功]///</summary>///<paramname="sender"></param>///<paramname="e"></param>voidBtnRecvNext_Click(objectsender,System.
EventArgse)(EntGdPanel,true);///<summary>///托运人信收集完后,下一步按钮单击事件///</summary>://doc.
100lw.
com/doc/59d92020109522c06c7fb8abpar///<paramname="sender"></param>///<paramname="e"></param>voidBtnEntNext_Click(objectsender,System.
EventArgse)ShowPanel(BusPanel,true);///<summary>///托运人面板,返回按钮///</summary>///<paramname="sender"></param>///<paramname="e"></param>voidEntBtnReturn_Click(objectsender,System.
EventArgse)ShowPanel(RecvGdPanel,true);///<summary>///显示面板方法///</summary>///<paramname="panel"></param>///<paramname="isShow"></param>voidShowPanel(System.
Web.
UI.
WebControls.
Panelpanel,boolisShow)OutPanel.
Visible=false;MainPanel.
Visible=false;RecvGdPanel.
Visible=false;EntGdPanel.
Visible=false;BusPanel.
Visible=false;panel.
Visible=isShhttp://doc.
100lw.
com/doc/59d92020109522c06c7fb8abow;///<summary>///收货信息面板返回按钮[此处图片未下载成功]privatevoidTxtRecvtReturn_Click(objectsender,System.
EventArgse)ShowPanel(OutPanel,true);///<summary>///业务完成///</summary>///<paramname="sender"></param>///<paramname="e"></param>voidBtnBusFinish_Click(objectsender,System.
EventArgse)if(this.
DropList1.
SelectedIndex==0)("客户付款方式为现金:请注意收取人民币:"this.
TxtBusCast.
Text"元");//把数据库里的表和象进行map实现Relation到Object的映射GoodClassm_godObj=newGoodClass();//货物对象m_entObj=newEntrustClass();//托运物主对象ReceiverClassm_rvObj=newReceiverClass();//收货人对象BusinessClassm_busObj=newBusinessClass();//业务对象(refm_godObj);//调用函数(refm_entObj);//调用托运数据获取函数//插入数据库://doc.
100lw.
com/doc/59d92020109522c06c7fb8aba(refm_rvObj);//调用获取收货人数据m_godObj.
GoodID=InsertGood(m_godObj);m_rvObj.
Recv_ID=InsertRecverMan(m_rvObj);m_entObj.
TakeUnit_ID=InsertEntrust(m_entObj);//获到对业务数据_busObj.
Bus_GoodID=m_godObj.
GoodID;//当前这笔业务的货物IDm_busObj.
Bus_AcceptOpt=m_godObj.
Good_Operator;//操作员m_busObj.
Bus_TakeUnitID=m_entObj.
TakeUnit_ID;//托运人的IDm_busObj.
Bus_RecverID=m_rvObj.
Recv_ID;//收货人的IDGetBusinessData(refm_busObj);//新建业务_busObj.
Bus_ID=InsertBusiness(m_busObj);this.
m_TxtBusID.
Text=m_busObj.
Bus_ID.
ToString();ShowPanel(MainPanel,true);///<summary>///获取货物信息[此处图片未下载成功]//获取操作中输入的货物信息.
GoodName=this.
TxtGDName.
Text;//货物名称.
Good_WrapType=this.
TxtGDWrap.
Text;//货物包装类型.
Good_Weight=Convert.
ToSingle(this.
TxtGDWeight.
Text);//货物的重量objgood.
Good_Volume=Convert.
ToSingle(this.
TxtGDVol.
Text);//货物的标签,暂没用objgood.
Good_Quantity=Int32.
Parsehttp://doc.
100lw.
com/doc/59d92020109522c06c7fb8ab(this.
TxtGDQty.
Text);//货物的数量(件数)objgood.
Good_Signal=GenerateSignalCode();//货物的条形码objgood.
Good_Operator=http://doc.
100lw.
com;//操作员///<summary>///获取托运人信息///</summary>///<paramname="objent"></param>voidGetEntrustData(refEntrustClassobjent)objent.
EntrustManID=this.
TxtEntID.
Text;//托运人的身份证号码objent.
EntrustMan=this.
TxtEntMan.
Text;//托运人的姓名objent.
EntrustUnit=this.
TxtEntUnit.
Text;//托运人的单位objent.
EntrustUnitAddr=this.
TxtEntAddr.
Text;//地址.
EntrustUnitPhone=this.
TxtEntPhone.
Text;//单位电话号码objent.
EntrustUnitZone=this.
TxtEntZip.
Text;//邮政编码///<summary>///收货人的数据///</summary>///<paramname="objrecv"></param>voidGetRecverData(refReceiverClassobjrecv)objrecv.
RecverMan=this.
TxtRecvMan.
Text;//收货人的姓名objrecv.
RecverManID=this.
TxtRecvID.
Text;//收货人的身份证号码obhttp://doc.
100lw.
com/doc/59d92020109522c06c7fb8abjrecv.
RecverUnit=this.
TxtRecvtUnit.
Text;//收货人的单位objrecv.
RecverUnitAddr=this.
TxtRecvAddr.
Text;//收货人的地址objrecv.
RecverUnitPhone=this.
TxtRecvPhone.
Text;//收货人的电话号码.
RecverUnitZone=this.
TxtRecvtZone.
Text;//收货人的邮编///<summary>///业务数据///</summary>///<paramname="objbus"></param>[此处图片未下载成功]intInsertBusiness(BusinessClassbusObj)//SqlConnectioncon=null;SqlCommandcmd=newSqlCommand();//System.
Data.
SqlClient.
SqlTransactionmyTran=null;//事务intgdID=0;try///<summary>///业务完成,点返回面板///</summary>///<paramname="sender"></param>///<paramname="e"></param>.
Bus_Cast=Convert.
ToSingle(this.
TxtBusCast.
Text);//费用objbus.
Bus_ToCity=this.
TxtBusToCity.
Text;//发往城市objbus.
Bus_Thttp://doc.
100lw.
com/doc/59d92020109522c06c7fb8aboStation=this.
TxtBusToSite.
Text;//发往站点.
Bus_FromStation=this.
TxtBusFromStie.
Text;//发货所在的城市objbus.
Bus_FromCity=this.
TxtBusFromCity.
Text;//发货所在的站点voidBtnBusReturn_Click(objectsender,System.
EventArgse)(EntGdPanel,true);//stringstrcon=System.
Configuration.
ConfigurationSettings.
AppSettings["HostConnStr"];//组装SQL语句strSql="insertinto(Bus_GoodID,Bus_TakeUnitID,Bus_RecverID,Bus_FromStation,Bus_FromCity,Bus_ToStation,Bus_ToCity,Bus_AcceptOpt,Bus_Cast,Bus_IsPay)values(";strSql=strSql""busObj.
Bus_GoodID",";//货物IDstrSql=strSql""busObj.
Bus_TakeUnitID",";//托运人IDstrSql=strSql""busObj.
Bus_RecverID",";//收货人IDstrSql=strSql"'"busObj.
Bus_FromStation"',";//源站strSql=strSql"'"busObj.
Buhttp://doc.
100lw.
com/doc/59d92020109522c06c7fb8abs_FromCity"',";//源城市strSql=strSql"'"busObj.
Bus_ToStation"',";//目的站strSql=strSql"'"busObj.
Bus_ToCity"',";//目的城市strSql=strSql"'"busObj.
Bus_AcceptOpt"',";//操作中strSql=strSql""busObj.
Bus_Cast",";//费用strSql=strSql"'"busObj.
Bus_IsPay"'";//是否付款strSql=strSql")";/*获取刚刚插入的业务的ID*/[此处图片未下载成功]//con.
Open();//实例化事务对象//myTran=con.
BeginTransaction();;//打开数据库连接对象.
Connection=BusConnection;cmd.
Transaction=BusTran;http://doc.
100lw.
commandText=strSql;EffectNum=cmd.
ExecuteNonQuery();if(EffectNum==0)thrownewException("插入数据失败");elseSqlCommandcmdField=newSqlCommand(strSqlField,BusConnection);cmdField.
Transaction=BusTran;reader=cmdField.
ExecuteReader();do://doc.
100lw.
com/doc/59d92020109522c06c7fb8abwhile(reader.
Read())gdID=Int32.
Parse(reader["Bus_ID"].
ToString());while(reader.
NextResult());reader.
Close();http://doc.
100lw.
commit();("事处提交成功!
业务处理成功");(gdID,"正常处理了业务");//http://doc.
100lw.
commit();returngdID;(Exceptionex)BusTran.
Rollback();(gdID,"业务处理失败,事务rollback");ShowMessage(ex.
Message);return-1;[此处图片未下载成功]//释放cmd对象cmd.
Dispose();///<summary>///插入收货人信息///</summary>///<returns></returns>intInsertRecverMan(ReceiverClassrvObj)//SqlConnectioncon=null;SqlCommandcmd=newSqlCommand();//System.
Data.
SqlClient.
SqlTransactionmyTran=null;//事务intgdID=0;trystringstrcon=System.
Configuration.
http://doc.
100lw.
com/doc/59d92020109522c06c7fb8abConfigurationSettings.
AppSettings["HostConnStr"];strSql="insertinto(RecverManID,RecverMan,RecverUnit,RecverUnitAddr,RecverUnitPhone,RecverUnitZone)values(";strSql=strSql"'"rvObj.
RecverManID"',";//收货人的身份证IDstrSql=strSql"'"rvObj.
RecverMan"',";//收货人的姓名strSql=strSql"'"rvObj.
RecverUnit"',";//收货人的单位strSql=strSql"'"rvObj.
RecverUnitAddr"',";//收货人的地址strSql=strSql"'"rvObj.
RecverUnitPhone"',";//收货人电话号码strSql=strSql"'"rvObj.
RecverUnitZone"'";//收货人的邮编strSql=strSql")";/*获取刚刚插入的收货人的ID*/strSqlField="SELECT@@IDENTITYAS'Recv_ID'";//con=newSqlConnection(strcon);//实例化数据库连接对象//con.
Open();//实例化事务对象//myTran=con.
BeginTransaction();;//打开数据库连http://doc.
100lw.
com/doc/59d92020109522c06c7fb8ab接对象.
Connection=BusConnection;cmd.
Transaction=BusTran;http://doc.
100lw.
commandText=strSql;EffectNum=cmd.
ExecuteNonQuery();if(EffectNum==0)[此处图片未下载成功]SqlCommandcmdField=newSqlCommand(strSqlField,BusConnection);cmdField.
Transaction=BusTran;reader=cmdField.
ExecuteReader();do(reader.
Read())gdID=Int32.
Parse(reader["Recv_ID"].
ToString());while(reader.
NextResult());.
Close();//http://doc.
100lw.
commit();returngdID;(Exceptionex)BusTran.
Rollback();ShowMessage(ex.
Message);return-1;finally//释放cmd对象.
Dispose();//if(con!
=null)////con.
Close();//con.
Dispose();/////<summary>///插入托运人信息[此处图片未下载成功]://doc.
100lw.
com/doc/59d92020109522c06c7fb8ab//SqlConnectioncon=null;SqlCommandcmd=newSqlCommand();//System.
Data.
SqlClient.
SqlTransactionmyTran=null;//事务intgdID=0;try//stringstrcon=System.
Configuration.
ConfigurationSettings.
AppSettings["HostConnStr"];strSql="insertinto(EntrustManID,EntrustMan,EntrustUnit,EntrustUnitAddr,EntrustUnitPhone,EntrustUnitZone)values(";strSql=strSql"'"entObj.
EntrustManID"',";//货主的身份证号码strSql=strSql"'"entObj.
EntrustMan"',";//货主的姓名strSql=strSql"'"entObj.
EntrustUnit"',";//货的单位=strSql"'"entObj.
EntrustUnitAddr"',";//货主的单位地址strSql=strSql"'"entObj.
EntrustUnitPhone"',";//货主的电话号码strSql=strSql"'"entObj.
EntrustUnitZone"'";//货主所在地邮编strSql=strSql")";/*获取刚刚插入的托运http://doc.
100lw.
com/doc/59d92020109522c06c7fb8ab人的ID*/strSqlField="SELECT@@IDENTITYAS'TakeUnit_ID'";//con=newSqlConnection(strcon);////实例化数据库连接对象//con.
Open();////实例化事务对象//myTran=con.
BeginTransaction(打开数据库连接对象.
Connection=BusConnection;cmd.
Transaction=BusTran;http://doc.
100lw.
commandText=strSql;EffectNum=cmd.
ExecuteNonQuery();if(EffectNum==0)thrownewException("插入数据失败");elseSqlCommandcmdField=newSqlCommand(strSqlField,BusConnection);cmdField.
Transaction=BusTran;reader=cmdField.
ExecuteReader();do(reader.
Read())[此处图片未下载成功].
Close();//://doc.
100lw.
commit();returngdID;(Exceptionex)//.
Rollback();Shttp://doc.
100lw.
com/doc/59d92020109522c06c7fb8abhowMessage(ex.
Message);return-1;finally//释放cmd对象.
Dispose();//if(con!
=null)////con.
Close();//con.
Dispose();/////<summary>///插入货物///</summary>///<returns></returns>intInsertGood(GoodClassgodObj)//SqlConnectioncon=null;SqlCommandcmd=newSqlCommand();//System.
Data.
SqlClient.
SqlTransactionmyTran=null;//事务intgdID=0;try[此处图片未下载成功]values(";strSql=strSql"'"godObj.
GoodName"',";//货物的名称strSql=strSql"'"godObj.
Good_WrapType"',";//包装类型strSql=strSql""godObj.
Good_Volume",";//货物的体积strSql=strSql""godObj.
Good_Weight",";//货物的重量=strSql"'"godObj.
Good_Operator"',";//货物的录入操作员sthttp://doc.
100lw.
com/doc/59d92020109522c06c7fb8abrSql=strSql"'"godObj.
Good_Signal"',";//货物的条形码strSql=strSql""godObj.
Good_Quantity",";//货物的数量strSql=strSql"""'在途中'";//strSql=strSql")";/*获取刚刚插入的货物ID*/strSqlField="SELECT@@IDENTITYAS'Good_ID'";//con=newSqlConnection(strcon);//实例化数据库连接对象//con.
Open();//实例化事务对象//myTran=con.
BeginTransaction();;//打开数据库连接对象.
Connection=BusConnection;cmd.
Transaction=BusTran;http://doc.
100lw.
commandText=strSql;EffectNum=cmd.
ExecuteNonQuery();if(EffectNum==0)newException("插入数据失败");elseSqlCommandcmdField=newSqlCommand(strSqlField,BusConnection);cmdField.
Transaction=BusTran;reader=cmdField.
ExecuteReader();do(reader.
Read())gdID=Int32.
Parse(rhttp://doc.
100lw.
com/doc/59d92020109522c06c7fb8abeader["Good_ID"].
ToString());while(reader.
NextResult());.
Close();//http://doc.
100lw.
commit();returngdID;[此处图片未下载成功](Exceptionex)BusTran.
Rollback();//myTran.
Rollback();ShowMessage(ex.
Message);return-1;finally//释放cmd对象cmd.
Dispose();/*if(con!
=null)con.
Close();con.
Dispose();*////<summary>///页面卸载///</summary>///<paramname="sender"></param>///<paramname="e"></param>voidPage_UnLoad(objectsender,EventArgse)BusConnection.
Close();BusConnection.
Dispose();///<summary>///显示信息进行页面清理和资源回收操作///</summary>///<paramname="strMsg"></param>privatevoidShowMessaghttp://doc.
100lw.
com/doc/59d92020109522c06c7fb8abe(stringstrMsg)Response.
Write("<script>alert(""strMsg"")</script>");[此处图片未下载成功](Exceptionex)finally//释放cmd对象cmd.
Dispose();if(con!
=null)ShowMessage("写日志失败!
"ex.
Message);///</summary>///<paramname="user"></param>///<paramname="LogInfo"></param>voidWriteLog(intbusid,stringLogInfo)con=null;SqlCommandcmd=null;trystrcon=System.
Configuration.
ConfigurationSettings.
AppSettings["HostConnStr"];stringipAddr=Request.
ServerVariables["REMOTE_ADDR"];DateTimeTime=System.
DateTime.
Now;/*组装日志插入SQL语句*/strSql="insertintoBusinessLog(Log_BusID,Log_Info,Log_Time,Log_OptIP)values(";strSql=strSqlbusid",";strSql=strSql"'&http://doc.
100lw.
com/doc/59d92020109522c06c7fb8abquot;LogInfo"',";=strSql"'"Time.
ToString()"',";strSql=strSql"'"ipAddr"'";strSql=strSql")";=newSqlConnection(strcon);//实例化数据库连接对象con.
Open();//打开数据库连接对象=newSqlCommand(strSql,con);intEffectNum=cmd.
ExecuteNonQuery();if(EffectNum==0)newException();[此处图片未下载成功]///<summary>///生成条形码///</summary>///<returns></returns>stringGenerateSignalCode()intnumber;charcode;StrSignal=String.
Empty;.
Randomrandom=newRandom();(inti=0;i<10;i)=random.
Next();(number%2==0)=(char)('0'(char)(number%10));else=(char)('A'(char)(nuhttp://doc.
100lw.
com/doc/59d92020109522c06c7fb8abmber%26));=code.
ToString();StrSignal;文档下载网是专业的免费文档搜索与下载网站,提供行业资料,考试资料,教学课件,学术论文,技术资料,研究报告,工作范文,资格考试,word文档,专业文献,应用文书,行业论文等文档搜索与文档下载,是您文档写作和查找参考资料的必备网站.

ucloud香港服务器优惠活动:香港2核4G云服务器低至358元/年,968元/3年

ucloud香港服务器优惠降价活动开始了!此前,ucloud官方全球云大促活动的香港云服务器一度上涨至2核4G配置752元/年,2031元/3年。让很多想购买ucloud香港云服务器的新用户望而却步!不过,目前,ucloud官方下调了香港服务器价格,此前2核4G香港云服务器752元/年,现在降至358元/年,968元/3年,价格降了快一半了!UCloud活动路子和阿里云、腾讯云不同,活动一步到位,...

wordpress高级跨屏企业主题 wordpress绿色企业自适应主题

wordpress高级跨屏企业主题,通用响应式跨平台站点开发,自适应PC端+各移动端屏幕设备,高级可视化自定义设置模块+高效的企业站搜索优化。wordpress绿色企业自适应主题采用标准的HTML5+CSS3语言开发,兼容当下的各种主流浏览器: IE 6+(以及类似360、遨游等基于IE内核的)、Firefox、Google Chrome、Safari、Opera等;同时支持移动终端的常用浏览器应...

腾讯云爆款秒杀:1C2G5M服务器38元/年,CDN流量包6元起

农历春节将至,腾讯云开启了热门爆款云产品首单特惠秒杀活动,上海/北京/广州1核2G云服务器首年仅38元起,上架了新的首单优惠活动,每天三场秒杀,长期有效,其中轻量应用服务器2G内存5M带宽仅需年费38元起,其他产品比如CDN流量包、短信包、MySQL、直播流量包、标准存储等等产品也参与活动,腾讯云官网已注册且完成实名认证的国内站用户均可参与。活动页面:https://cloud.tencent.c...

dropdownlist清空为你推荐
L1苹果5丽水市chrome单击mediacontentcsslowercasecss支持ipad支持ipad支持ipad南京医科大学合同管理系统photoshop技术ps几大关键技术?
广东服务器租用 域名备案中心 免费ftp站点 域名转接 服务器干什么用的 cdn加速是什么 hdd 酷番云 香港新世界中心 电信托管 外贸空间 www789 日本代理ip 国外代理服务器 asp空间 酷锐 腾讯服务器 空间排行榜 ncp phpwind论坛 更多