Ejemplo n.º 1
0
        public static IEnumerable <SelectListItem> GetAccountGroupItemList(short branchID)
        {
            var lstAccountGroup = new POSAccount.BusinessFactory.AccountGroupBO().GetList();

            var lstCoa = new POSAccount.BusinessFactory.ChartOfAccountBO().GetList(branchID).Select(x => new SelectListItem {
                Value = x.AccountCode, Text = x.Description
            }).ToList();



            if (lstAccountGroup == null)
            {
                return(null);
            }

            var selectList = lstAccountGroup.Select(c =>
                                                    new SelectListItem
            {
                Value = c.Code,
                Text  = c.Description
            }).ToList();

            selectList.AddRange(lstCoa);

            return(new SelectList(selectList, "Value", "Text"));
        }
Ejemplo n.º 2
0
        public static ChartOfAccount GetAccountType(string accountCode)
        {
            ChartOfAccount chartOfAccount = new ChartOfAccount();

            chartOfAccount.AccountCode = accountCode;
            chartOfAccount.BranchID    = Utility.SsnBranch;
            var accountType = new POSAccount.BusinessFactory.ChartOfAccountBO().GetChartOfAccount(chartOfAccount);

            return(accountType);
        }
Ejemplo n.º 3
0
        public static IEnumerable <SelectListItem> GetCashBankAccountList()
        {
            var countryList = new POSAccount.BusinessFactory.ChartOfAccountBO().GetCashBankAccountList();

            var selectList = countryList.Select(c =>
                                                new SelectListItem
            {
                Value = c.AccountCode,
                Text  = string.Format("{0} ({1})", c.AccountCode, c.Description)
            });

            return(new SelectList(selectList, "Value", "Text"));
        }
Ejemplo n.º 4
0
        public static IEnumerable <SelectListItem> GetAccountCodeItemList()
        {
            var lstaccountcode = new POSAccount.BusinessFactory.ChartOfAccountBO().GetList(SsnBranch);

            if (lstaccountcode == null)
            {
                return(null);
            }

            var selectList = lstaccountcode.Select(c =>
                                                   new SelectListItem
            {
                Value = c.AccountCode,
                Text  = c.Description
            });

            return(new SelectList(selectList, "Value", "Text"));
        }