public ActionResult Details(string id) { MainApplication model = new MainApplication() { SupplierDetails = new SupplierMaster(), SupplierBankDetails = new SupplierBankDetail(), }; int Id = Decode(id); model.ItemCategoryList = _itemcategoryservice.GetAllItemCategories(); model.userCredentialList = _IUserCredentialService.GetUserCredentialsByEmail(UserEmail); model.modulelist = _iIModuleService.getAllModules(); model.SupplierDetails = _suppliermasterservice.getById(Id); model.SupplierBankDetailList = _SupplierBankDetailService.GetDetailsFromBank(model.SupplierDetails.SupplierCode); model.CompanyCode = CompanyCode; model.CompanyName = CompanyName; model.FinancialYear = FinancialYear; string previoussupplier = TempData["suppliercode"].ToString(); if (previoussupplier != model.SupplierDetails.SupplierCode) { ViewData["supplierchanged"] = previoussupplier + " is replaced with " + model.SupplierDetails.SupplierCode + " because " + previoussupplier + " is acquired by another person"; } TempData["suppliercode"] = previoussupplier; return(View(model)); }
public ActionResult Edit() { MainApplication model = new MainApplication(); model.userCredentialList = _IUserCredentialService.GetUserCredentialsByEmail(UserEmail); model.modulelist = _iIModuleService.getAllModules(); model.CompanyCode = CompanyCode; model.CompanyName = CompanyName; model.FinancialYear = FinancialYear; model.CatalogueList = _CatalogueService.GetAll(); model.ItemCategoryList = _CategoryService.GetAllItemCategories(); return(View(model)); }
//CREATE BARCODE PRINTING public ActionResult BarcodePrinting() { DatabaseName = CompanyName + " " + FinancialYear; MainApplication model = new MainApplication(); model.userCredentialList = _IUserCredentialService.GetUserCredentialsByEmail(UserEmail); model.modulelist = _iIModuleService.getAllModules(); model.CompanyCode = CompanyCode; model.CompanyName = CompanyName; model.FinancialYear = FinancialYear; model.ItemCategoryList = _itemcategortservice.GetAllItemCategories(); model.ItemSubCategoryList = _itemsubcategoryservice.getSubCategory(); return(View(model)); }
public ActionResult Create() { MainApplication model = new MainApplication() { DesignDetails = new DesignMaster(), }; string designcode = generateCode(); int count = _DesignService.getDesignsByDesignCode(designcode); if (count == 0) { model.DesignDetails.DesignCode = designcode; } else { model.DesignDetails.DesignCode = Convert.ToString(designcode.Reverse()); } //CONCAT CATEGORYCODE AND CATEGORYNAME var namelist = _ItemCategoryService.GetAllItemCategories(); string categories = string.Empty; List <ItemCategory> catlist = new List <ItemCategory>(); foreach (var data in namelist) { ItemCategory catdata = new ItemCategory(); categories = data.ItemCategoryCode + " " + data.CategoryName; catdata.ItemCategoryCode = categories; catdata.CategoryName = data.CategoryName; catlist.Add(catdata); categories = string.Empty; } model.ItemCategoryList = catlist; model.userCredentialList = _IUserCredentialService.GetUserCredentialsByEmail(UserEmail); model.modulelist = _iIModuleService.getAllModules(); model.CompanyCode = CompanyCode; model.CompanyName = CompanyName; model.FinancialYear = FinancialYear; return(View(model)); }
public ActionResult Create() { DatabaseName = CompanyName + " " + FinancialYear; MainApplication model = new MainApplication(); model.ItemCategoryList = _itemcategoryService.GetAllItemCategories(); model.ItemSubCategoryList = _itemsubcategoryservice.getSubCategory(); model.CityList = _cityservice.getAllCities(); model.StateList = _StateService.getAllStates(); TempData["States"] = model.StateList; model.userCredentialList = _IUserCredentialService.GetUserCredentialsByEmail(UserEmail); model.modulelist = _iIModuleService.getAllModules(); model.CompanyCode = CompanyCode; model.CompanyName = CompanyName; model.FinancialYear = FinancialYear; return(View(model)); }
public ActionResult StockDistribution() { DatabaseName = CompanyName + " " + FinancialYear; MainApplication model = new MainApplication() { StockDistributionDetails = new StockDistribution(), }; //CREATE STOCK DISTRIBUTION CODE string year = FinancialYear; string[] yr = year.Split(' ', '-'); string FinYr = "/" + yr[2].Substring(2) + "-" + yr[6].Substring(2); string stockdistributioncode = string.Empty; var StkDisData = _stockdistributionservice.GetLastStockDisByFinYr(FinYr); int StkDisVal = 0; int length = 0; if (StkDisData != null) { stockdistributioncode = StkDisData.StockDistributionCode.Substring(3, 6); length = (Convert.ToInt32(stockdistributioncode) + 1).ToString().Length; StkDisVal = Convert.ToInt32(stockdistributioncode) + 1; } else { StkDisVal = 1; length = 1; } stockdistributioncode = _utilityservice.getName("SDS", length, StkDisVal); stockdistributioncode = stockdistributioncode + FinYr; model.StockDistributionDetails.StockDistributionCode = stockdistributioncode; TempData["PreviousStkDisNo"] = stockdistributioncode; model.GodownMasterList = _godownservice.GetGodownNames(); model.ShopList = _shopservice.GetAll(); model.ItemCategoryList = _itemcategoryservice.GetAllItemCategories(); model.userCredentialList = _IUserCredentialService.GetUserCredentialsByEmail(UserEmail); model.modulelist = _iIModuleService.getAllModules(); model.CompanyCode = CompanyCode; model.CompanyName = CompanyName; model.FinancialYear = FinancialYear; return(View(model)); }