예제 #1
0
        public ResponseModel UpdatePriorityOrder(int selectedPriorityID, int currentPriorityID, int PriorityFor = 1)
        {
            ResponseModel objResponseModel = new ResponseModel();
            int           statusCode       = 0;
            string        statusMessage    = "";

            try
            {
                string       token        = Convert.ToString(Request.Headers["X-Authorized-Token"]);
                Authenticate authenticate = new Authenticate();
                authenticate = SecurityService.GetAuthenticateDataFromTokenCache(Cache, SecurityService.DecryptStringAES(token));

                MasterCaller _newMaster = new MasterCaller();

                bool iStatus = _newMaster.UpdatePriorityOrder(new PriorityService(Cache, Db), authenticate.TenantId, selectedPriorityID, currentPriorityID, PriorityFor);

                statusCode =
                    iStatus ?
                    (int)EnumMaster.StatusCode.Success : (int)EnumMaster.StatusCode.InternalServerError;

                statusMessage = CommonFunction.GetEnumDescription((EnumMaster.StatusCode)statusCode);

                objResponseModel.Status       = true;
                objResponseModel.StatusCode   = statusCode;
                objResponseModel.Message      = statusMessage;
                objResponseModel.ResponseData = iStatus;
            }
            catch (Exception)
            {
                throw;
            }

            return(objResponseModel);
        }