public async Task <ActionResult> ManageServiceProvidersDetails(string CRN, string Param) { var CallDetailsModel = await _centerRepo.GetCallsDetailsById(CRN); CallDetailsModel.BrandList = new SelectList(_dropdown.BindBrand(CurrentUser.CompanyId), "Value", "Text"); CallDetailsModel.CategoryList = new SelectList(_dropdown.BindCategory(CurrentUser.CompanyId), "Value", "Text"); CallDetailsModel.SubCategoryList = new SelectList(_dropdown.BindSubCategory(CallDetailsModel.DeviceCategoryId), "Value", "Text"); CallDetailsModel.ProductList = new SelectList(_dropdown.BindProduct(CallDetailsModel.DeviceBrandId.ToString() + "," + CallDetailsModel.DeviceSubCategoryId.ToString()), "Value", "Text"); CallDetailsModel.ServiceTypeList = new SelectList(await CommonModel.GetServiceType(new FilterModel { CompId = CallDetailsModel.CompanyId, RefKey = CallDetailsModel.ClientId }), "Value", "Text"); CallDetailsModel.DeliveryTypeList = new SelectList(await CommonModel.GetDeliveryServiceType(new FilterModel { CompId = CallDetailsModel.CompanyId, RefKey = CallDetailsModel.ClientId }), "Value", "Text"); CallDetailsModel.CustomerTypeList = new SelectList(await CommonModel.GetLookup("Customer Type"), "Value", "Text"); CallDetailsModel.ConditionList = new SelectList(await CommonModel.GetLookup("Device Condition"), "Value", "Text"); CallDetailsModel.AddressTypelist = new SelectList(await CommonModel.GetLookup("Address"), "Value", "Text"); CallDetailsModel.LocationList = new SelectList(dropdown.BindLocationByPinCode(CallDetailsModel.PinNumber), "Value", "Text"); var providerList = dropdown.BindServiceProvider(CallDetailsModel.PinNumber, CRN); CallDetailsModel.CompLogo = CurrentUser.LogoUrl; if (Convert.ToBoolean(CallDetailsModel.IsRepeat)) { var prvList = providerList.Where(x => x.Value == CallDetailsModel.PrvProviderId.ToString()).ToList(); if (prvList != null) { CallDetailsModel.ProviderList = new SelectList(prvList, "Value", "Text"); } else { CallDetailsModel.ProviderList = new SelectList(dropdown.BindServiceProvider(CallDetailsModel.PinNumber, CRN), "Value", "Text"); } } else { CallDetailsModel.ProviderList = new SelectList(dropdown.BindServiceProvider(CallDetailsModel.PinNumber, CRN), "Value", "Text"); } CallDetailsModel.Param = Param; CallDetailsModel.Files = new List <ProviderFileModel>(); if (Param == "A") { if (CallDetailsModel.EmpId != null) { CallDetailsModel.Employee = await _empRepo.GetEmployeeById(CallDetailsModel.EmpId); } else { CallDetailsModel.Employee = new EmployeeModel(); } CallDetailsModel.StatusList = new SelectList(dropdown.BindCallAppointmentStatus("ASP"), "Value", "Text"); CallDetailsModel.AppointmentStatus = CallDetailsModel.ASPStatus; CallDetailsModel.Remarks = CallDetailsModel.AspRemark; } else { if (Param == "P") { CallDetailsModel.CStatus = 11; } CallDetailsModel.AppointmentStatus = CallDetailsModel.CStatus; CallDetailsModel.StatusList = new SelectList(dropdown.BindCallAppointmentStatus("Customer support"), "Value", "Text"); CallDetailsModel.Remarks = CallDetailsModel.CRemark; } if (CurrentUser.UserTypeName.ToLower().Contains("company")) { CallDetailsModel.IsCompany = true; } return(View(CallDetailsModel)); }