public ActionResult getMember(int?id) { List <Member> mem = mo.getAllMembers(); var member1 = mem.Find(x => x.Id.Equals(id)); return(Json(member1, JsonRequestBehavior.AllowGet)); }
public ActionResult Subscriptions() { if (Session["modules"] != null) { List <ModuleDetails> md = Session["modules"] as List <ModuleDetails>; ModuleDetails md1 = md.Find(x => x.Module.Equals("Membership")); ViewBag.Create = md1.Create; ViewBag.Edit = md1.Edit; ViewBag.Delete = md1.Delete; } List <Member> memdata = mOpt.getAllMembers(); List <Membership> mshOpt = memOpt.getAllMembership(); List <Subscriptions> sub1 = subs.getAllSubscriptions(); model.member = memdata; model.membrshp = mshOpt; model.subscription = sub1; return(View(model)); }
public ActionResult AssignClass() { if (Session["modules"] != null) { List <ModuleDetails> md = Session["modules"] as List <ModuleDetails>; ModuleDetails md1 = md.Find(x => x.Module.Equals("Training Schedule")); ViewBag.Module = md1.Module; ViewBag.Create = md1.Create; ViewBag.Edit = md1.Edit; ViewBag.Delete = md1.Delete; } List <ClassSubscriptions> list = classOpt.getAllClassSubs(); List <Member> memlist = memOpt.getAllMembers(); List <Classes> classlist = classOpt.getAllClasses(); model.classSubs = list; model.members = memlist; model.classlist = classlist; return(View(model)); }