public ActionResult UpdateUser(FormCollection form) { string userID = base.Request.Form["idPhoto"]; ViewData["userID"] = userID; GetStories myGetStories = new GetStories(); var email = myGetStories.GetMothersEmail(Convert.ToInt16(userID)); //if (email =="") //{ // email = "Enter the email address"; //} ViewData["email"] = email.ToString(); string userName = base.Request.Form["userName"]; //ViewData["userName"] = userName; MothersHelpersSpecificList myMothersHelpersSpecificList = new MothersHelpersSpecificList(); myMothersHelpersSpecificList = myGetStories.GetMothersHelpersTypeSpecific(Convert.ToInt16(userID)); DropdownModel model = new DropdownModel(); GetLookups myGetLookups = new GetLookups(); Story myStory = new Story(); myStory.userName = userName; model = myGetLookups.GetMothersHelpersType(); for (int i = 0; i < myMothersHelpersSpecificList.mothersHelpersSpecificLists.Count; i++) { var x = myMothersHelpersSpecificList.mothersHelpersSpecificLists[i].MothersHelpersType; foreach (SelectListItem s in model.items) { if (s.Value == x) { s.Selected = true; } } } ViewData["MothersHelpersTypeData"] = model.items; myStory.MothersHelpersTypeCombo = model; return(View(myStory)); }
public ActionResult NewUser() { ViewBag.Message = "Your app description page."; DropdownModel model = new DropdownModel(); GetLookups myGetLookups = new GetLookups(); GetStories myGetStories = new GetStories(); MothersHelpersSpecificList myMothersHelpersSpecificList = new MothersHelpersSpecificList(); myMothersHelpersSpecificList = myGetStories.GetMothersHelpersTypeSpecific(0); Story myStory = new Story(); model = myGetLookups.GetMothersHelpersType(); myStory.MothersHelpersTypeCombo = model; return(View(myStory)); }
public response GetMothersHelpersTypeSpecific(int id) { GetStories myStories = new GetStories(); return(myStories.GetMothersHelpersTypeSpecific(id)); }