public void BindGrid() { try { DataTable DT = new DataTable(); string FDT = ""; string[] DTF; DTF = TxtFDate.Text.ToString().Split('/'); FDT = TxtFDate.Text.ToString(); string[] DTT = TxtTDate.Text.ToString().Split('/'); DT = AST.AccountStatment(DTF[1].ToString(), DTT[1].ToString(), DTF[2].ToString(), DTT[2].ToString(), FDT, TxtTDate.Text.Trim(), TxtAccno.Text, TxtAccType.Text, Session["MID"].ToString(), Session["BRCD"].ToString(), ViewState["GL"].ToString(), TxtBRCD.Text); if (DT.Rows.Count > 0) { GrdAccountSTS.DataSource = DT; GrdAccountSTS.DataBind(); } else { WebMsgBox.Show("No Unclear Records Found...!!", this.Page); return; } } catch (Exception Ex) { ExceptionLogging.SendErrorToText(Ex); } }
public override void Start() { DoneFlag = false; Report.Init(this, 1, wsReportName); Report.PrintBlock(reportLvlStart); DataTable dt = new DataTable(); string FDT = ""; if (string.IsNullOrEmpty(wsFromDate)) { FDT = "01/01/1990"; } else { FDT = wsFromDate; } string[] DTF = FDT.ToString().Split('/'); string[] DTT = wsToDate.ToString().Split('/'); ClsAccountSTS AStmt = new ClsAccountSTS(); dt = AStmt.AccountStatment(DTF[1].ToString(), DTT[1].ToString(), DTF[2].ToString(), DTT[2].ToString(), FDT, wsToDate, wsAccNo, wsAccType, wsMRD, wsBRCD, wsGL, wsBRCD); //BRCD ADDED _ABHISHEK..BUT THIS RECHECK THE BRCD if (dt != null) { if (dt.Rows.Count != 0) { for (int i = 0; i < dt.Rows.Count; i++) { wsRptCrBal = 0; wsRptDrBal = 0; wsRptBal = 0; wsAccNumber = dt.Rows[i]["ACCNO"].ToString(); wsGLCode = dt.Rows[i]["SUBGLCODE"].ToString(); wsEDate = dt.Rows[i]["EDATE"].ToString(); wsInstNumber = dt.Rows[i]["INSTNO"].ToString(); wsPerticular = dt.Rows[i]["PARTI"].ToString(); wsCrBal = Math.Round(Convert.ToDouble(dt.Rows[i]["CREDIT"].ToString()), 2); wsDrBal = Math.Round(Convert.ToDouble(dt.Rows[i]["DEBIT"].ToString()), 2); wsBal = Math.Round(Convert.ToDouble(dt.Rows[i]["BALANCE"].ToString()), 2); ++wsRptTotal; wsRptCrBal = wsRptCrBal + wsCrBal; wsRptDrBal = wsRptDrBal + wsDrBal; wsRptBal = wsRptBal + wsBal; Report.PrintBlock(details); } } } Report.PrintBlock(reportLvlEnd); Report.Finalize(); DoneFlag = true; }