private void LoadEmptyTestGridView() { DataTable dataTable = new DataTable(); TypeWiseReportGridView.DataSource = dataTable; TypeWiseReportGridView.DataBind(); }
public void PopulatingGridView(List <TypeWiseReport> typeWiseReportList) { TypeWiseReportGridView.DataSource = typeWiseReportList; TypeWiseReportGridView.DataBind(); double amount = 0; foreach (TypeWiseReport typeWiseReport in typeWiseReportList) { amount = amount + typeWiseReport.TotalAmount; } totalAmountTextBox.Text = amount.ToString(); }
protected void showButton_Click(object sender, EventArgs e) { string toDate = toDateTextBox.Text; string fromDate = fromDateTextBox.Text; List <TypeWiseReport> aTypeWiseReports = aTypeWiseReportManager.GetAllTestTypeReports(toDate, fromDate); int totalMoney = 0; foreach (var item in aTypeWiseReports) { totalMoney += item.TotalAmount; } totalMoneyTextBox.Text = totalMoney.ToString(); TypeWiseReportGridView.DataSource = aTypeWiseReports; TypeWiseReportGridView.DataBind(); }
private void LoadTestGridView(string startDate, string endDate) { //throw new NotImplementedException(); List <UnpaidBillWiseModel> testWiseReportList = _unpaidBillWiseManager.UnpaidBillReport(startDate, endDate); if (testWiseReportList.Count != 0) { TypeWiseReportGridView.DataSource = testWiseReportList; TypeWiseReportGridView.DataBind(); //display pdf button PdfButton.Visible = true; //total items } else { TypeWiseReportGridView.DataSource = null; TypeWiseReportGridView.DataBind(); PdfButton.Visible = false; } }