public IList <ACBankStatement_CustomEntity> GetPagedData(Int32 startRowIndex, Int32 pageSize, String sortExpression, String filterExpression)
        {
            IList <ACBankStatement_CustomEntity> aCBankStatement_CustomEntityList = new List <ACBankStatement_CustomEntity>();

            try
            {
                if (String.IsNullOrEmpty(sortExpression))
                {
                    sortExpression = "JournalID";
                }

                Int32 currentPage = Convert.ToInt32(startRowIndex / pageSize) + 1;
                //startRowIndex = Convert.ToInt32(  startRowIndex / pageSize) + 1;

                if (pageSize == -1)
                {
                    pageSize = 1000000000;
                }

                aCBankStatement_CustomEntityList = FCCACBankStatement_Custom.GetFacadeCreate().GetIL(pageSize, currentPage, sortExpression, filterExpression);

                if (aCBankStatement_CustomEntityList != null && aCBankStatement_CustomEntityList.Count > 0)
                {
                    totalRowCount = aCBankStatement_CustomEntityList[0].TotalRowCount;
                }
            }
            catch (Exception ex)
            {
            }

            return(aCBankStatement_CustomEntityList ?? new List <ACBankStatement_CustomEntity>());
        }
Example #2
0
        private void BuildLabel()
        {
            String fe = MergeAllString();
            IList <ACBankStatement_CustomEntity> lst = FCCACBankStatement_Custom.GetFacadeCreate().GetIL(1000000, 1, String.Empty, fe);

            if (lst != null && lst.Count > 0)
            {
                var resultDebit = (from s in lst
                                   where s.MDDebitCreditID == MasterDataConstants.MDDebitCredit.DEBIT
                                   select s.Amount).Sum(val => val);

                var resultCredit = (from s in lst
                                    where s.MDDebitCreditID == MasterDataConstants.MDDebitCredit.CREDIT
                                    select s.Amount).Sum(val => val);

                //lbltotalDebitAmount.Text = Math.Round(resultDebit, 2).ToString();
                //lbltotalCreditAmount.Text = Math.Round(resultCredit, 2).ToString();

                lbltotalBalance.Text = Math.Round((resultDebit - resultCredit), 2).ToString();
            }

            else
            {
                lbltotalBalance.Text = "0.00";
            }

            Int64    accountID = 0, activefiscalYearID = 0;
            DateTime fromDate, ToDate;

            if (ddlBankAccountID.Items.Count > 0)
            {
                String fe_account = SqlExpressionBuilder.PrepareFilterExpression("ACBankAccount." + ACAccountsHelper_CustomEntity.FLD_NAME_BankAccountID, ddlBankAccountID.SelectedValue.ToString(), SQLMatchType.Equal);
                IList <ACAccountsHelper_CustomEntity> lstAccountHelper = FCCACAccountsHelper_Custom.GetFacadeCreate().GetIL(1000, 1, fe_account);

                if (lstAccountHelper != null && lstAccountHelper.Count > 0)
                {
                    accountID = lstAccountHelper[0].AccountID;
                }
            }

            activefiscalYearID = MiscUtil.GetActiveFiscalYear();
            fromDate           = MiscUtil.ParseToDateTime(txtTransactionFromDate.Text.ToString());
            ToDate             = MiscUtil.ParseToDateTime(txtTransactionToDate.Text.ToString());

            IList <ACAccountOpenCloseBalance_CustomEntity> lstOpenClose = FCCACAccountOpenCloseBalance_Custom.GetFacadeCreate().GetIL(accountID, activefiscalYearID, fromDate, ToDate);

            if (lstOpenClose != null && lstOpenClose.Count > 0)
            {
                lblOpeningBalance.Text = Math.Round(lstOpenClose[0].OpenBalance, 2).ToString();
            }

            else
            {
                lblOpeningBalance.Text = "0.00";
            }
        }
Example #3
0
        private void BuildLabel()
        {
            String fe = MergeAllString();
            IList <ACBankStatement_CustomEntity> lst = FCCACBankStatement_Custom.GetFacadeCreate().GetIL(1000000, 1, String.Empty, fe);

            if (lst != null && lst.Count > 0)
            {
                var resultDebit = (from s in lst
                                   where s.MDDebitCreditID == MasterDataConstants.MDDebitCredit.DEBIT
                                   select s.Amount).Sum(val => val);

                var resultCredit = (from s in lst
                                    where s.MDDebitCreditID == MasterDataConstants.MDDebitCredit.CREDIT
                                    select s.Amount).Sum(val => val);

                //lbltotalDebitAmount.Text = Math.Round(resultDebit, 2).ToString();
                //lbltotalCreditAmount.Text = Math.Round(resultCredit, 2).ToString();



                lbltotalBalance.Text = Math.Round((resultDebit - resultCredit), 2).ToString();
                //lbltotalBalance.Text = MiscUtil.NumericCommaSeperatedFormat((resultDebit - resultCredit));
            }

            else
            {
                lbltotalBalance.Text = "0.00";
            }

            Int64    accountID = 0, activefiscalYearID = 0;
            DateTime fromDate, ToDate;

            if (hdEmpID.Value != "0")
            {
                accountID = Int64.Parse(hdEmpID.Value.ToString());
            }

            activefiscalYearID = MiscUtil.GetActiveFiscalYear();
            fromDate           = MiscUtil.ParseToDateTime(txtTransactionFromDate.Text.ToString());
            ToDate             = MiscUtil.ParseToDateTime(txtTransactionToDate.Text.ToString());

            IList <ACAccountOpenCloseBalance_CustomEntity> lstOpenClose = FCCACAccountOpenCloseBalance_Custom.GetFacadeCreate().GetIL(accountID, activefiscalYearID, fromDate, ToDate);

            if (lstOpenClose != null && lstOpenClose.Count > 0)
            {
                lblOpeningBalance.Text = Math.Round(lstOpenClose[0].OpenBalance, 2).ToString();
                //lblOpeningBalance.Text = MiscUtil.NumericCommaSeperatedFormat(lstOpenClose[0].OpenBalance);
            }

            else
            {
                lblOpeningBalance.Text = "0.00";
            }
        }