Esempio n. 1
0
 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));
     }
 }
Esempio n. 2
0
 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));
     }
 }