示例#1
0
 public IActionResult Transfers(TransfersViewModel model)
 {
     if (model.SaveType == "partial")
     {
         model.VoyagerUserId = ckLoginUser_Id;
         PositionSetRes objPositionSetRes = positionMapping.SetTransfersDetails(model, ckUserName, token);
         var            objPosition       = objPositionSetRes.mPosition.FirstOrDefault();
         if (objPosition != null)
         {
             return(Json(new { objPositionSetRes.ResponseStatus, QRFID = objPosition.QRFID, PositionId = objPosition.PositionId, RoomDetailsInfo = objPosition.RoomDetailsInfo }));
         }
         else
         {
             return(Json(new { objPositionSetRes.ResponseStatus, QRFID = objPosition.QRFID, PositionId = objPosition.PositionId, RoomDetailsInfo = new List <RoomDetailsInfo>() }));
         }
     }
     else
     {
         model.VoyagerUserId = ckLoginUser_Id;
         IRequestCookieCollection objCookies = HttpContext.Request.Cookies;
         var            sessionData          = string.IsNullOrEmpty(HttpContext.Request.Cookies["VoyagerUser_Id"]) ? HttpContext.Session.GetComplexData <List <ProductAttributeDetails> >(SessionName) : null;
         PositionSetRes objPositionSetRes    = positionMapping.SetAllTransfersDetails(_configuration, token, model, objCookies, sessionData);
         objPositionSetRes.ResponseStatus.ErrorMessage = "Transfer Details " + objPositionSetRes.ResponseStatus.ErrorMessage;
         return(Json(new { objPositionSetRes.ResponseStatus }));
     }
 }