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)); }