public List <DepatureInfo> GetGoAheadDeparturesDetails(string token, string QRFID) { List <DepatureInfo> lstDepatureInfo = new List <DepatureInfo>(); GoAheadGetReq goAheadGetReq = new GoAheadGetReq() { QRFID = QRFID }; HandoverGetRes res = handoverProviders.GetGoAheadDeparturesDetails(goAheadGetReq, token).Result; if (res.Depatures != null && res.Depatures.Count > 0) { lstDepatureInfo = res.Depatures.Select(a => new DepatureInfo { Confirmed_Date = a.Confirmed_Date, Confirmed_User = a.Confirmed_User, ConfirmMessage = a.ConfirmMessage, ConfirmStatus = a.ConfirmStatus, DepatureDate = a.DepatureDate, DepatureId = a.DepatureId, IsCreate = a.IsCreate, IsDeleted = a.IsDeleted, IsMaterialised = a.IsMaterialised, IsShowProcessing = false, OpsBookingNumber = a.OpsBookingNumber }).ToList(); } return(lstDepatureInfo); }
public AttachToMasterViewModel GetGoAhead(string token, GoAheadGetReq objGoAheadGetReq) { AttachToMasterViewModel model = new AttachToMasterViewModel(); GoAheadGetRes objGoAheadGetRes = new GoAheadGetRes(); try { model = GetSalesOfficerHeraderInfo(objGoAheadGetReq.QRFID, "AttachToMaster", token); objGoAheadGetRes = handoverProviders.GetGoAhead(objGoAheadGetReq, token).Result; if (objGoAheadGetRes != null) { model.GoAheadGetRes = objGoAheadGetRes; model.UserList = objGoAheadGetRes.UserSystemContactDetails.Select(a => new AttributeValues { AttributeValue_Id = a.VoygerContactId, Value = a.FirstName + " " + a.LastName, Flag = a.IsOperationDefault }).OrderBy(a => a.Value).ToList(); model.UserID = string.IsNullOrEmpty(objGoAheadGetRes.mGoAhead.OperationUserID) ? model.UserList.Where(a => a.Flag == true).FirstOrDefault().AttributeValue_Id : objGoAheadGetRes.mGoAhead.OperationUserID; model.UserName = string.IsNullOrEmpty(objGoAheadGetRes.mGoAhead.OperationUserName) ? model.UserList.Where(a => a.Flag == true).FirstOrDefault().Value : objGoAheadGetRes.mGoAhead.OperationUserName; CostsheetVersion objCostsheetVersion = objGoAheadGetRes.CostsheetVersion.Where(a => a.IsCurrentVersion == true).FirstOrDefault(); if (objCostsheetVersion != null) { model.VersionId = objCostsheetVersion.VersionId; model.QRFPriceId = objCostsheetVersion.QRFPriceId; } if (objGoAheadGetRes.mGoAhead.ConfirmationDeadline != null) { var dt = objGoAheadGetRes.mGoAhead.ConfirmationDeadline.Value; var day = dt.Day.ToString().Length == 1 ? "0" + dt.Day.ToString() : dt.Day.ToString(); var month = dt.Month.ToString().Length == 1 ? "0" + dt.Month.ToString() : dt.Month.ToString(); model.ConfirmationDT = day + "/" + month + "/" + dt.Year; } else { model.ConfirmationDT = null; } } else { objGoAheadGetRes = new GoAheadGetRes(); model.GoAheadGetRes = objGoAheadGetRes; model.UserList = new List <AttributeValues>(); model.UserID = ""; model.UserName = ""; model.VersionId = 0; model.QRFPriceId = ""; model.ConfirmationDT = null; } } catch (Exception ex) { objGoAheadGetRes = new GoAheadGetRes(); model.GoAheadGetRes = objGoAheadGetRes; model.UserList = new List <AttributeValues>(); model.UserID = ""; model.UserName = ""; model.VersionId = 0; model.QRFPriceId = ""; model.ConfirmationDT = null; } return(model); }
public async Task <HandoverGetRes> GetGoAheadDeparturesDetails(GoAheadGetReq goAheadGetReq, string ticket) { HandoverGetRes response = new HandoverGetRes(); response = await serviceProxy.PostData(_configuration.GetValue <string>("Handover:GetGoAheadDeparturesDetails"), goAheadGetReq, typeof(HandoverGetRes), ticket); return(response); }
public async Task <GoAheadSetRes> SendMailHandoverBooking(GoAheadGetReq goAheadGetReq, string ticket) { GoAheadSetRes objGoAheadSetRes = new GoAheadSetRes(); objGoAheadSetRes = await serviceProxy.PostData(_configuration.GetValue <string>("Handover:SendMailHandoverBooking"), goAheadGetReq, typeof(GoAheadSetRes), ticket); return(objGoAheadSetRes); }
public async Task <GetGoAheadDepatureRes> GetGoAheadDepature(GoAheadGetReq goAheadGetReq, string ticket) { GetGoAheadDepatureRes goAheadGetRes = new GetGoAheadDepatureRes(); goAheadGetRes = await serviceProxy.PostData(_configuration.GetValue <string>("Handover:GetGoAheadDepature"), goAheadGetReq, typeof(GetGoAheadDepatureRes), ticket); return(goAheadGetRes); }
public async Task <GoAheadNewDeptGetRes> GetGoAheadExistDepartures(GoAheadGetReq goAheadGetReq, string ticket) { GoAheadNewDeptGetRes objGoAheadNewDeptGetRes = new GoAheadNewDeptGetRes(); objGoAheadNewDeptGetRes = await serviceProxy.PostData(_configuration.GetValue <string>("Handover:GetGoAheadExistDepartures"), goAheadGetReq, typeof(GoAheadNewDeptGetRes), ticket); return(objGoAheadNewDeptGetRes); }
public GoAheadNewDeptGetRes GetGoAheadExistDepartures(GoAheadGetReq objGoAheadGetReq, string token) { GoAheadNewDeptGetRes model = new GoAheadNewDeptGetRes(); model = handoverProviders.GetGoAheadExistDepartures(objGoAheadGetReq, token).Result; model = model != null ? model : new GoAheadNewDeptGetRes(); return(model); }
public Materialisation GetGoAheadDepature(string token, GoAheadGetReq objGoAheadGetReq) { Materialisation model = new Materialisation(); GetGoAheadDepatureRes objGetGoAheadDepatureRes = new GetGoAheadDepatureRes(); try { objGetGoAheadDepatureRes = handoverProviders.GetGoAheadDepature(objGoAheadGetReq, token).Result; if (objGetGoAheadDepatureRes != null && objGetGoAheadDepatureRes.mGoAhead != null && objGetGoAheadDepatureRes.mGoAhead.Depatures != null && objGetGoAheadDepatureRes.mGoAhead.Depatures.Count > 0) { model.RoomInfo = objGetGoAheadDepatureRes.mGoAhead.Depatures[0].PassengerRoomInfo.Select(a => new ViewModels.RoomInfo { RoomCount = Convert.ToInt32(a.RoomCount), RoomTypeID = a.RoomTypeID, RoomTypeName = a.RoomTypeName, PaxCount = Convert.ToInt32(a.PaxCount) }).ToList(); int i = 0; model.ChildInfo = objGetGoAheadDepatureRes.mGoAhead.Depatures[0].ChildInfo.Select(a => new ViewModels.ChildInfo { Age = a.Age, ChildInfoId = a.ChildInfoId, Number = a.Number, Type = a.Type, IsDeleted = a.IsDeleted, SeqNo = i++ }).ToList(); if (model.ChildInfo == null || model.ChildInfo.Count == 0) { model.ChildInfo.Add(new ViewModels.ChildInfo { Age = 0, ChildInfoId = "", IsDeleted = false, Number = 0, SeqNo = 0, Type = "" }); model.ChildAgeList = new List <AttributeValues>(); } else { model.ChildAgeList = model.ChildInfo.Select(a => a.Age).Distinct().Select(a => new AttributeValues { AttributeValue_Id = a.ToString(), Value = a.ToString() }).ToList(); } model.ChildTypeList = objGetGoAheadDepatureRes.ChildTypeList; } else { model.RoomInfo = new List <ViewModels.RoomInfo>(); model.ChildInfo = new List <ViewModels.ChildInfo>(); } } catch (Exception ex) { } return(model); }
public GoAheadSetRes SendMailHandoverBooking(GoAheadGetReq request, string token) { GoAheadSetRes objGoAheadSetRes = new GoAheadSetRes(); try { objGoAheadSetRes = handoverProviders.SendMailHandoverBooking(request, token).Result; objGoAheadSetRes = objGoAheadSetRes != null ? objGoAheadSetRes : new GoAheadSetRes(); } catch (Exception ex) { Console.WriteLine(ex.Message); } return(objGoAheadSetRes); }
public async Task <GetGoAheadDepatureRes> GetGoAheadDepature([FromBody] GoAheadGetReq request) { var response = new GetGoAheadDepatureRes(); try { if (!string.IsNullOrEmpty(request?.QRFID)) { response = await _handoverRepository.GetGoAheadDepature(request); } else { response.ResponseStatus.Status = "Failure"; response.ResponseStatus.ErrorMessage = "QRF ID can not be Null/Zero."; } } catch (Exception ex) { response.ResponseStatus.Status = "Failure"; response.ResponseStatus.ErrorMessage = "An Error Occurs :- " + ex.Message; } return(response); }