private void btnSelectProduct_Click(object sender, EventArgs e)
        {
            try
            {
                if (txtProductQuantity.Text.ToString() != "")
                {
                    int s = Convert.ToInt32(txtProductQuantity.Text);
                    Supplier_Orders_Add sd = new Supplier_Orders_Add();

                    Globals.ProductID       = dgvProductList.SelectedRows[0].Cells[0].Value.ToString();
                    Globals.ProductName     = dgvProductList.SelectedRows[0].Cells[1].Value.ToString();
                    Globals.ProductQuantity = s;
                    Globals.ProductTypeName = dgvProductList.SelectedRows[0].Cells[4].Value.ToString();
                    sd.Refresh();
                }
                else if (txtProductQuantity.Text.ToString() == "")
                {
                    this.DialogResult = DialogResult.None;
                    MessageBox.Show("Enter quantity to place order");
                }
            }
            catch (Exception exception)
            {
                MessageBox.Show(exception.ToString());
            }
        }
        private void button14_Click_2(object sender, EventArgs e)
        {
            Supplier_Orders_Add so = new Supplier_Orders_Add();

            so.ShowDialog();
            Supplier_Orders s = new Supplier_Orders();

            s.Close();
        }
Пример #3
0
        private void btnSelectSupplier_Click(object sender, EventArgs e)
        {
            Supplier_Orders_Add sd = new Supplier_Orders_Add();

            Globals.SupplierID    = dgvSupplierList.SelectedRows[0].Cells[0].Value.ToString();
            Globals.SupplierName  = dgvSupplierList.SelectedRows[0].Cells[1].Value.ToString();
            Globals.SupplierEmail = dgvSupplierList.SelectedRows[0].Cells[2].Value.ToString();
            Globals.SupplierPhone = dgvSupplierList.SelectedRows[0].Cells[3].Value.ToString();

            sd.Refresh();
        }
        private void btnSelectSupplier_Click(object sender, EventArgs e)
        {
            Supplier_List list = new Supplier_List();

            list.ShowDialog();

            txtSupplierName.Text = Globals.SupplierName;
            txtEmailAddress.Text = Globals.SupplierEmail;
            txtTelephoneNo.Text  = Globals.SupplierPhone;

            if (txtSupplierName.Text != "" && txtEmailAddress.Text != "" && txtTelephoneNo.Text != "")
            {
                groupBox2.Enabled = true;
                dgvOrderProductList.EnableHeadersVisualStyles = true;
                btnPlace.Enabled = true;
            }
            Supplier_Orders_Add f = new Supplier_Orders_Add();

            f.Refresh();
        }
        private void Button14_Click_1(object sender, EventArgs e)
        {
            Supplier_Orders_Add supplier_Orders_Add = new Supplier_Orders_Add();

            supplier_Orders_Add.ShowDialog();
        }