private void btnUpdate_Click(object sender, EventArgs e) { BillEntity en = new BillEntity(); BillRepo re = new BillRepo(); en.Id = txtTestNo.Text; en.Name = txtPatient.Text; en.Date = dtpDate.Value.ToString("yyyy-MM-dd"); en.Age = int.Parse(txtAge.Text); en.Sex = txtSex.Text; en.Time = dtpTime.Value.ToString("hh:mm tt"); en.Reference = txtReference.Text; re.UpdateOrders(en); }
private void View(string no) { BillRepo re = new BillRepo(); BillEntity en = re.Credentials(no); txtPatient.Text = en.Name; txtAge.Text = en.Age.ToString(); txtSex.Text = en.Sex; txtReference.Text = en.Reference; txtTests.Text = en.Tests; txtPrice.Text = en.Price; txtTotal.Text = en.Total; txtDiscount.Text = en.Discount; dtpDate.Text = en.Date; dtpTime.Text = en.Time; }