public ActionResult CommissionDetails(string id) { MainApplication model = new MainApplication(); model.userCredentialList = _IUserCredentialService.GetUserCredentialsByEmail(UserEmail); model.modulelist = _iIModuleService.getAllModules(); model.CompanyCode = CompanyCode; model.CompanyName = CompanyName; model.FinancialYear = FinancialYear; int Id = Decode(id); model.CommissionMasterDetails = _CommissionService.GetDetailsById(Id); model.CommissionProductList = _CommissionProductService.GetDetailsByCommCode(model.CommissionMasterDetails.CommissionCode); if (TempData["commissioncode"].ToString() != "") { string previouscommission = TempData["commissioncode"].ToString(); if (previouscommission != model.CommissionMasterDetails.CommissionCode) { ViewData["commissionchanged"] = previouscommission + " is replaced with " + model.CommissionMasterDetails.CommissionCode + " because " + previouscommission + " is acquired by another person"; } TempData["commissioncode"] = previouscommission; } return(View(model)); }