Ejemplo n.º 1
0
 [HttpPost]//, AuthorizeChecked, ValidateAntiForgeryToken
 public ActionResult Form(SD_FILTER_INFO model)
 {
     model.SD_FILTER_ALGO = HttpUtility.UrlDecode(model.SD_FILTER_ALGO, Encoding.Default);
     if (model.SD_FILTER_ID == 0)
     {
         try
         {
             var primaryKey = _ingroupService.Insert(model);
             _procLogService.Insert(new PDP_PROC_LOG()
             {
                 SD_ID           = primaryKey.SD_ID,
                 PROC_CAT_CODE   = _procLogService.InGroupCatCode(),
                 PROC_CONTENT_ID = primaryKey.SD_FILTER_ID.ToString(),
                 PROC_URL        = null,
                 START_TIME      = null,
                 END_TIME        = null,
                 PATIENT_ID      = null,
                 PROC_STAT_CODE  = 1
             });
             return(Success());
         }
         catch (Exception ex)
         {
             return(Error(ex.Message));
         }
     }
     else
     {
         var primaryKey = _ingroupService.EditOrUpdate(model);
         return(primaryKey >= 0 ? Success() : Error());
     }
 }
Ejemplo n.º 2
0
 public ActionResult Form(SD_FILTER_INFO model)
 {
     if (model.SD_FILTER_ID == 0)
     {
         var primaryKey = _ingroupService.Insert(model);
         return(primaryKey != null?Success() : Error());
     }
     else
     {
         var primaryKey = _ingroupService.EditOrUpdate(model);
         return(primaryKey >= 0 ? Success() : Error());
     }
 }