Example #1
0
        public async Task <int> ApproveQutations(ApproveQutationsVM obj)
        {
            try
            {
                // --First check the UserID is A moderator or SupperUser

                //--If User Valid then Approve the qutation
                return(await StdRepo.ExcuteStoredProcedureToSave <ApproveQutationsVM>(GlobalSPNames.ApproveQutationsSPName, obj));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
 public async Task <HttpResponseMessage> ApproveQutations(ApproveQutationsVM obj)
 {
     try
     {
         string username      = RequestContext.Principal.Identity.Name;
         string clientAddress = HttpContext.Current.Request.UserHostAddress;
         return(Request.CreateResponse(HttpStatusCode.OK, await corepo.ApproveQutations(obj)));
     }
     catch (Exception ex)
     {
         LogHelper.WriteLog(HttpContext.Current.Request, ex, RequestContext.Principal.Identity.Name);
         return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex));
     }
 }