public ActionResult CreateTax() { MainApplication mainapp = new MainApplication() { MainTaxMasters = new MainTaxMaster(), SubTaxMasters = new SubTaxMaster(), }; string mssgbox = string.Empty; MainTaxMaster maintax = _taxservice.getLastInsertedTax(); int catVal = 0; int length = 0; if (maintax != null) { catVal = maintax.Id; catVal = catVal + 1; length = catVal.ToString().Length; } else { catVal = 1; length = 1; } string vatCode = _utilityservice.getName("VAT", length, catVal); string stCode = _utilityservice.getName("SAT", length, catVal); string otcode = _utilityservice.getName("OTH", length, catVal); mainapp.MainTaxMasters.VAT = vatCode; mainapp.MainTaxMasters.SalesTax = stCode; mainapp.MainTaxMasters.OtherTax = otcode; mainapp.MainTaxMasters.CountryList = _countryservice.getallcountries(); //mainapp.userCredentialList = _IUserCredentialService.getUserCredentialListById(userId1); //mainapp.modulelist = _iIModuleService.getAllModules(); return(View(mainapp)); }
public void CreateTax(MainTaxMaster taxmaster) { _taxrepository.Add(taxmaster); _unitofwork.Commit(); }