Esempio n. 1
0
 public async Task <IEnumerable <ShortUserVM> > GetAllusersForApproval(GetAllusersForApprovalVM obj)
 {
     try
     {
         return(await StdRepo.QueryStoredProcedure <GetAllusersForApprovalVM, ShortUserVM>(GlobalSPNames.GetAllusersForApprovalSPName, obj));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 public async Task <HttpResponseMessage> GetAllusersForApproval(GetAllusersForApprovalVM obj)
 {
     try
     {
         string username      = RequestContext.Principal.Identity.Name;
         string clientAddress = HttpContext.Current.Request.UserHostAddress;
         return(Request.CreateResponse(HttpStatusCode.OK, await corepo.GetAllusersForApproval(obj)));
     }
     catch (Exception ex)
     {
         LogHelper.WriteLog(HttpContext.Current.Request, ex, RequestContext.Principal.Identity.Name);
         return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex));
     }
 }