zoukankan      html  css  js  c++  java
  • 连接Access数据库代码,以及.Net4.0版本的报表查询代码

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using data1;
    using DA1;
    using data5;
    using DA5;
    
    namespace 连接仓库.管理员
    {
        public partial class denglu : Form
        {
            public denglu()
            {
                InitializeComponent();
            }
    
            private void denglu_Load(object sender, EventArgs e)
            {
                
                List<zhucehoutaidata5> list = new zhucehoutaiDA().Select1();
                if (list!=null)
                {
                    foreach (zhucehoutaidata5 x in list)
                    {
                        comboBox1.Items.Add(x.Nicheng);    
                    }
                }
            }
            //点击登录按钮
            private void button1_Click(object sender, EventArgs e)
            {
                string nicheng=comboBox1.Text;
                string mima=textBox1 .Text ;
                List<zhucehoutaidata5> list = new zhucehoutaiDA().Select(nicheng,mima);
                if (list != null)
                {
                    MessageBox.Show("登录成功");
                    cangkuguanli f = new cangkuguanli();
                    this.Owner = f;
                    f.WindowState = FormWindowState.Maximized; //这句话什么意思
                    this.Visible = false;
                    f.Show();
                }
                else
                {
                    MessageBox.Show("登录失败");
                }
    
                
                /*if (list != null)
                {
                    foreach (zhigongdata x in list)
                    {
                        comboBox1.Items.Add(x.Cno);
                        comboBox2.Items.Add(x.Zno);
                    }
                   
                }
                if (comboBox1.Text == comboBox1.Items[0].ToString() && comboBox2.Text == comboBox2.Items[1].ToString())
                {
                    MessageBox.Show("登录成功");
                    cangkuguanli f = new cangkuguanli();
                    this.Owner = f;
                    f.WindowState = FormWindowState.Maximized; //这句话什么意思
                    this.Visible = false;  
                    f.Show();
                }
                else
                {
                    MessageBox.Show("登录失败");
                }*/
            }
            //当点击注册的时候
            private void button2_Click(object sender, EventArgs e)
            {
                zhucejiemian f = new zhucejiemian();
        
                this.Visible = false;
                this.Owner = f;
                f.Show();
            }
        }
    }

    .Net4.0报表的查询代码

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using data1;
    using DA1;
    using data5;
    using DA5;
    
    namespace 连接仓库.管理员
    {
        public partial class denglu : Form
        {
            public denglu()
            {
                InitializeComponent();
            }
    
            private void denglu_Load(object sender, EventArgs e)
            {
                
                List<zhucehoutaidata5> list = new zhucehoutaiDA().Select1();
                if (list!=null)
                {
                    foreach (zhucehoutaidata5 x in list)
                    {
                        comboBox1.Items.Add(x.Nicheng);    
                    }
                }
            }
            //点击登录按钮
            private void button1_Click(object sender, EventArgs e)
            {
                string nicheng=comboBox1.Text;
                string mima=textBox1 .Text ;
                List<zhucehoutaidata5> list = new zhucehoutaiDA().Select(nicheng,mima);
                if (list != null)
                {
                    MessageBox.Show("登录成功");
                    cangkuguanli f = new cangkuguanli();
                    this.Owner = f;
                    f.WindowState = FormWindowState.Maximized; //这句话什么意思
                    this.Visible = false;
                    f.Show();
                }
                else
                {
                    MessageBox.Show("登录失败");
                }
    
                
                /*if (list != null)
                {
                    foreach (zhigongdata x in list)
                    {
                        comboBox1.Items.Add(x.Cno);
                        comboBox2.Items.Add(x.Zno);
                    }
                   
                }
                if (comboBox1.Text == comboBox1.Items[0].ToString() && comboBox2.Text == comboBox2.Items[1].ToString())
                {
                    MessageBox.Show("登录成功");
                    cangkuguanli f = new cangkuguanli();
                    this.Owner = f;
                    f.WindowState = FormWindowState.Maximized; //这句话什么意思
                    this.Visible = false;  
                    f.Show();
                }
                else
                {
                    MessageBox.Show("登录失败");
                }*/
            }
            //当点击注册的时候
            private void button2_Click(object sender, EventArgs e)
            {
                zhucejiemian f = new zhucejiemian();
        
                this.Visible = false;
                this.Owner = f;
                f.Show();
            }
        }
    }
  • 相关阅读:
    hdu 母牛的故事 递推题
    并查集
    又是矩阵 Uva上的一道 经典题目
    poj 3233 矩阵幂取模
    electronvue + elementui构建桌面应用
    主板cmos 映射表
    高级配置与电源接口 acpi 简介
    警告不能读取 AppletViewer 属性文件的解决方法
    高级 Synth(转载)
    vbs 查看硬件信息代码
  • 原文地址:https://www.cnblogs.com/275147378abc/p/4604662.html
Copyright © 2011-2022 走看看