/// <summary> /// Adds the product Type. /// </summary> /// <param name="astrProductType">Type of the product.</param> /// <param name="ablnIsTaxable">if set to <c>true</c> [is taxable].</param> /// <returns></returns> private doProductType AddProductList(string astrProductType, bool ablnIsTaxable = false) { doProductType ldoProductType = new doProductType(); ldoProductType.product_type = astrProductType; ldoProductType.is_taxable = ablnIsTaxable; return(ldoProductType); }
/// <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); } } }