⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 currentstuation.cs

📁 利用vs2008+sql2000开发的物资管理系统
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace login
{
    public partial class currentstuation : Form
    {
        public currentstuation()
        {
            InitializeComponent();
        }


        private void select_Click(object sender, EventArgs e)
        {
            String constr = "Data Source=localhost; Initial Catalog=WZGL_20052070;Integrated Security=true";
            SqlConnection scon = new SqlConnection(constr);

            SqlDataAdapter sa = new SqlDataAdapter();

            SqlCommand storescommand = new SqlCommand();
            string s="select o.pName,outquantity,nowquantity,outstoretime,storetime,o.storage,nowstorequantity from room r,outstore o,store s where o.pName=r.pName and o.storage=s.storage ";
            
            storescommand.CommandText = s;
            storescommand.Connection = scon;

            sa.SelectCommand = storescommand;

            DataSet ds = new DataSet();

            sa.Fill(ds, "admin");

            dataGridView1.DataSource = ds.Tables["admin"];
        }

        private void button1_Click(object sender, EventArgs e)
        {
            //MainFrm mainform = new MainFrm();
            //mainform.Show();
            //this.Hide();
            this.Close();
        }

        private void currentstuation_Load(object sender, EventArgs e)
        {

        }

 
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -