usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Windows.Forms;usingdata1;usingDA1;usingData5;usingDA5;namespaceconnect to the warehouse. admin { Public Partial classDenglu:form { PublicDenglu () {InitializeComponent (); } Private voidDenglu_load (Objectsender, EventArgs e) {List<zhucehoutaidata5> list =NewZhucehoutaida (). Select1 (); if(list!=NULL) { foreach(Zhucehoutaidata5 xinchlist) {COMBOBOX1.ITEMS.ADD (X.nicheng); } } } //Click the login button Private voidButton1_Click (Objectsender, EventArgs e) { stringnicheng=Combobox1.text; stringMima=TextBox1. Text; List<zhucehoutaidata5> list =NewZhucehoutaida (). Select (Nicheng,mima); if(List! =NULL) {MessageBox.Show ("Login Successful"); Cangkuguanli F=NewCangkuguanli (); This. Owner =F; F.windowstate= formwindowstate.maximized;//What's the meaning of this sentence? This. Visible =false; F.show (); } Else{MessageBox.Show ("Logon Failure"); } /*if (list = null) {foreach (Zhigongdata x in list) {Comb OBOX1.ITEMS.ADD (X.CNO); COMBOBOX2.ITEMS.ADD (X.zno); }} if (Combobox1.text = = Combobox1.items[0]. ToString () && Combobox2.text = = Combobox2.items[1]. ToString ()) {MessageBox.Show ("login Successful"); Cangkuguanli f = new Cangkuguanli (); This. Owner = f; F.windowstate = formwindowstate.maximized; What does this sentence mean? Visible = false; F.show (); } else {MessageBox.Show ("Login Failed"); }*/ } //When you click to register Private voidButton2_Click (Objectsender, EventArgs e) {Zhucejiemian F=NewZhucejiemian (); This. Visible =false; This. Owner =F; F.show (); } }}
. Query code for the Net4.0 report
usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Windows.Forms;usingdata1;usingDA1;usingData5;usingDA5;namespaceconnect to the warehouse. admin { Public Partial classDenglu:form { PublicDenglu () {InitializeComponent (); } Private voidDenglu_load (Objectsender, EventArgs e) {List<zhucehoutaidata5> list =NewZhucehoutaida (). Select1 (); if(list!=NULL) { foreach(Zhucehoutaidata5 xinchlist) {COMBOBOX1.ITEMS.ADD (X.nicheng); } } } //Click the login button Private voidButton1_Click (Objectsender, EventArgs e) { stringnicheng=Combobox1.text; stringMima=TextBox1. Text; List<zhucehoutaidata5> list =NewZhucehoutaida (). Select (Nicheng,mima); if(List! =NULL) {MessageBox.Show ("Login Successful"); Cangkuguanli F=NewCangkuguanli (); This. Owner =F; F.windowstate= formwindowstate.maximized;//What's the meaning of this sentence? This. Visible =false; F.show (); } Else{MessageBox.Show ("Logon Failure"); } /*if (list = null) {foreach (Zhigongdata x in list) {Comb OBOX1.ITEMS.ADD (X.CNO); COMBOBOX2.ITEMS.ADD (X.zno); }} if (Combobox1.text = = Combobox1.items[0]. ToString () && Combobox2.text = = Combobox2.items[1]. ToString ()) {MessageBox.Show ("login Successful"); Cangkuguanli f = new Cangkuguanli (); This. Owner = f; F.windowstate = formwindowstate.maximized; What does this sentence mean? Visible = false; F.show (); } else {MessageBox.Show ("Login Failed"); }*/ } //When you click to register Private voidButton2_Click (Objectsender, EventArgs e) {Zhucejiemian F=NewZhucejiemian (); This. Visible =false; This. Owner =F; F.show (); } }}
Connect to the Access database code, as well. Net4.0 version of the report query code