public ActionResult Edit(int Id, Organization Org) { try { // TODO: Add update logic here if (Id > 0 && ModelState.IsValid) { Org.OrganizationID = Id; res = API_Organization.SaveOrganization(Org); if (res.Status) { return(RedirectToAction("Index")); } else { res.Data = Org; return(View(res)); } } else { return(View(res)); } } catch { return(View(res)); } }
public ActionResult Create(Organization Org) { try { if (ModelState.IsValid) { res = API_Organization.SaveOrganization(Org); if (res.Status) { return(RedirectToAction("Index")); } else { res.Data = Org; return(View(res)); } } else { res.Data = Org; return(View(res)); } } catch { return(View(res)); } }