コード例 #1
0
        private IEnumerable<PosMasterBiller> GetAllMasterBillers(GiveCashier cashierInfo)
        {
            var allCategories = _meteleService.GetBillPaymentCategoriesPos(cashierInfo).Select(cat => cat.Id);

            return GetMasterBillersByCategories(cashierInfo, allCategories.ToArray());
        }
コード例 #2
0
        private IEnumerable<PosMasterBiller> GetMasterBillersByCategories(GiveCashier cashierInfo, params string[] categoryIds)
        {
            var masterBillersResult = new List<PosMasterBiller>();

            foreach (var billPaymentCategoryId in categoryIds)
            {
                var masterBillersByCategory = _meteleService.GetBillersByCategoryPos(cashierInfo, billPaymentCategoryId).ToList();
                var posMasterBillers = masterBillersByCategory.UIMapTo<IEnumerable<MasterBiller>, IEnumerable<PosMasterBiller>>().ToList();

                posMasterBillers.ForEach(biller =>
                {
                    biller.PaymentOptions = _meteleService.GetBillerPaymentOptionsPos(cashierInfo, biller.Name);
                    biller.CategoryId = billPaymentCategoryId;
                });
                masterBillersResult.AddRange(posMasterBillers);
            }

            return masterBillersResult;
        }
コード例 #3
0
        private static Cashier GetMerchantDetails(Cashier cashier, GiveCashier cashierGeneralData)
        {
            try
            {
                cashier.MerchantProfileID = cashierGeneralData.catalogTemp_fk;

                cashier.MerchantTerminalID = cashierGeneralData.terminal_id;

                cashier.MerchantPassword = cashierGeneralData.mer_password;

                cashier.IsMerchant = cashier.Password == cashierGeneralData.mer_password;

                return cashier;
            }
            catch (Exception exception)
            {
                return null;
            }
        }