public ActionResult Edit([Bind(Include = "Id,Business,BusinessAddress,Phone,Fax,Website")] MemberDirectory memberDirectory) { if (ModelState.IsValid) { db.Entry(memberDirectory).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(memberDirectory)); }
public ActionResult Create([Bind(Include = "Id,Business,BusinessAddress,Phone,Fax,Website")] MemberDirectory memberDirectory) { if (ModelState.IsValid) { db.MemberDirectories.Add(memberDirectory); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(memberDirectory)); }
// GET: MemberDirectories/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } MemberDirectory memberDirectory = db.MemberDirectories.Find(id); if (memberDirectory == null) { return(HttpNotFound()); } return(View(memberDirectory)); }
public object GetDirectoryListSync(MemberSearch member) { dynamic MemberDirectorResult; List <object> MemberListResult = new List <object>(); if (string.IsNullOrEmpty(member.masterUID)) { member.masterUID = "0"; } try { MemberDirectory Result = MemberMaster.GetDirectoryListSync(Convert.ToInt32(member.masterUID), Convert.ToInt32(member.grpID), member.updatedOn); MemberDirectorResult = new { status = "0", message = "success", curDate = System.DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss"), Result }; } catch { MemberDirectorResult = new { status = "1", message = "An error occured. Please contact Administrator", curDate = System.DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss") }; } return(new { MemberDirectorResult }); }