/// <summary> /// Gets the product list. /// </summary> /// <returns></returns> public void LoadDetailsFromFile() { //Get the Product list from the file List <string[]> llstProductType = ProductInventoryHelper.LoadFileData(ProductInventoryHelper.PRODUCT_TYPE_FILE_NAME); if (llstProductType != null) { //Create and fill Data object of Product Type foreach (string[] larrProductType in llstProductType) { doProductType ldoProductType = new doProductType(); ldoProductType.product_type = larrProductType[0]; ldoProductType.is_taxable = Convert.ToBoolean(larrProductType[1]); //Add to Product Type collection in order to get all the Product list in collection iclcProductType.Add(ldoProductType); } } }
/// <summary> /// Gets the Tax Rate Ref Details. /// </summary> /// <returns></returns> public void LoadDetailsFromFile() { //Get the Tax Rate Ref from the file List <string[]> llstTaxRateRef = ProductInventoryHelper.LoadFileData(ProductInventoryHelper.TAX_RATE_REF_FILE_NAME); if (llstTaxRateRef != null) { //Create and fill Data object of Tax Rate Ref foreach (string[] larrTaxRate in llstTaxRateRef) { doTaxRateRef ldoTaxRateRef = new doTaxRateRef(); ldoTaxRateRef.tax_year = Convert.ToInt32(larrTaxRate[0]); ldoTaxRateRef.tax_rate = Convert.ToDecimal(larrTaxRate[1]); ldoTaxRateRef.imported_rate = Convert.ToDecimal(larrTaxRate[2]); //Add to Tax Rate Ref collection in order to get all the Product list in collection iclcTaxRateRef.Add(ldoTaxRateRef); } } }
/// <summary> /// Gets the product list. /// </summary> /// <returns></returns> public void LoadDetailsFromFile() { //Get the Product list from the file List <string[]> llstProductList = ProductInventoryHelper.LoadFileData(ProductInventoryHelper.PRODUCT_LIST_FILE_NAME); if (llstProductList != null) { foreach (string[] larrProduct in llstProductList) { //Create and fill Data object of Product List doProductList ldoProductList = new doProductList(); ldoProductList.code = larrProduct[1]; ldoProductList.name = larrProduct[2]; ldoProductList.category_type = larrProduct[3]; ldoProductList.base_price = Convert.ToDecimal(larrProduct[4]); ldoProductList.is_imported = Convert.ToBoolean(larrProduct[5]); //Add to Product List collection in order to get all the Product list in collection iclcProductList.Add(ldoProductList); } } }