/*        public static async Task<CashBook> GetCashBookByIdAndBranchIdAsync(IRestDataMapper mapper, long cusId, int branchId)
         *      {
         *          CashBook reds = new CashBook();
         *          if (mapper == null)
         *              return reds;
         *          string url = $"cashbook/api/v1/cashbooks/{cusId}/{branchId}";
         *          reds = await mapper.GetDataAsync<CashBook>(url);
         *          return reds;
         *      }
         *
         *      public static async Task<CashBook> GetCashBookByParamAndBranchIdAsync(IRestDataMapper mapper, string flag, string codeOrName, int branchId)
         *      {
         *          CashBook reds = new CashBook();
         *          if (mapper == null)
         *              return reds;
         *          string url = $"cashbook/api/v1/cashbooks/{flag}/{codeOrName}/{branchId}";
         *          reds = await mapper.GetDataAsync<CashBook>(url);
         *          return reds;
         *      }
         */
        #endregion

        #region Cheque Transaction Rest Services

        public static async Task <ChequeBook> CreateChequeBookAsync(IRestDataMapper mapper, ChequeBook data)
        {
            ChequeBook reds = new ChequeBook();

            if (mapper == null)
            {
                return(reds);
            }
            string url = "chequebook/api/v1/chequebooks";

            reds = await mapper.PostDataAsync(url, data);

            return(reds);
        }
Пример #2
0
        public static async Task <Bank> CreateBankAsync(IRestDataMapper mapper, Bank data)
        {
            Bank reds = new Bank();

            if (mapper == null)
            {
                return(reds);
            }
            string url = "bank/api/v1/banks";

            reds = await mapper.PostDataAsync(url, data);

            return(reds);
        }
        public static async Task <UnitOfMeasurement> CreateUnitOfMeasurementAsync(IRestDataMapper mapper, UnitOfMeasurement data)
        {
            UnitOfMeasurement reds = new UnitOfMeasurement();

            if (mapper == null)
            {
                return(reds);
            }
            string url = "item/api/v1/uoms";

            reds = await mapper.PostDataAsync(url, data);

            return(reds);
        }
Пример #4
0
        public static async Task <Supplier> CreateSupplierAsync(IRestDataMapper mapper, Supplier data)
        {
            Supplier reds = new Supplier();

            if (mapper == null)
            {
                return(reds);
            }
            string url = "supplier/api/v1/suppliers";

            reds = await mapper.PostDataAsync(url, data);

            return(reds);
        }
        public static async Task <ItemGroup> CreateItemGroupAsync(IRestDataMapper mapper, ItemGroup data)
        {
            ItemGroup reds = new ItemGroup();

            if (mapper == null)
            {
                return(reds);
            }
            string url = "item/api/v1/itemgroups";

            reds = await mapper.PostDataAsync(url, data);

            return(reds);
        }
        public static async Task <StoreInfor> CreateStoreInforAsync(IRestDataMapper mapper, StoreInfor data)
        {
            StoreInfor reds = new StoreInfor();

            if (mapper == null)
            {
                return(reds);
            }
            string url = "item/api/v1/itemstores";

            reds = await mapper.PostDataAsync(url, data);

            return(reds);
        }
Пример #7
0
        public static async Task <Customer> CreateCustomerAsync(IRestDataMapper mapper, Customer data)
        {
            Customer reds = new Customer();

            if (mapper == null)
            {
                return(reds);
            }
            string url = "customer/api/v1/customers";

            reds = await mapper.PostDataAsync(url, data);

            return(reds);
        }
Пример #8
0
        public static async Task <Purchase> CreatePurchaseAsync(IRestDataMapper mapper, Purchase data)
        {
            Purchase reds = new Purchase();

            if (mapper == null)
            {
                return(reds);
            }
            string url = "purchasing/api/v1/purchases";

            reds = await mapper.PostDataAsync(url, data);

            return(reds);
        }
        public static async Task <SaleItem> CreateSaleItemAsync(IRestDataMapper mapper, SaleItem data)
        {
            SaleItem reds = new SaleItem();

            if (mapper == null)
            {
                return(reds);
            }
            string url = "selling/api/v1/sales/item";

            reds = await mapper.PostDataAsync(url, data);

            return(reds);
        }
Пример #10
0
        public static async Task <BranchAccount> CreateBranchAccountAsync(IRestDataMapper mapper, BranchAccount data)
        {
            BranchAccount reds = new BranchAccount();

            if (mapper == null)
            {
                return(reds);
            }
            string url = "branch/api/v1/brancheacs";

            reds = await mapper.PostDataAsync(url, data);

            return(reds);
        }
        public static async Task <SaleInvoice> CreateSaleAsync(IRestDataMapper mapper, SaleInvoice data)
        {
            SaleInvoice reds = new SaleInvoice();

            if (mapper == null)
            {
                return(reds);
            }
            string url = "selling/api/v1/sales";

            reds = await mapper.PostDataAsync(url, data);

            return(reds);
        }
Пример #12
0
        public static async Task <SupplierCreditInvoice> updateSupplierCreditInvoiceAsync(IRestDataMapper mapper, SupplierCreditInvoice data)
        {
            SupplierCreditInvoice reds = new SupplierCreditInvoice();

            if (mapper == null)
            {
                return(reds);
            }
            string url = $"suppliercreditac/api/v1/suppliercri/{data.id}";

            reds = await mapper.PostDataAsync(url, data);

            return(reds);
        }
Пример #13
0
        public static async Task <SupplierCreditAccount> CreateSupplierCreditAccountAsync(IRestDataMapper mapper, SupplierCreditAccount data)
        {
            SupplierCreditAccount reds = new SupplierCreditAccount();

            if (mapper == null)
            {
                return(reds);
            }
            string url = "suppliercreditac/api/v1/suppliercac";

            reds = await mapper.PostDataAsync(url, data);

            return(reds);
        }
        public static async Task <User> CreateUserAsync(IRestDataMapper mapper, User data)
        {
            User reds = new User();

            if (mapper == null)
            {
                return(reds);
            }
            string url = "user/api/v1/users";

            reds = await mapper.PostDataAsync(url, data);

            return(reds);
        }
Пример #15
0
        public static async Task <CustomerCreditAccount> updateCustomerCreditAccountAsync(IRestDataMapper mapper, CustomerCreditAccount data)
        {
            CustomerCreditAccount reds = new CustomerCreditAccount();

            if (mapper == null)
            {
                return(reds);
            }
            string url = $"customercreditac/api/v1/customercac/{data.id}";

            reds = await mapper.PostDataAsync(url, data);

            return(reds);
        }