private void tableDD_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (tableDD.SelectedIndex != -1)
     {
         RetrivalData.getOrderBill(Convert.ToInt32(tableDD.SelectedValue.ToString()), dataGridView1, ItemGV, QuantGV, amountGV, orderIDGV, totalAmountGV);
         BillLabel.Text  = Math.Round(Convert.ToDouble(dataGridView1.Rows[0].Cells["totalAmountGV"].Value.ToString()), 0).ToString();
         orderidTxt.Text = dataGridView1.Rows[0].Cells["orderIDGV"].Value.ToString();
     }
 }
 private void phoneTxt_Leave(object sender, EventArgs e)
 {
     if (phoneTxt.Text != "")
     {
         RetrivalData.getOrderBill(phoneTxt.Text, dataGridView1, ItemGV, QuantGV, amountGV, orderIDGV, totalAmountGV);
         BillLabel.Text  = Math.Round(Convert.ToDouble(dataGridView1.Rows[0].Cells["totalAmountGV"].Value.ToString()), 0).ToString();
         orderidTxt.Text = dataGridView1.Rows[0].Cells["orderIDGV"].Value.ToString();
     }
 }
示例#3
0
 private void phoneTxt_Leave(object sender, EventArgs e)
 {
     try
     {
         if (phoneTxt.Text != "")
         {
             RetrivalData.getOrderBill(phoneTxt.Text, dataGridView1, ItemGV, QuantGV, amountGV, orderIDGV, totalAmountGV);
             BillLabel.Text  = Math.Round(Convert.ToDouble(dataGridView1.Rows[0].Cells["totalAmountGV"].Value.ToString()), 0).ToString();
             orderidTxt.Text = dataGridView1.Rows[0].Cells["orderIDGV"].Value.ToString();
         }
     }
     catch (Exception)
     {
         MainClass.showMessage("No order found", "error");
     }
 }