public void ShowPayment() { try { Label1.Visible = false; List <Payments> PatientdetailsList = patientManager.GetPatientDetails(txtBillNoSearch.Text); PaymentGridView.DataSource = PatientdetailsList.ToList(); PaymentGridView.DataBind(); foreach (var item in PatientdetailsList) { HiddenFieldBillNo.Value = item.BillNo.ToString(); lblBillDate.Text = item.BillDate.ToString(); lblTotalFee.Text = String.Format("{0:0.00}", item.TotalFee); lblPaid.Text = String.Format("{0:0.00}", item.PaidBill); lblDue.Text = String.Format("{0:0.00}", (item.TotalFee - item.PaidBill)); } } catch (Exception ex) { Label1.Visible = true; Label1.Text = ex.Message; Label1.ForeColor = System.Drawing.Color.Red; } }
public void LoadPayment() { string Id = txtStudentId.Text; PaymentGridView.DataSource = _TuitionFeesRepository.GetAllLastPaymentData(Id); PaymentGridView.DataBind(); }