Example #1
0
 public ActionResult Form(Sys_Organize model)
 {
     if (model.Id == 0)
     {
         var primaryKey = OrganizeService.Insert(model);
         return(primaryKey > 0 ? Success() : Error());
     }
     else
     {
         int row = OrganizeService.Update(model);
         return(row > 0 ? Success() : Error());
     }
 }
Example #2
0
 public IHttpActionResult GetOrganizeInfo(sys_organize entry)
 {
     try
     {
         OrganizeService os  = new OrganizeService();
         int             cnt = os.Update(entry);
         return(cnt > 0? Json(new { code = 1, msg = "ok" }): Json(new { code = 0, msg = "error" }));
     }
     catch (Exception e)
     {
         return(Json(new { code = 0, msg = e.Message }));
     }
 }