コード例 #1
0
        private void btnproceed_Click(object sender, EventArgs e)
        {
            if (ProductID == "ProductID-0001")
            {
                ProdName = "Glass";
            }
            else if (ProductID == "ProductID-0002")
            {
                ProdName = "Around Tube Aluminum";
            }
            else
            {
                ProdName = "Stainless Tube Aluminum";
            }

            if (txttransactionid.Text != "Transaction ID" && txtDateOrdered.Text != "Date Ordered" && txtcusID.Text != "Customer ID")
            {
                db.sp_updateCusTransDetails(txttransactionid.Text, ProductID, "Pending");
                dgvDeliverditems.Rows.Add(ProductID, ProdName, Qty, txtdatetodeliver.Text);

                db.sp_CustomerDeliveryDetails(txtDeliveryNo.Text, txttransactionid.Text, ProductID, ProdName, int.Parse(Qty), dtpDate.Text);
                MessageBox.Show("Item is ready for delivery!", "NOTE", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                dgvProductDetails.Rows.Remove(dgvProductDetails.CurrentRow);
            }
            else
            {
                MessageBox.Show("You must fill up everything!", "NOTE", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }