コード例 #1
0
 private void btnProceedOrderDet_Click(object sender, EventArgs e)
 {
     if (dgvviewtransactiondetails.CurrentRow.Cells[6].Value.ToString() == "Delivered")
     {
         MessageBox.Show("Already Delivered!!");
     }
     else if (dgvviewtransactiondetails.CurrentRow.Cells[6].Value.ToString() == "Walk-in Customer")
     {
         MessageBox.Show("Not Applicable for delivery!!");
     }
     else
     {
         //confirmation to delivery
         DialogResult result = MessageBox.Show("Continue Delivery?", "NOTE", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
         if (result == DialogResult.Yes)
         {
             gbOrderDetails.Hide();
             gbDelivery.Show();
             txtPreparedBy.Text = Form1.UserID.ToString();
             db.sp_customerDelivery(txtDeliveryNo.Text, txttransactionid.Text, null, txtPreparedBy.Text, null);
         }
         else
         {
             gbOrderDetails.Hide();
             gbDelivery.Show();
             txttransactionid.Text = "Transaction ID";
             txtDateOrdered.Text   = "Date Ordered";
             txtcusID.Text         = "Customer ID";
         }
     }
 }