private void LoadCredits() { try { string custName = txtCustName.Text; string CustAccount = txtCustAccount.Text; DateTime fromdate = bll.ReturnDate(txtfromDate.Text.Trim(), 1); DateTime todate = bll.ReturnDate(txttoDate.Text.Trim(), 2); dataTable = datafile.GetCreditsToApprove(custName, CustAccount, fromdate, todate); if (dataTable.Rows.Count > 0) { MultiView1.ActiveViewIndex = 0; DataGrid1.Visible = true; DataGrid1.DataSource = dataTable; DataGrid1.CurrentPageIndex = 0; DataGrid1.DataBind(); //ShowMessage(".", false); } else { MultiView1.ActiveViewIndex = -1; ShowMessage("No Credits To Approve", true); } } catch (Exception ex) { throw ex; } }