欢迎来到天天文库
浏览记录
ID:43606179
大小:304.47 KB
页数:11页
时间:2019-10-11
《【精品】影片出租管理》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、出租管理(Hire.cs)窗体设计口回冈出租影片管理新烦客出租还片淸险浏览返回在窗体上拖入9个label控件,7个textbox控件,6个button控件,并设置如下“控件属性设置值说明Hiretext出租簣理label1text出租序号:label2text影片序号:label3text顾客序号:label4text数暈label5text张:label6text折扣:label7text押金:label8text职员号:label9text出租影片管理:Button1text新顾客nameBtLogButton2text出租na
2、meBtHireButton3text还片nameBtReturnButton4text清除nameBtClearButton5text浏览nameBtBrowscButton6text返冋nameBtExittextBoxl显示“出租序号”textBox2显示“影片序号”textBox3显示“顾客序号”textBox6显示“数量”textBox7显示“折扣”textBoxS显示“押金”tcxlBox9显示“职员号”usingSystem.Data.OleDb;//必须手工引入OleDbConnoctionconnc=newOleD
3、bConnectionO;//定义全局变量OleDbCommandcommc1=newOleDbCommand();//分别创建连个命令对象,DataAdapter对象和DataSet对象对Purchase(采购表)和Stock(库存表)进行操作OleDbCommandcommc2二newOleDbCommand();01eDbDataAdaptermyDAcl=newOleDbDataAdapter();01eDbDataAdaptermyDAc2=newOleDbDataAdapter();DataSetdsl=newDataS
4、et();DataSetds2=newDataSet();privatevoidStr()//自定义函数,创建连接字符串{stringconstr=/zProvider=Microsoft.Jet.OLEDB.4.0;/z;constr+="DataSource=FiImManager.mdb;,z;connc.ConnectionString=constr;corrnc.Open();commc1.Connection=connc;commc2.Connection=connc;}privatevoidClear0//自定义过程,
5、清空各文本框内容{this.textBoxl.Text=;this.textBox2.Text="";this.textBox3.Text二this.textBox6.Text=;this.textBox7.Text="";this.textBox8.Text二this.textBox9.Text="”;}privatevoidBtLog_Click(objectsender,EventArgse){//“新顾客”按钮的单击事件Customercs=newCustomer();//显示顾客筲理窗体cs.ShowDialogO;pri
6、vatevoidBtClear_Click(objectsender,EventAr^se){//“清除”按钮的单击事件ClearO;//调用口定义过程实现各文本框内容淸空privatevoidBtBrowerClick(objectsender,EventArgse){//“浏览”按钮的单击事件HireBhb=newHireBO;//调用出租影片管理浏览窗体hb.ShowDialogO;privatevoidBtExitClick(objectsender,EventArgse){//“返冋”按钮的单击事件this.CloseO;
7、privatevoidBtReturn_Click(objectsender,EventArgse){//“还片”按钮的单击事件Returnfrf=newReturnf();//显示“还片管理"窗体rf.ShowDialogO;}privatevoidBtHire_Click(objectsender,EventArgse)ififif(textBoxl.Text二二"”)(textBox2.Text=="”、(textBox3.Text二二"”)if(textBox6.Text==if(textBox7.Text==if(text
8、Box9.Text=={MessageBox.Show("“顾客序号”必填〃);return;}{MessageBox.Show("“影片序号”必填〃);return;}{MessageBox.Show("“出租序号”必填〃);ret
此文档下载收益归作者所有