public ActionResult CreateAdmin() { FinaceTool.Models.AMModel _AmDetails = new FinaceTool.Models.AMModel(); _AmDetails.CustomerList = BindDropdownAMDetails(); _AmDetails.duList = BindDropdownDUDetails(); _AmDetails.lobList = BindDropdownLobDetails(); _AmDetails.ProjectList = BindDropdownProjectDetails(); _AmDetails.serviceList = BindServiceLineDetails(); _AmDetails.ProductGroupList = BindDdlProductGroupDetails(); _AmDetails.DealStageList = BindDealStageDetails(); _AmDetails.SowStatusList = BindSowStatusDetails(); _AmDetails.AmUserList = BindAmUserDetails(); _AmDetails.OpportunityCategoryList = BindOpportunityCategoryDetails(); List <Quater> QuaterList = new List <Quater>(); var dbQuaterlist = financetoolentities.Quaters.Where(i => i.IsActive == true).ToList(); foreach (var quater in dbQuaterlist) { quater.QuaterName = quater.QuaterName + "_FC" + " ($K)"; QuaterList.Add(quater); } _AmDetails.Quaterlist = QuaterList; var AmDetailsModel = financetoolentities.Usp_GetAmMainDetails().OrderByDescending(item => item.S_No).ToList(); if (AmDetailsModel.Count == 0) { _AmDetails.S_No = 1; } else { _AmDetails.S_No = AmDetailsModel[0].S_No + 1; } return(View(_AmDetails)); }