Esempio n. 1
0
 protected void gvxPaymentClinics_CustomUnboundColumnData(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewColumnDataEventArgs e)
 {
     if (e.Column.FieldName == "Total Required")
     {
         PaymentRepository paymentRepository = new PaymentRepository();
         e.Value = paymentRepository.GetAllCostTreatmentByClinicByPeriod(int.Parse(e.GetListSourceFieldValue("ClinicID").ToString()), txtDateFrom.Date, txtDateTo.Date);
     }
     else if (e.Column.FieldName == "Total Payed")
     {
         PaymentRepository paymentRepository = new PaymentRepository();
         e.Value = paymentRepository.GetAllPayedReceitsByClinicByPeriod(int.Parse(e.GetListSourceFieldValue("ClinicID").ToString()), txtDateFrom.Date, txtDateTo.Date);
     }
     else if (e.Column.FieldName == "Total Deserved")
     {
         e.Value = decimal.Parse(e.GetListSourceFieldValue("Total Required").ToString()) - decimal.Parse(e.GetListSourceFieldValue("Total Payed").ToString());
     }
 }