public ActionResult NotificationWizard(int?organizationID) { var model = new Notifications(); try { model.StatusId = 1; model.Statuses = DropDownListUtility.GetStatusList(model.StatusId); model.Programs = db.GetProgramDDL(Convert.ToInt32(Session["organizationID"])); model.NotificationTypes = db.GetNotificationTypes(); var types = model.NotificationTypes.ToList(); types.Remove(types.First(x => x.Value == "1")); types.Remove(types.First(x => x.Value == "2")); types.Remove(types.First(x => x.Value == "3")); types.Remove(types.First(x => x.Value == "4")); types.Remove(types.First(x => x.Value == "5")); types.Remove(types.First(x => x.Value == "6")); types.Remove(types.First(x => x.Value == "7")); model.NotificationTypes = types; List <Notifications> dtsource = MyGlobalNotificationsInitializer(); model.OrganizationID = Convert.ToInt32(Session["organizationID"]); } catch (Exception ex) { ViewBag.Message = ex.Message; } return(View(model)); }
public ActionResult NotificationDetails(int?id) { List <Notifications> dtsource = MyGlobalNotificationsInitializer(); Notifications edit = dtsource.FirstOrDefault(x => x.NotificationId == id); edit.Statuses = DropDownListUtility.GetStatusList(edit.StatusId); edit.NotificationTypes = db.GetNotificationTypes(); return(View("NotificationDetails", edit)); }
public ActionResult CreateProgram(int?organizationID) { var model = new Programs(); //string id = RouteData.Values["userID"].ToString(); List <Programs> dtsource = MyGlobalProgramsInitializer(); model.StatusId = 1; model.Statuses = DropDownListUtility.GetStatusList(model.StatusId); model.OrganizationID = Convert.ToInt32(Session["organizationID"]); return(View("_CreateProgramsPartial", model)); }
public ActionResult TrackDetails(int?id) { List <Programs> dtsource = MyGlobalProgramsInitializer(); Programs edit = dtsource.FirstOrDefault(x => x.ProgramId == id); edit.Statuses = DropDownListUtility.GetStatusList(edit.StatusId); ViewBag.organizationID = Session["organizationID"]; ViewBag.ProgramId = id; return(View(edit)); }
public ActionResult CampaignDetails(int?CampaignId) { List <Campaigns> dtsource = db.GetCampaigns(Convert.ToInt32(Session["organizationID"])); Campaigns edit = dtsource.FirstOrDefault(x => x.CampaignId == CampaignId); edit.Statuses = DropDownListUtility.GetStatusList(edit.StatusId.ToString()); ViewBag.organizationID = Session["organizationID"]; ViewBag.CampaignId = CampaignId; Session["CampaignId"] = CampaignId; return(View("CampaignDetails", edit)); }
public ActionResult CreateCampaign(int?organizationID, int?programID = null) { var model = new Campaigns(); List <Campaigns> dtsource = MyGlobalCampaignsInitializer(); model.Programs = db.GetProgramDDL(Convert.ToInt32(Session["organizationID"]), programID.ToString()); model.StatusId = 1; model.Statuses = DropDownListUtility.GetStatusList(model.StatusId); model.OrganizationID = organizationID; return(View("_CreateCampaignsPartial", model)); }
public ActionResult EditCampaign(int?id) { List <Campaigns> dtsource = MyGlobalCampaignsInitializer(); Campaigns edit = dtsource.FirstOrDefault(x => x.CampaignId == id); edit.Programs = db.GetProgramDDL(Convert.ToInt32(Session["organizationID"])); //edit.Statuses = GetStatusList(); edit.Statuses = DropDownListUtility.GetStatusList(edit.StatusId); if (Request.IsAjaxRequest()) { return(PartialView("_EditCampaignsPartial", edit)); } return(View(edit)); }
public ActionResult EditProgram(int?id) { List <Programs> dtsource = MyGlobalProgramsInitializer(); Programs edit = dtsource.FirstOrDefault(x => x.ProgramId == id); edit.Statuses = DropDownListUtility.GetStatusList(edit.StatusId); ViewBag.organizationID = Session["organizationID"]; ViewBag.ProgramId = id; if (Request.IsAjaxRequest()) { return(PartialView("_EditProgramsPartial", edit)); } return(View(edit)); }
public ActionResult CreateNotification(int?organizationID, int?campaignID = null) { var model = new Notifications(); model.StatusId = 1; model.Statuses = DropDownListUtility.GetStatusList(model.StatusId); model.NTypeId = 8; model.NotificationTypes = db.GetNotificationTypes(model.NTypeId.ToString()); model.Programs = db.GetProgramDDL(Convert.ToInt32(Session["organizationID"])); if (campaignID != null) { model.CampaignId = Convert.ToInt32(campaignID); } List <Notifications> dtsource = MyGlobalNotificationsInitializer(); model.OrganizationID = Convert.ToInt32(Session["organizationID"]); return(View("_CreateNotificationsPartial", model)); }
public ActionResult AddBoat(int?locationId) { var list = DropDownListUtility.GetSeasonDropDown("2"); //select second option by default; ViewData["seasonList"] = list; if (!SessionManager.checkCurrentUserType(UserType.MAINTENANCE_PERSON)) { return(new HttpStatusCodeResult(403)); } if (locationId != null && MainClass.Instance.getLocations().Find(v => v.id == locationId) != null) { ViewBag.locationId = (int)locationId; return(View(new BoatModel() { locationId = (int)locationId, locationList = BL.MainClass.Instance.getLocations() })); } return(View(new BoatModel() { locationList = BL.MainClass.Instance.getLocations() })); }
private IEnumerable <SelectListItem> GetPriceValues() { return(DropDownListUtility.GetPriceDropDown()); }