/// <summary> /// 执行酒店订单异步通知指令,正值时成功,负值或0时失败 /// </summary> /// <param name="hint">指令内容</param> /// <returns>正值:成功 负值或0:失败</returns> public int ExecOrderHint(string hint) { int execResult = 0; if (string.IsNullOrEmpty(hint)) { return(0); } try { XElement xHotelOrderStatusNotifRQ = XElement.Parse(hint); var xOrderStatusMessage = Utils.GetXElement(xHotelOrderStatusNotifRQ, "OrderStatusMessage"); var xHotelReservationID = Utils.GetXElement(xOrderStatusMessage, "HotelReservationID"); var xStatus = Utils.GetXElement(xOrderStatusMessage, "Status"); string resOrderId = Utils.GetXAttributeValue(xHotelReservationID, "ResID_Value"); string currentStatusCode = Utils.GetXAttributeValue(xStatus, "CurrentStatusCode"); EyouSoft.HotelBI.HBEResStatus resStatus = (EyouSoft.HotelBI.HBEResStatus)Enum.Parse(typeof(EyouSoft.HotelBI.HBEResStatus), currentStatusCode); if (string.IsNullOrEmpty(resOrderId)) { return(-1); } execResult = this.SetOrderState(resOrderId, resStatus) ? 1 : -2; } catch { execResult = -1003; } return(execResult); }
/// <summary> /// 设置订单状态 /// </summary> /// <param name="resOrderId">订单号(航旅通接口)</param> /// <param name="orderState">订单状态</param> /// <returns></returns> public bool SetOrderState(string resOrderId, EyouSoft.HotelBI.HBEResStatus orderState) { if (string.IsNullOrEmpty(resOrderId)) { return(false); } return(dal.SetOrderState(resOrderId, orderState)); }