コード例 #1
0
        public async Task <PositionDefMealSetRes> SetDefaultMealPlan(PositionDefMealSetReq objPositionDefMealSetReq, string ticket)
        {
            PositionDefMealSetRes objPositionDefMealSetRes = new PositionDefMealSetRes();

            objPositionDefMealSetRes = await serviceProxy.PostData(_configuration.GetValue <string>("ServicePosition:SetDefaultMealPlan"), objPositionDefMealSetReq, typeof(PositionDefMealSetRes), ticket);

            return(objPositionDefMealSetRes);
        }
コード例 #2
0
 public JsonResult SetDefaultMealPlan(PositionDefMealSetReq model)
 {
     PositionDefMealSetRes response = new PositionDefMealSetRes();
     model.UserName = ckUserEmailId;
     response = positionProviders.SetDefaultMealPlan(model, token).Result;
     if (response != null && response.ResponseStatus != null)
     {
         return Json(new { status = response.ResponseStatus.Status, msg = response.ResponseStatus.ErrorMessage });
     }
     else
     {
         return Json(new { status = "Error", msg = "Details not updated" });
     }
 }
コード例 #3
0
        public async Task <PositionDefMealSetRes> SetDefaultMealPlan([FromBody] PositionDefMealSetReq request)
        {
            var response = new PositionDefMealSetRes();

            try
            {
                if (!string.IsNullOrEmpty(request.QRFID))
                {
                    response = await _positionRepository.SetDefaultMealPlan(request);
                }
                else
                {
                    response.ResponseStatus.Status       = "Failure";
                    response.ResponseStatus.ErrorMessage = "QRFID can not be Zero.";
                }
            }
            catch (Exception ex)
            {
                response.ResponseStatus.Status       = "Failure";
                response.ResponseStatus.ErrorMessage = "An Error Occurs :- " + ex.Message;
            }
            return(response);
        }