示例#1
0
 private void btnpurchasehistory_Click(object sender, EventArgs e)
 {
     this.Hide();
     Items.Purchase_History go = new Items.Purchase_History();
     go.MdiParent = this.ParentForm;
     go.Show();
 }
示例#2
0
        private void btnPurchaseHistory_Click(object sender, EventArgs e)
        {
            try
            {
                if (txtNewpQty.Text == "")
                {
                    MessageBox.Show("Please Insert Purchase Quantity");
                    txtNewpQty.Focus();
                }
                else
                {
                    insertpurchasehistory("OLD", Convert.ToDouble(txtNewpQty.Text), dtpurchaseDate.Text);
                    updatestockqty();

                    DialogResult result = MessageBox.Show("Purchase history hase been saved Successfully. \n\n Do you want to see Purchase history?", "Yes or No", MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button2);

                    if (result == DialogResult.Yes)
                    {
                        this.Hide();
                        Items.Purchase_History go = new Items.Purchase_History();
                        go.MdiParent = this.ParentForm;
                        go.Show();
                    }
                    else
                    {
                        // MessageBox.Show("", "Successful", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        btnPurchaseHistory.Enabled = false;
                    }
                }
            }
            catch
            {
            }
        }
示例#3
0
 private void purchaseHistoryToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (Application.OpenForms["Purchase_History"] == null)
     {
         Items.Purchase_History go = new Items.Purchase_History();
         go.MdiParent = this;
         go.Show();
     }
     else
     {
         MessageBox.Show(" Purchase History windows is already open");
     }
 }
 private void purchaseHistoryToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Items.Purchase_History go = new Items.Purchase_History();
     go.MdiParent = this;
     go.Show();
 }