public ActionResult CampaignInfoSection(ACM.Model.Campaign cmp) { ViewBag.disablecontrols = false; ACM.Model.Campaign campaign = new ACM.Model.Campaign(); campaign.CampaignId = Convert.ToInt32(cmp.CampaignId); var campaignInq = campaignServiceClient.CampaignInq(campaign); var campaigntypelist = campaignServiceClient.GetMasterDropDownDataforMasterTables("CampaignTypeId", "CampaignTypeName", "CampaignType"); ViewBag.campaigntypelist = new SelectList(campaigntypelist, "ID", "Name"); var loblist = campaignServiceClient.GetMasterDropDownDataforMasterTables("LOBId", "LOBName", "LOB"); ViewBag.loblist = new SelectList(loblist, "ID", "Name"); var primarypmlist = campaignServiceClient.GetMasterDropDownDataforMasterTables("UserID", "FirstName+ ' ' +LastName", "Users"); ViewBag.primarypmlist = new SelectList(primarypmlist, "ID", "Name"); var secondarypmlist = campaignServiceClient.GetMasterDropDownDataforMasterTables("UserID", "FirstName+ ' ' +LastName", "Users"); ViewBag.secondarypmlist = new SelectList(secondarypmlist, "ID", "Name"); var promobuttontypelist = campaignServiceClient.GetMasterDropDownDataforMasterTables("PromoButtonTypeId", "PromoButtonName", "PromoButton"); ViewBag.promobuttontypelist = new SelectList(promobuttontypelist, "ID", "Name"); var productplacementlist = campaignServiceClient.GetMasterDropDownDataforMasterTables("ProductPlacementId", "Description", "ProductPlacement"); ViewBag.productplacementlist = new SelectList(productplacementlist, "ID", "Name"); var supercategory = campaignServiceClient.GetMasterDropDownDataforMasterTables("SuperCategoryID", "SuperCategoryName", "SuperCategory"); ViewBag.supercategory = new SelectList(supercategory, "ID", "Name"); var campaignType = campaignServiceClient.GetMasterDropDownDataforMasterTables("SuperCategoryID", "SuperCategoryName", "SuperCategory"); ViewBag.supercategory = new SelectList(campaignType, "ID", "Name"); var campaignTableStatuslist = campaignServiceClient.GetMasterDropDownDataforMasterTables("CampaignTableStatusId", "CampaignTableStatusDescription", "CampaignTableStatus"); ViewBag.campaignTableStatuslist = new SelectList(campaignTableStatuslist, "ID", "Name"); var category = campaignServiceClient.GetMasterDropDownDataforMasterTables("CategoryID", "CategoryName", "Category"); ViewBag.category = new SelectList(category, "ID", "Name"); if (campaignInq != null) { if (campaignInq.CategoryId != null) { ViewBag.categoryName = category.Find(x => x.ID == campaignInq.CategoryId).Name; } } var subcategory = campaignServiceClient.GetMasterDropDownDataforMasterTables("SubCategoryID", "SubCategoryName", "SubCategory"); ViewBag.subcategory = new SelectList(subcategory, "ID", "Name"); if (campaignInq != null) { if (campaignInq.SubCategoryId != null) { ViewBag.subCategoryName = subcategory.Find(x => x.ID == campaignInq.SubCategoryId).Name; } } var campaignTableStatusList = campaignServiceClient.GetMasterDropDownDataforMasterTables("CampaignTableStatusId", "CampaignTableStatusDescription", "CampaignTableStatus"); ViewBag.campaignTableStatusList = new SelectList(campaignTableStatusList, "ID", "Name"); var requestorlist = campaignServiceClient.GetMasterDropDownDataforMasterTables("UserID", "FirstName+ ' ' +LastName", "Users"); ViewBag.requestorlist = new SelectList(requestorlist, "ID", "Name"); var eventTrigger = campaignServiceClient.GetMasterDropDownDataforMasterTables("EventTriggerId", "EventTriggerName", "EventTrigger"); ViewBag.eventTrigger = new SelectList(eventTrigger, "ID", "Name"); // var campaign = cmpbo.GetCampaign(100); if (campaignInq == null) { campaignInq = new Model.Campaign(); CampaignTableStatu campaignTableStatu = new CampaignTableStatu(); campaignInq.CampaignTableStatu = campaignTableStatu; } if (campaignInq.CampaignTypeId != null) { var campaignTypeValue = campaigntypelist.Find(x => x.ID == campaignInq.CampaignTypeId); ViewBag.campaignTypeName = campaignTypeValue.Name; ViewBag.campaignTypeId = campaignInq.CampaignTypeId; } return(PartialView(campaignInq)); }