Exemplo n.º 1
0
        private void MDImainwnd_Load(object sender, EventArgs e)
        {
            try
            {
                int width = this.Width;
                label1.Location = new Point(width - 300, label1.Location.Y);
                dataGridViewRequirementlist.Location = new Point(width - 300, dataGridViewRequirementlist.Location.Y);
                dataGridViewRequirementlist.Update();
                string sqlqry = "select productdetails.itemname,SUM(productionorder.quantity) from productionorder,productdetails where productionorder.productID=productdetails.productID group by productdetails.itemname,productdetails.productID,productionorder.orderstatus having productionorder.orderstatus=0";
                //string sqlqry = "select distinct productdetails.itemname,SUM(productionorder.quantity),count(product.productID) from product,productionorder,productdetails where productionorder.productID=productdetails.productID and product.productID=productionorder.productID  group by product.salestatus,product.productID,productdetails.itemname,productdetails.productID,productionorder.orderstatus having productionorder.orderstatus=0 and product.salestatus='INSTOCK'";
                SqlDataReader dr = dbConnection.query(sqlqry);
                DataTable dt = new DataTable();
                dt.Load(dr);
                dataGridViewRequirementlist.DataSource = dt;
                Login lgn = new Login();
                lgn.ShowDialog();
                dataGridViewRequirementlist.Columns[0].HeaderText = "Product Name";
                dataGridViewRequirementlist.Columns[1].HeaderText = "Quantity Required";

            }
            catch
            {
            }
        }
Exemplo n.º 2
0
 private void logoutToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Login lgn = new Login();
     lgn.MdiParent = MDImainwnd.ActiveForm;
     lgn.Show();
 }