コード例 #1
0
 public async Task <int> ChangeSupperUser(ChangeSupperUserVM obj)
 {
     try
     {
         return(await StdRepo.ExcuteStoredProcedureToSave <ChangeSupperUserVM>(GlobalSPNames.ChangeSupperUserSPName, obj));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #2
0
 public async Task <HttpResponseMessage> ChangeSupperUser(ChangeSupperUserVM obj)
 {
     try
     {
         string username      = RequestContext.Principal.Identity.Name;
         string clientAddress = HttpContext.Current.Request.UserHostAddress;
         return(Request.CreateResponse(HttpStatusCode.OK, await corepo.ChangeSupperUser(obj)));
     }
     catch (Exception ex)
     {
         LogHelper.WriteLog(HttpContext.Current.Request, ex, RequestContext.Principal.Identity.Name);
         return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex));
     }
 }