Connect to the Access database code, as well. Net4.0 version of the report query code

Source: Internet
Author: User
Tags access database

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.