private void fnOpeningBalance(int intTrustMID, int intSchoolMID, int intLedgerID, string strToDate) { try { ApplicationResult objResult = new ApplicationResult(); GeneralLedgerBL objGLedgerBL = new GeneralLedgerBL(); if (Convert.ToString(intLedgerID) != "") { divlblBalance.Visible = true; objResult = objGLedgerBL.Select_OpeningBalanceForAccounting(intTrustMID, intSchoolMID, intLedgerID, strToDate); if (objResult != null) { if (objResult.resultDT.Rows.Count > 0) { lblCurrentBalance.Text = objResult.resultDT.Rows[0][0].ToString(); } else { lblCurrentBalance.Text = "0"; } } } else { divlblBalance.Visible = false; } } catch (Exception ex) { logger.Error("Error", ex); ClientScript.RegisterStartupScript(typeof(Page), "MessagePopUp", "<script>alert('Oops! There is some technical issue. Please Contact to your administrator.');</script>"); } }
public static string LoadBalance(int intTrustMID, int intSchoolID, int intLedgerID, string strToDate) { try { #region Bind Balance ApplicationResult objResult = new ApplicationResult(); GeneralLedgerBL objGLedgerBL = new GeneralLedgerBL(); objResult = objGLedgerBL.Select_OpeningBalanceForAccounting(intTrustMID, intSchoolID, intLedgerID, strToDate); if (objResult != null) { if (objResult.resultDT.Rows.Count > 0) { for (int i = 0; i < objResult.resultDT.Rows.Count; i++) { } } } string res = ""; res = DataSetToJSON(objResult.resultDT); return(res); #endregion } catch (Exception ex) { throw ex; } }