protected void btnUpdateLink_Click(object sender, EventArgs e)
    {
        HotelInfoEXEntity _hotelinfoEXEntity = new HotelInfoEXEntity();

        _hotelinfoEXEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _hotelinfoEXEntity.LogMessages.Userid = UserSession.Current.UserAccount;
        _hotelinfoEXEntity.LogMessages.Username = UserSession.Current.UserDspName;
        _hotelinfoEXEntity.LogMessages.IpAddress = UserSession.Current.UserIP;

        _hotelinfoEXEntity.HotelInfoEXDBEntity = new List<HotelInfoEXDBEntity>();
        HotelInfoEXDBEntity hotelInfoEXDBEntity = new HotelInfoEXDBEntity();

        string hotelId = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["HotelID"].ToString())) ? null : ViewState["HotelID"].ToString();//酒店ID

        if (String.IsNullOrEmpty(hotelId))
        {
            messageContent.InnerHtml = "酒店联系信息保存失败,请选择酒店!";
            ScriptManager.RegisterStartupScript(this.UpdatePanel4, this.GetType(), "keyalert", "grLayout();", true);
            return;
        }

        //日间9点-18点   夜间  19点-8点
        string OrderVerifyTime = rdOrderVerifyTimeDay.Checked == true ? "000000000111111111100000" : "111111111000000000011111";//日/夜审
        string OrderVerifyType = rdOrderVerifyTypeFax.Checked == true ? "1" : "2";//审核方式

        string rdOrderVerifyLinkMan = txtOrderVerifyLinkMan.Text;//审核联系人
        string rdOrderVerifyLinkTel = txtOrderVerifyLinkTel.Text;//审核联系电话
        string rdOrderVerifyLinkFax = txtOrderVerifyLinkFax.Text;//审核联系传真
        string rdOrderVerifyRemark = this.txtOrderVerifyRemark.Value;//审核备注
        hotelInfoEXDBEntity.HotelID = hotelId;
        hotelInfoEXDBEntity.Type = "3";
        StringBuilder OrderVerifyLinkMan = new StringBuilder();
        for (int i = 0; i < OrderVerifyTime.Length; i++)
        {
            if (OrderVerifyTime[i].ToString() == "1")
            {
                OrderVerifyLinkMan.Append(txtOrderVerifyLinkMan.Text + "|");
            }
            else
            {
                OrderVerifyLinkMan.Append("|");
            }
        }

        StringBuilder OrderVerifyLinkTel = new StringBuilder();
        for (int i = 0; i < OrderVerifyTime.Length; i++)
        {
            if (OrderVerifyTime[i].ToString() == "1")
            {
                OrderVerifyLinkTel.Append(txtOrderVerifyLinkTel.Text + "|");
            }
            else
            {
                OrderVerifyLinkTel.Append("|");
            }
        }

        StringBuilder OrderVerifyLinkFax = new StringBuilder();
        for (int i = 0; i < OrderVerifyTime.Length; i++)
        {
            if (OrderVerifyTime[i].ToString() == "1")
            {
                OrderVerifyLinkFax.Append(txtOrderVerifyLinkFax.Text + "|");
            }
            else
            {
                OrderVerifyLinkFax.Append("|");
            }
        }

        hotelInfoEXDBEntity.LinkMan = (OrderVerifyLinkMan.ToString().Length > 0) ? OrderVerifyLinkMan.ToString().Substring(0, OrderVerifyLinkMan.Length - 1) : OrderVerifyLinkMan.ToString();
        hotelInfoEXDBEntity.LinkTel = (OrderVerifyLinkTel.ToString().Length > 0) ? OrderVerifyLinkTel.ToString().Substring(0, OrderVerifyLinkTel.Length - 1) : OrderVerifyLinkTel.ToString();
        hotelInfoEXDBEntity.LinkFax = (OrderVerifyLinkFax.ToString().Length > 0) ? OrderVerifyLinkFax.ToString().Substring(0, OrderVerifyLinkFax.Length - 1) : OrderVerifyLinkFax.ToString();
        hotelInfoEXDBEntity.Remark = rdOrderVerifyRemark;
        hotelInfoEXDBEntity.ExTime = OrderVerifyTime;
        hotelInfoEXDBEntity.ExMode = OrderVerifyType;
        hotelInfoEXDBEntity.Status = "1";
        hotelInfoEXDBEntity.CreateUser = UserSession.Current.UserDspName;
        hotelInfoEXDBEntity.UpdateUser = UserSession.Current.UserDspName;
        _hotelinfoEXEntity.HotelInfoEXDBEntity.Add(hotelInfoEXDBEntity);

        HotelInfoEXBP.SaveHotelInfoEX(_hotelinfoEXEntity);
        HotelInfoEXBP.InsertHotelEXHistory(_hotelinfoEXEntity);
        _hotelinfoEXEntity.HotelInfoEXDBEntity.Clear();
        messageContent.InnerHtml = "酒店联系信息保存成功!";
        ScriptManager.RegisterStartupScript(this.UpdatePanel4, this.GetType(), "keyalert", "BtnCompleteStyle();", true);
    }
    /// <summary>
    /// 从HotelEx 获取询房信息  --- Oracle
    /// </summary>
    /// <returns></returns>
    public DataRow GetHotelExInfo()
    {
        HotelInfoEXEntity _hotelinfoEXEntity = new HotelInfoEXEntity();

        _hotelinfoEXEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _hotelinfoEXEntity.LogMessages.Userid = UserSession.Current.UserAccount;
        _hotelinfoEXEntity.LogMessages.Username = UserSession.Current.UserDspName;
        _hotelinfoEXEntity.LogMessages.IpAddress = UserSession.Current.UserIP;

        _hotelinfoEXEntity.HotelInfoEXDBEntity = new List<HotelInfoEXDBEntity>();
        HotelInfoEXDBEntity hotelInfoEXDBEntity = new HotelInfoEXDBEntity();

        hotelInfoEXDBEntity.HotelID = this.HidPid.Value;//酒店ID
        _hotelinfoEXEntity.HotelInfoEXDBEntity.Add(hotelInfoEXDBEntity);

        DataSet dsResult = HotelInfoEXBP.SelectHotelInfoEX(_hotelinfoEXEntity).QueryResult;

        if (dsResult.Tables[0] != null && dsResult.Tables[0].Rows.Count > 0)
        {
            DataRow[] rows = dsResult.Tables[0].Select("type='" + 1 + "'");
            if (rows.Length > 0)
            {
                //this.EXHotelInfo.Value = "1";
                //this.EXLinkFax.Value = rows[0]["LinkFax"].ToString();
                //this.EXExTime.Value = rows[0]["EX_Time"].ToString();
                //this.EXExMode.Value = rows[0]["EX_Mode"].ToString();
                ViewState["EXHotelInfo"] = "1";
                ViewState["EXLinkFax"] = rows[0]["LinkFax"].ToString();
                ViewState["EXExTime"] = rows[0]["EX_Time"].ToString();
                ViewState["EXExMode"] = rows[0]["EX_Mode"].ToString();
                return rows[0];
            }
            else
            {
                //this.EXHotelInfo.Value = "0";
                //this.EXLinkFax.Value = "";
                //this.EXExTime.Value = "";
                //this.EXExMode.Value = "";
                ViewState["EXHotelInfo"] = "0";
                ViewState["EXLinkFax"] = "";
                ViewState["EXExTime"] = "";
                ViewState["EXExMode"] = "";
                return null;
            }
        }
        else
        {
            //this.EXHotelInfo.Value = "0";
            //this.EXLinkFax.Value = "";
            //this.EXExTime.Value = "";
            //this.EXExMode.Value = "";
            ViewState["EXHotelInfo"] = "0";
            ViewState["EXLinkFax"] = "";
            ViewState["EXExTime"] = "";
            ViewState["EXExMode"] = "";
            return null;
        }
    }
    /// <summary>
    /// 修改备注
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnEditEXInfo_Click(object sender, EventArgs e)
    {
        GetHotelExInfo();

        HotelInfoEXEntity _hotelinfoEXEntity = new HotelInfoEXEntity();

        _hotelinfoEXEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _hotelinfoEXEntity.LogMessages.Userid = UserSession.Current.UserAccount;
        _hotelinfoEXEntity.LogMessages.Username = UserSession.Current.UserDspName;
        _hotelinfoEXEntity.LogMessages.IpAddress = UserSession.Current.UserIP;

        _hotelinfoEXEntity.HotelInfoEXDBEntity = new List<HotelInfoEXDBEntity>();
        HotelInfoEXDBEntity hotelInfoEXDBEntity = new HotelInfoEXDBEntity();

        StringBuilder QueryRoomLinkMan = new StringBuilder();
        for (int i = 0; i < 23; i++)
        {
            QueryRoomLinkMan.Append(this.HotelEXLinkMan_txt.Text.TrimStart('(').TrimEnd(')') + "|"); //查房联系人
        }

        StringBuilder QueryRoomLinkTel = new StringBuilder();
        for (int i = 0; i < 23; i++)
        {
            QueryRoomLinkTel.Append(this.HotelEXLinkTel_txt.Text.TrimStart('(').TrimEnd(')') + "|");//查房联系电话
        }

        if (ViewState["EXHotelInfo"].ToString() != "0")
        {
            #region
            hotelInfoEXDBEntity.HotelID = this.HidPid.Value;//酒店ID
            hotelInfoEXDBEntity.Type = "1";
            hotelInfoEXDBEntity.LinkMan = QueryRoomLinkMan.ToString().TrimEnd('|');
            hotelInfoEXDBEntity.LinkTel = QueryRoomLinkTel.ToString().TrimEnd('|');
            hotelInfoEXDBEntity.LinkFax = ViewState["EXLinkFax"].ToString();
            hotelInfoEXDBEntity.Remark = this.HotelEXLinkRemark_txt.InnerHtml;
            hotelInfoEXDBEntity.ExTime = ViewState["EXExTime"].ToString();
            hotelInfoEXDBEntity.ExMode = ViewState["EXExMode"].ToString();
            hotelInfoEXDBEntity.Status = "1";
            hotelInfoEXDBEntity.CreateUser = UserSession.Current.UserAccount;
            hotelInfoEXDBEntity.UpdateUser = UserSession.Current.UserAccount;
            _hotelinfoEXEntity.HotelInfoEXDBEntity.Add(hotelInfoEXDBEntity);
            HotelInfoEXBP.UpdateHotelInfoEXByConsultRoom(_hotelinfoEXEntity);
            HotelInfoEXBP.InsertHotelEXHistory(_hotelinfoEXEntity);
            #endregion

        }
        else
        {

            #region
            hotelInfoEXDBEntity.HotelID = this.HidPid.Value;
            hotelInfoEXDBEntity.Type = "1";
            hotelInfoEXDBEntity.LinkMan = QueryRoomLinkMan.ToString().TrimEnd('|');
            hotelInfoEXDBEntity.LinkTel = QueryRoomLinkTel.ToString().TrimEnd('|');
            hotelInfoEXDBEntity.LinkFax = "";
            hotelInfoEXDBEntity.Remark = this.HotelEXLinkRemark_txt.InnerHtml;
            hotelInfoEXDBEntity.ExTime = "111110000000000000111111";
            hotelInfoEXDBEntity.ExMode = "1";
            hotelInfoEXDBEntity.Status = "1";
            hotelInfoEXDBEntity.CreateUser = UserSession.Current.UserAccount;
            hotelInfoEXDBEntity.UpdateUser = UserSession.Current.UserAccount;
            _hotelinfoEXEntity.HotelInfoEXDBEntity.Add(hotelInfoEXDBEntity);
            HotelInfoEXBP.InsertHotelInfoEX(_hotelinfoEXEntity);
            HotelInfoEXBP.InsertHotelEXHistory(_hotelinfoEXEntity);
            #endregion

        }

        this.HotelEXLinkMan_span.Text = this.HotelEXLinkMan_txt.Text;
        this.HotelEXLinkMan_txt.Text = this.HotelEXLinkMan_txt.Text;
        this.HotelEXLinkTel_span.Text = this.HotelEXLinkTel_txt.Text;
        this.HotelEXLinkTel_txt.Text = this.HotelEXLinkTel_txt.Text;

        this.HotelEXLinkRemark_span.InnerHtml = this.HotelEXLinkRemark_txt.InnerHtml;
        this.HotelEXLinkRemark_txt.InnerHtml = this.HotelEXLinkRemark_txt.InnerHtml;
        this.btnClearLock.Attributes["style"] = "display:''";
        this.SPANHotelEXLinkRemark.Attributes["style"] = "display:''";
        this.btnEditRemark.Attributes.Add("style", "display:none");
        this.TXTotelEXLinkRemark.Attributes.Add("style", "display:none");
        this.UpdatePanel8.Update();
        ScriptManager.RegisterStartupScript(this.UpdatePanel6, this.GetType(), "keyEditRemark", "BtnCompleteStyle();", true);
    }
    public static string EditEXInfoDetails(string hotelID, string linkman, string linktel, string remark)
    {
        try
        {
            DataRow rows = GetHotelExInfo(hotelID);

            HotelInfoEXEntity _hotelinfoEXEntity = new HotelInfoEXEntity();

            _hotelinfoEXEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
            _hotelinfoEXEntity.LogMessages.Userid = UserSession.Current.UserAccount;
            _hotelinfoEXEntity.LogMessages.Username = UserSession.Current.UserDspName;
            _hotelinfoEXEntity.LogMessages.IpAddress = UserSession.Current.UserIP;

            _hotelinfoEXEntity.HotelInfoEXDBEntity = new List<HotelInfoEXDBEntity>();
            HotelInfoEXDBEntity hotelInfoEXDBEntity = new HotelInfoEXDBEntity();

            StringBuilder QueryRoomLinkMan = new StringBuilder();
            for (int i = 0; i <= 23; i++)
            {
                QueryRoomLinkMan.Append(linkman.TrimStart('(').TrimEnd(')') + "|"); //查房联系人
            }

            StringBuilder QueryRoomLinkTel = new StringBuilder();
            for (int i = 0; i <= 23; i++)
            {
                QueryRoomLinkTel.Append(linktel.TrimStart('(').TrimEnd(')') + "|");//查房联系电话
            }

            if (rows != null)
            {
                #region
                hotelInfoEXDBEntity.HotelID = hotelID;//酒店ID
                hotelInfoEXDBEntity.Type = "1";
                hotelInfoEXDBEntity.LinkMan = QueryRoomLinkMan.ToString().TrimEnd('|');
                hotelInfoEXDBEntity.LinkTel = QueryRoomLinkTel.ToString().TrimEnd('|');
                hotelInfoEXDBEntity.LinkFax = rows["LinkFax"].ToString();
                hotelInfoEXDBEntity.Remark = remark;
                hotelInfoEXDBEntity.ExTime = rows["EX_Time"].ToString();
                hotelInfoEXDBEntity.ExMode = rows["EX_Mode"].ToString();
                hotelInfoEXDBEntity.Status = "1";
                hotelInfoEXDBEntity.CreateUser = UserSession.Current.UserAccount;
                hotelInfoEXDBEntity.UpdateUser = UserSession.Current.UserAccount;
                _hotelinfoEXEntity.HotelInfoEXDBEntity.Add(hotelInfoEXDBEntity);
                HotelInfoEXBP.UpdateHotelInfoEXByConsultRoom(_hotelinfoEXEntity);
                HotelInfoEXBP.InsertHotelEXHistory(_hotelinfoEXEntity);
                #endregion
            }
            else
            {
                #region
                hotelInfoEXDBEntity.HotelID = hotelID;
                hotelInfoEXDBEntity.Type = "1";
                hotelInfoEXDBEntity.LinkMan = QueryRoomLinkMan.ToString().TrimEnd('|');
                hotelInfoEXDBEntity.LinkTel = QueryRoomLinkTel.ToString().TrimEnd('|');
                hotelInfoEXDBEntity.LinkFax = "";
                hotelInfoEXDBEntity.Remark = remark;
                hotelInfoEXDBEntity.ExTime = "111110000000000000111111";
                hotelInfoEXDBEntity.ExMode = "1";
                hotelInfoEXDBEntity.Status = "1";
                hotelInfoEXDBEntity.CreateUser = UserSession.Current.UserAccount;
                hotelInfoEXDBEntity.UpdateUser = UserSession.Current.UserAccount;
                _hotelinfoEXEntity.HotelInfoEXDBEntity.Add(hotelInfoEXDBEntity);
                HotelInfoEXBP.InsertHotelInfoEX(_hotelinfoEXEntity);
                HotelInfoEXBP.InsertHotelEXHistory(_hotelinfoEXEntity);
                #endregion
            }

            return "{\"message\":\"success\",\"code\":200}";
        }
        catch (Exception ex)
        {
            return "{\"message\":\"fail\",\"code\":-1}";
        }
    }
    /// <summary>
    /// 从HotelEx 获取询房信息  --- Oracle
    /// </summary>
    /// <returns></returns>
    public static DataRow GetHotelExInfo(string hotelID)
    {
        HotelInfoEXEntity _hotelinfoEXEntity = new HotelInfoEXEntity();

        _hotelinfoEXEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _hotelinfoEXEntity.LogMessages.Userid = UserSession.Current.UserAccount;
        _hotelinfoEXEntity.LogMessages.Username = UserSession.Current.UserDspName;
        _hotelinfoEXEntity.LogMessages.IpAddress = UserSession.Current.UserIP;

        _hotelinfoEXEntity.HotelInfoEXDBEntity = new List<HotelInfoEXDBEntity>();
        HotelInfoEXDBEntity hotelInfoEXDBEntity = new HotelInfoEXDBEntity();

        hotelInfoEXDBEntity.HotelID = hotelID;//酒店ID
        _hotelinfoEXEntity.HotelInfoEXDBEntity.Add(hotelInfoEXDBEntity);

        DataSet dsResult = HotelInfoEXBP.SelectHotelInfoEX(_hotelinfoEXEntity).QueryResult;

        if (dsResult.Tables[0] != null && dsResult.Tables[0].Rows.Count > 0)
        {
            DataRow[] rows = dsResult.Tables[0].Select("type='" + 1 + "'");
            if (rows.Length > 0)
            {
                return rows[0];
            }
            else
            {
                return null;
            }
        }
        else
        {
            return null;
        }
    }
    public void BindHotelEXInfo()
    {
        if (!String.IsNullOrEmpty(hidHotelID.Value))
        {
            string strHotel = hidSaveHotelID.Value;
            MessageContent.InnerHtml = "";
            if (!strHotel.Contains("[") || !strHotel.Contains("]") || String.IsNullOrEmpty(strHotel))
            {
                ReSetControlVal();
                MessageContent.InnerHtml = GetLocalResourceObject("SelectError").ToString();
                return;
            }
            HotelInfoEXEntity _hotelinfoEXEntity = new HotelInfoEXEntity();

            _hotelinfoEXEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
            _hotelinfoEXEntity.LogMessages.Userid = UserSession.Current.UserAccount;
            _hotelinfoEXEntity.LogMessages.Username = UserSession.Current.UserDspName;
            _hotelinfoEXEntity.LogMessages.IpAddress = UserSession.Current.UserIP;

            _hotelinfoEXEntity.HotelInfoEXDBEntity = new List<HotelInfoEXDBEntity>();
            HotelInfoEXDBEntity hotelInfoEXDBEntity = new HotelInfoEXDBEntity();

            hotelInfoEXDBEntity.HotelID = hidHotelID.Value;//酒店ID
            _hotelinfoEXEntity.HotelInfoEXDBEntity.Add(hotelInfoEXDBEntity);
            DataSet dsResult = HotelInfoEXBP.SelectHotelInfoEX(_hotelinfoEXEntity).QueryResult;

            #region  房控查询联系方式
            DataRow[] dtQueryRoom = dsResult.Tables[0].Select("type='" + 1 + "'");
            if (dtQueryRoom.Length > 0)
            {
                //查房频率
                if (dtQueryRoom[0]["Ex_Mode"].ToString() == "1") { this.rdEveryDay.Checked = true; this.rdTwoDay.Checked = false; this.rdEver.Checked = false; }
                else if (dtQueryRoom[0]["Ex_Mode"].ToString() == "2") { this.rdEveryDay.Checked = false; this.rdTwoDay.Checked = true; this.rdEver.Checked = false; }
                else { this.rdEveryDay.Checked = false; this.rdTwoDay.Checked = false; this.rdEver.Checked = true; }
                //上线时间                                   111110000000000000111111
                if (dtQueryRoom[0]["Ex_Time"].ToString() == "111110000000001111111111") { this.rdOnLine14.Checked = true; this.rdOnLine18.Checked = false; }
                else { this.rdOnLine14.Checked = false; this.rdOnLine18.Checked = true; }
                //查询联系人
                this.txtQueryRoomLinkMan.Text = dtQueryRoom[0]["LINKMAN"].ToString() == "" ? "" : dtQueryRoom[0]["LINKMAN"].ToString().Split('|')[0].ToString();
                //查房联系电话
                this.txtQueryRoomLinkTel.Text = dtQueryRoom[0]["LINKTEL"].ToString() == "" ? "" : dtQueryRoom[0]["LINKTEL"].ToString().Split('|')[0].ToString();
                //查房传真
                this.txtQueryRoomLinkFax.Text = dtQueryRoom[0]["LINKFAX"].ToString() == "" ? "" : dtQueryRoom[0]["LINKFAX"].ToString().Split('|')[0].ToString();
                //查房备注
                this.txtQueryRoomRemark.InnerHtml = dtQueryRoom[0]["REMARK"].ToString();
            }
            #endregion

            #region  订单确认方式
            DataRow[] dtOrderAffirm = dsResult.Tables[0].Select("type='" + 2 + "'");
            if (dtOrderAffirm.Length > 0)
            {
                //日间传真
                this.txtOrderAffirmDayLinkFax.Text = dtOrderAffirm[0]["LINKFAX"].ToString() == "" ? "" : dtOrderAffirm[0]["LINKFAX"].ToString().Split('|')[9].ToString();
                //日间联系人
                this.txtOrderAffirmDayLinkMan.Text = dtOrderAffirm[0]["LINKMAN"].ToString() == "" ? "" : dtOrderAffirm[0]["LINKMAN"].ToString().Split('|')[9].ToString();
                //日间联系电话
                this.txtOrderAffirmDayLinkTel.Text = dtOrderAffirm[0]["LINKTEL"].ToString() == "" ? "" : dtOrderAffirm[0]["LINKTEL"].ToString().Split('|')[9].ToString();

                //夜间传真
                this.txtOrderAffirmNightLinkFax.Text = dtOrderAffirm[0]["LINKFAX"].ToString() == "" ? "" : dtOrderAffirm[0]["LINKFAX"].ToString().Split('|')[19].ToString();
                //夜间联系人
                this.txtOrderAffirmNightLinkMan.Text = dtOrderAffirm[0]["LINKMAN"].ToString() == "" ? "" : dtOrderAffirm[0]["LINKMAN"].ToString().Split('|')[19].ToString();
                //夜间联系电话
                this.txtOrderAffirmNightLinkTel.Text = dtOrderAffirm[0]["LINKTEL"].ToString() == "" ? "" : dtOrderAffirm[0]["LINKTEL"].ToString().Split('|')[19].ToString();

                //订单确认备注
                this.txtOrderAffirmRemark.InnerHtml = dtOrderAffirm[0]["REMARK"].ToString();
            }
            #endregion

            #region  订单审核方式
            DataRow[] dtOrderVerify = dsResult.Tables[0].Select("type='" + 3 + "'");
            if (dtOrderVerify.Length > 0)
            {
                //日/夜审
                if (dtOrderVerify[0]["Ex_Mode"].ToString() == "1") { this.rdOrderVerifyTypeFax.Checked = true; this.rdOrderVerifyTypeTel.Checked = false; }
                else { this.rdOrderVerifyTypeFax.Checked = false; this.rdOrderVerifyTypeTel.Checked = true; }
                //审核方式
                if (dtOrderVerify[0]["Ex_Time"].ToString() == "000000000111111111100000") { this.rdOrderVerifyTimeDay.Checked = true; this.rdOrderVerifyTimeNight.Checked = false; }
                else { this.rdOrderVerifyTimeDay.Checked = false; this.rdOrderVerifyTimeNight.Checked = true; }

                if (dtOrderVerify[0]["Ex_Time"].ToString() == "000000000111111111100000")
                {
                    //审核联系人
                    this.rdOrderVerifyLinkMan.Text = dtOrderVerify[0]["LINKMAN"].ToString() == "" ? "" : dtOrderVerify[0]["LINKMAN"].ToString().Split('|')[10].ToString();
                    //审核联系电话
                    this.rdOrderVerifyLinkTel.Text = dtOrderVerify[0]["LINKTEL"].ToString() == "" ? "" : dtOrderVerify[0]["LINKTEL"].ToString().Split('|')[10].ToString();
                    //审核联系传真
                    this.rdOrderVerifyLinkFax.Text = dtOrderVerify[0]["LINKFAX"].ToString() == "" ? "" : dtOrderVerify[0]["LINKFAX"].ToString().Split('|')[10].ToString();
                    //日间9点-18点   夜间  19点-8点
                    //string OrderVerifyTime = this.rdOrderVerifyTimeDay.Checked == true ? "000000000111111111100000" : "111111111000000000011111";//日/夜审
                }
                else
                {
                    //审核联系人
                    this.rdOrderVerifyLinkMan.Text = dtOrderVerify[0]["LINKMAN"].ToString() == "" ? "" : dtOrderVerify[0]["LINKMAN"].ToString().Split('|')[0].ToString();
                    //审核联系电话
                    this.rdOrderVerifyLinkTel.Text = dtOrderVerify[0]["LINKTEL"].ToString() == "" ? "" : dtOrderVerify[0]["LINKTEL"].ToString().Split('|')[0].ToString();
                    //审核联系传真
                    this.rdOrderVerifyLinkFax.Text = dtOrderVerify[0]["LINKFAX"].ToString() == "" ? "" : dtOrderVerify[0]["LINKFAX"].ToString().Split('|')[0].ToString();
                }
                //审核备注
                this.rdOrderVerifyRemark.InnerHtml = dtOrderVerify[0]["REMARK"].ToString();
            }
            #endregion
        }
    }
    public void SaveHotelExecuteInfo()
    {
        MessageContent.InnerHtml = "";
        if (!String.IsNullOrEmpty(hidHotelID.Value))
        {
            string strHotel = hidSaveHotelID.Value;
            MessageContent.InnerHtml = "";
            if (!strHotel.Contains("[") || !strHotel.Contains("]") || String.IsNullOrEmpty(strHotel))
            {
                ReSetControlVal();
                MessageContent.InnerHtml = GetLocalResourceObject("SelectError").ToString();
                return;
            }
            #region
            if (string.IsNullOrEmpty(this.txtQueryRoomLinkMan.Text))
            {
                ReSetControlVal();
                MessageContent.InnerHtml = "房控查询联系方式-查房联系人不能为空!";
                return;
            }
            if (string.IsNullOrEmpty(this.txtQueryRoomLinkTel.Text))
            {
                ReSetControlVal();
                MessageContent.InnerHtml = "房控查询联系方式-查房联系电话不能为空!";
                return;
            }
            #endregion

            #region
            if (string.IsNullOrEmpty(this.txtOrderAffirmDayLinkMan.Text))
            {
                ReSetControlVal();
                MessageContent.InnerHtml = "订单确认方式-日间联系人不能为空!";
                return;
            }
            if (string.IsNullOrEmpty(this.txtOrderAffirmDayLinkTel.Text))
            {
                ReSetControlVal();
                MessageContent.InnerHtml = "订单确认方式-日间联系电话不能为空!";
                return;
            }
            if (string.IsNullOrEmpty(this.txtOrderAffirmNightLinkMan.Text))
            {
                ReSetControlVal();
                MessageContent.InnerHtml = "订单确认方式-夜间联系人不能为空!";
                return;
            }
            if (string.IsNullOrEmpty(this.txtOrderAffirmNightLinkTel.Text))
            {
                ReSetControlVal();
                MessageContent.InnerHtml = "订单确认方式-夜间联系电话不能为空!";
                return;
            }
            #endregion

            #region
            if (string.IsNullOrEmpty(this.rdOrderVerifyLinkMan.Text))
            {
                ReSetControlVal();
                MessageContent.InnerHtml = "订单审核方式-审核联系人不能为空!";
                return;
            }
            if (rdOrderVerifyTypeFax.Checked)
            {
                if (string.IsNullOrEmpty(this.rdOrderVerifyLinkFax.Text))
                {
                    ReSetControlVal();
                    MessageContent.InnerHtml = "订单审核方式-审核联系传真不能为空!";
                    return;
                }
            }
            else
            {
                if (string.IsNullOrEmpty(this.rdOrderVerifyLinkTel.Text))
                {
                    ReSetControlVal();
                    MessageContent.InnerHtml = "订单审核方式-审核联系电话不能为空!";
                    return;
                }
            }
            #endregion

            if (!chkDaveValVaild())
            {
                ReSetControlVal();
                MessageContent.InnerHtml = GetLocalResourceObject("UpdateError911").ToString();
                return;
            }

            try
            {
                DataTable dtResultNum = GetHotelExNum();

                HotelInfoEXEntity _hotelinfoEXEntity = new HotelInfoEXEntity();

                _hotelinfoEXEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
                _hotelinfoEXEntity.LogMessages.Userid = UserSession.Current.UserAccount;
                _hotelinfoEXEntity.LogMessages.Username = UserSession.Current.UserDspName;
                _hotelinfoEXEntity.LogMessages.IpAddress = UserSession.Current.UserIP;

                _hotelinfoEXEntity.HotelInfoEXDBEntity = new List<HotelInfoEXDBEntity>();
                HotelInfoEXDBEntity hotelInfoEXDBEntity = new HotelInfoEXDBEntity();

                string hotelId = hidHotelID.Value;//酒店ID

                #region  房控查询联系方式
                string QueryRoomRate = "";//查房频率   1每天:2两天一次:3永不询房
                if (this.rdEveryDay.Checked)
                {
                    QueryRoomRate = "1";
                }
                else if (this.rdTwoDay.Checked)
                {
                    QueryRoomRate = "2";
                }
                else
                {
                    QueryRoomRate = "3";
                }
                string OnLine = this.rdOnLine14.Checked == true ? "111110000000001111111111" : "111110000000000000111111";//上线时间    14点   18点

                StringBuilder QueryRoomLinkMan = new StringBuilder();
                for (int i = 0; i <= 23; i++)
                {
                    QueryRoomLinkMan.Append(this.txtQueryRoomLinkMan.Text + "|"); //查房联系人   this.txtQueryRoomLinkMan.Text;
                }

                StringBuilder QueryRoomLinkTel = new StringBuilder();
                for (int i = 0; i <= 23; i++)
                {
                    QueryRoomLinkTel.Append(this.txtQueryRoomLinkTel.Text + "|");//查房联系电话  this.txtQueryRoomLinkTel.Text;
                }

                StringBuilder QueryRoomLinkFax = new StringBuilder();
                for (int i = 0; i <= 23; i++)
                {
                    QueryRoomLinkFax.Append(this.txtQueryRoomLinkFax.Text + "|");//查房联系传真  this.txtQueryRoomLinkFax.Text;
                }

                string QueryRoomRemark = this.txtQueryRoomRemark.Value;//查房备注

                hotelInfoEXDBEntity.HotelID = hotelId;
                hotelInfoEXDBEntity.Type = "1";
                //hotelInfoEXDBEntity.LinkMan = QueryRoomLinkMan.ToString().TrimEnd('|');
                //hotelInfoEXDBEntity.LinkTel = QueryRoomLinkTel.ToString().TrimEnd('|');
                //hotelInfoEXDBEntity.LinkFax = QueryRoomLinkFax.ToString().TrimEnd('|');
                hotelInfoEXDBEntity.LinkMan = (QueryRoomLinkMan.ToString().Length > 0) ? QueryRoomLinkMan.ToString().Substring(0, QueryRoomLinkMan.Length - 1) : QueryRoomLinkMan.ToString();
                hotelInfoEXDBEntity.LinkTel = (QueryRoomLinkTel.ToString().Length > 0) ? QueryRoomLinkTel.ToString().Substring(0, QueryRoomLinkTel.Length - 1) : QueryRoomLinkTel.ToString();
                hotelInfoEXDBEntity.LinkFax = (QueryRoomLinkFax.ToString().Length > 0) ? QueryRoomLinkFax.ToString().Substring(0, QueryRoomLinkFax.Length - 1) : QueryRoomLinkFax.ToString();

                hotelInfoEXDBEntity.Remark = QueryRoomRemark;
                hotelInfoEXDBEntity.ExTime = OnLine;
                hotelInfoEXDBEntity.ExMode = QueryRoomRate;
                hotelInfoEXDBEntity.Status = "1";
                hotelInfoEXDBEntity.CreateUser = UserSession.Current.UserDspName;
                hotelInfoEXDBEntity.UpdateUser = UserSession.Current.UserDspName;
                _hotelinfoEXEntity.HotelInfoEXDBEntity.Add(hotelInfoEXDBEntity);

                DataRow[] dtQueryRoom = dtResultNum.Select("type='" + 1 + "'");
                if (dtQueryRoom.Length > 0)
                {
                    HotelInfoEXBP.UpdateHotelInfoEX(_hotelinfoEXEntity);
                }
                else
                {
                    HotelInfoEXBP.InsertHotelInfoEX(_hotelinfoEXEntity);
                }
                //int result1 = HotelInfoEXBP.InsertHotelInfoEX(_hotelinfoEXEntity);
                //int result1 = HotelInfoEXBP.UpdateHotelInfoEX(_hotelinfoEXEntity);

                HotelInfoEXBP.InsertHotelEXHistory(_hotelinfoEXEntity);
                _hotelinfoEXEntity.HotelInfoEXDBEntity.Clear();
                #endregion

                #region 订单确认方式
                //日间9点-18点   夜间  19点-8点
                StringBuilder OrderAffirmLinkFax = new StringBuilder();
                string OrderAffirmDayLinkFax = this.txtOrderAffirmDayLinkFax.Text;//日间传真
                string OrderAffirmNightLinkFax = this.txtOrderAffirmNightLinkFax.Text;//夜间传真
                for (int i = 0; i <= 23; i++)
                {
                    if (i >= 9 && i <= 18)
                    {
                        OrderAffirmLinkFax.Append(this.txtOrderAffirmDayLinkFax.Text + "|");
                    }
                    else
                    {
                        OrderAffirmLinkFax.Append(this.txtOrderAffirmNightLinkFax.Text + "|");
                    }
                }

                StringBuilder OrderAffirmLinkMan = new StringBuilder();
                string OrderAffirmDayLinkMan = this.txtOrderAffirmDayLinkMan.Text;//日间联系人
                string OrderAffirmNightLinkMan = this.txtOrderAffirmNightLinkMan.Text;//夜间联系人
                for (int i = 0; i <= 23; i++)
                {
                    if (i >= 9 && i <= 18)
                    {
                        OrderAffirmLinkMan.Append(this.txtOrderAffirmDayLinkMan.Text + "|");
                    }
                    else
                    {
                        OrderAffirmLinkMan.Append(this.txtOrderAffirmNightLinkMan.Text + "|");
                    }
                }

                StringBuilder OrderAffirmLinkTel = new StringBuilder();
                string OrderAffirmDayLinkTel = this.txtOrderAffirmDayLinkTel.Text;//日间联系电话
                string OrderAffirmNightLinkTel = this.txtOrderAffirmNightLinkTel.Text;//夜间联系电话
                for (int i = 0; i <= 23; i++)
                {
                    if (i >= 9 && i <= 18)
                    {
                        OrderAffirmLinkTel.Append(this.txtOrderAffirmDayLinkTel.Text + "|");
                    }
                    else
                    {
                        OrderAffirmLinkTel.Append(this.txtOrderAffirmNightLinkTel.Text + "|");
                    }
                }
                string OrderAffirmRemark = this.txtOrderAffirmRemark.Value;//订单确认备注

                hotelInfoEXDBEntity.HotelID = hotelId;
                hotelInfoEXDBEntity.Type = "2";
                //hotelInfoEXDBEntity.LinkMan = OrderAffirmLinkMan.ToString().TrimEnd('|');
                //hotelInfoEXDBEntity.LinkTel = OrderAffirmLinkTel.ToString().TrimEnd('|');
                //hotelInfoEXDBEntity.LinkFax = OrderAffirmLinkFax.ToString().TrimEnd('|');

                hotelInfoEXDBEntity.LinkMan = (OrderAffirmLinkMan.ToString().Length > 0) ? OrderAffirmLinkMan.ToString().Substring(0, OrderAffirmLinkMan.Length - 1) : OrderAffirmLinkMan.ToString();
                hotelInfoEXDBEntity.LinkTel = (OrderAffirmLinkTel.ToString().Length > 0) ? OrderAffirmLinkTel.ToString().Substring(0, OrderAffirmLinkTel.Length - 1) : OrderAffirmLinkTel.ToString();
                hotelInfoEXDBEntity.LinkFax = (OrderAffirmLinkFax.ToString().Length > 0) ? OrderAffirmLinkFax.ToString().Substring(0, OrderAffirmLinkFax.Length - 1) : OrderAffirmLinkFax.ToString();

                hotelInfoEXDBEntity.Remark = QueryRoomRemark;
                hotelInfoEXDBEntity.ExTime = "111111111111111111111111";
                hotelInfoEXDBEntity.ExMode = "";
                hotelInfoEXDBEntity.Status = "1";
                hotelInfoEXDBEntity.CreateUser = UserSession.Current.UserDspName;
                hotelInfoEXDBEntity.UpdateUser = UserSession.Current.UserDspName;
                _hotelinfoEXEntity.HotelInfoEXDBEntity.Add(hotelInfoEXDBEntity);
                DataRow[] dtOrderAffirm = dtResultNum.Select("type='" + 2 + "'");
                if (dtOrderAffirm.Length > 0)
                {
                    HotelInfoEXBP.UpdateHotelInfoEX(_hotelinfoEXEntity);
                }
                else
                {
                    HotelInfoEXBP.InsertHotelInfoEX(_hotelinfoEXEntity);
                }

                //int result2 = HotelInfoEXBP.InsertHotelInfoEX(_hotelinfoEXEntity);
                //int result2 = HotelInfoEXBP.UpdateHotelInfoEX(_hotelinfoEXEntity);

                HotelInfoEXBP.InsertHotelEXHistory(_hotelinfoEXEntity);
                _hotelinfoEXEntity.HotelInfoEXDBEntity.Clear();
                #endregion

                #region  订单审核方式
                //日间9点-18点   夜间  19点-8点
                string OrderVerifyTime = this.rdOrderVerifyTimeDay.Checked == true ? "000000000111111111100000" : "111111111000000000011111";//日/夜审
                string OrderVerifyType = this.rdOrderVerifyTypeFax.Checked == true ? "1" : "2";//审核方式

                string rdOrderVerifyLinkMan = this.rdOrderVerifyLinkMan.Text;//审核联系人
                string rdOrderVerifyLinkTel = this.rdOrderVerifyLinkTel.Text;//审核联系电话
                string rdOrderVerifyLinkFax = this.rdOrderVerifyLinkFax.Text;//审核联系传真

                string rdOrderVerifyRemark = this.rdOrderVerifyRemark.Value;//审核备注

                hotelInfoEXDBEntity.HotelID = hotelId;
                hotelInfoEXDBEntity.Type = "3";
                StringBuilder OrderVerifyLinkMan = new StringBuilder();
                for (int i = 0; i < OrderVerifyTime.Length; i++)
                {
                    if (OrderVerifyTime[i].ToString() == "1")
                    {
                        OrderVerifyLinkMan.Append(this.rdOrderVerifyLinkMan.Text + "|");
                    }
                    else
                    {
                        OrderVerifyLinkMan.Append("|");
                    }
                }

                StringBuilder OrderVerifyLinkTel = new StringBuilder();
                for (int i = 0; i < OrderVerifyTime.Length; i++)
                {
                    if (OrderVerifyTime[i].ToString() == "1")
                    {
                        OrderVerifyLinkTel.Append(this.rdOrderVerifyLinkTel.Text + "|");
                    }
                    else
                    {
                        OrderVerifyLinkTel.Append("|");
                    }
                }

                StringBuilder OrderVerifyLinkFax = new StringBuilder();
                for (int i = 0; i < OrderVerifyTime.Length; i++)
                {
                    if (OrderVerifyTime[i].ToString() == "1")
                    {
                        OrderVerifyLinkFax.Append(this.rdOrderVerifyLinkFax.Text + "|");
                    }
                    else
                    {
                        OrderVerifyLinkFax.Append("|");
                    }
                }

                //hotelInfoEXDBEntity.LinkMan = OrderVerifyLinkMan.ToString().TrimEnd('|');
                //hotelInfoEXDBEntity.LinkTel = OrderVerifyLinkTel.ToString().TrimEnd('|');
                //hotelInfoEXDBEntity.LinkFax = OrderVerifyLinkFax.ToString().TrimEnd('|');

                hotelInfoEXDBEntity.LinkMan = (OrderVerifyLinkMan.ToString().Length > 0) ? OrderVerifyLinkMan.ToString().Substring(0, OrderVerifyLinkMan.Length - 1) : OrderVerifyLinkMan.ToString();
                hotelInfoEXDBEntity.LinkTel = (OrderVerifyLinkTel.ToString().Length > 0) ? OrderVerifyLinkTel.ToString().Substring(0, OrderVerifyLinkTel.Length - 1) : OrderVerifyLinkTel.ToString();
                hotelInfoEXDBEntity.LinkFax = (OrderVerifyLinkFax.ToString().Length > 0) ? OrderVerifyLinkFax.ToString().Substring(0, OrderVerifyLinkFax.Length - 1) : OrderVerifyLinkFax.ToString();

                hotelInfoEXDBEntity.Remark = rdOrderVerifyRemark;
                hotelInfoEXDBEntity.ExTime = OrderVerifyTime;
                hotelInfoEXDBEntity.ExMode = OrderVerifyType;
                hotelInfoEXDBEntity.Status = "1";
                hotelInfoEXDBEntity.CreateUser = UserSession.Current.UserDspName;
                hotelInfoEXDBEntity.UpdateUser = UserSession.Current.UserDspName;
                _hotelinfoEXEntity.HotelInfoEXDBEntity.Add(hotelInfoEXDBEntity);
                DataRow[] dtOrderVerify = dtResultNum.Select("type='" + 3 + "'");
                if (dtOrderVerify.Length > 0)
                {
                    HotelInfoEXBP.UpdateHotelInfoEX(_hotelinfoEXEntity);
                }
                else
                {
                    HotelInfoEXBP.InsertHotelInfoEX(_hotelinfoEXEntity);
                }
                //int result3 = HotelInfoEXBP.InsertHotelInfoEX(_hotelinfoEXEntity);
                //int result3 = HotelInfoEXBP.UpdateHotelInfoEX(_hotelinfoEXEntity);

                HotelInfoEXBP.InsertHotelEXHistory(_hotelinfoEXEntity);
                _hotelinfoEXEntity.HotelInfoEXDBEntity.Clear();

                MessageContent.InnerHtml = "酒店执行信息保存成功!";

                #endregion
            }
            catch (Exception ex)
            {
                MessageContent.InnerHtml = "酒店执行信息保存失败!";
            }
        }
        else
        {
            SetSelectHotelControl();
        }
    }
    public DataTable GetHotelExNum()
    {
        HotelInfoEXEntity _hotelinfoEXEntity = new HotelInfoEXEntity();

        _hotelinfoEXEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _hotelinfoEXEntity.LogMessages.Userid = UserSession.Current.UserAccount;
        _hotelinfoEXEntity.LogMessages.Username = UserSession.Current.UserDspName;
        _hotelinfoEXEntity.LogMessages.IpAddress = UserSession.Current.UserIP;

        _hotelinfoEXEntity.HotelInfoEXDBEntity = new List<HotelInfoEXDBEntity>();
        HotelInfoEXDBEntity hotelInfoEXDBEntity = new HotelInfoEXDBEntity();

        hotelInfoEXDBEntity.HotelID = hidHotelID.Value;//酒店ID
        _hotelinfoEXEntity.HotelInfoEXDBEntity.Add(hotelInfoEXDBEntity);
        DataSet dsResult = HotelInfoEXBP.SelectHotelInfoEX(_hotelinfoEXEntity).QueryResult;

        return dsResult.Tables[0];
    }
    /// <summary>
    /// 修改备注
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnEditRemark_Click(object sender, EventArgs e)
    {
        GetHotelExInfo();

        System.IO.File.AppendAllText("C:\\ConsultLog\\" + UserSession.Current.UserAccount + "-Log.txt",
"\r\nLM联系人(btnAlertLink_Click)--修改计划EX信息--开始--时间:" + DateTime.Now.ToString() + DateTime.Now.Millisecond.ToString() + "\r\n", System.Text.Encoding.GetEncoding("GB2312"));

        HotelInfoEXEntity _hotelinfoEXEntity = new HotelInfoEXEntity();

        _hotelinfoEXEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _hotelinfoEXEntity.LogMessages.Userid = UserSession.Current.UserAccount;
        _hotelinfoEXEntity.LogMessages.Username = UserSession.Current.UserDspName;
        _hotelinfoEXEntity.LogMessages.IpAddress = UserSession.Current.UserIP;

        _hotelinfoEXEntity.HotelInfoEXDBEntity = new List<HotelInfoEXDBEntity>();
        HotelInfoEXDBEntity hotelInfoEXDBEntity = new HotelInfoEXDBEntity();

        StringBuilder QueryRoomLinkMan = new StringBuilder();
        for (int i = 0; i <= 23; i++)
        {
            QueryRoomLinkMan.Append(this.HotelEXLinkMan_txt.Text.TrimStart('(').TrimEnd(')') + "|"); //查房联系人
        }

        StringBuilder QueryRoomLinkTel = new StringBuilder();
        for (int i = 0; i <= 23; i++)
        {
            QueryRoomLinkTel.Append(this.HotelEXLinkTel_txt.Text.TrimStart('(').TrimEnd(')') + "|");//查房联系电话
        }

        if (this.EXHotelInfo.Value != "0")
        {
            System.IO.File.AppendAllText("C:\\ConsultLog\\" + UserSession.Current.UserAccount + "-Log.txt",
"LM联系人(btnAlertLink_Click)--修改计划EX信息--EXHotelInfo.Value==0(Update)--开始--时间:" + DateTime.Now.ToString() + DateTime.Now.Millisecond.ToString() + "\r\n", System.Text.Encoding.GetEncoding("GB2312"));

            #region
            hotelInfoEXDBEntity.HotelID = this.HidPid.Value;//酒店ID
            hotelInfoEXDBEntity.Type = "1";
            //hotelInfoEXDBEntity.LinkMan = QueryRoomLinkMan.ToString().TrimEnd('|');
            //hotelInfoEXDBEntity.LinkTel = QueryRoomLinkTel.ToString().TrimEnd('|');

            hotelInfoEXDBEntity.LinkMan = (QueryRoomLinkMan.ToString().Length > 0) ? QueryRoomLinkMan.ToString().Substring(0, QueryRoomLinkMan.Length - 1) : QueryRoomLinkMan.ToString();
            hotelInfoEXDBEntity.LinkTel = (QueryRoomLinkTel.ToString().Length > 0) ? QueryRoomLinkTel.ToString().Substring(0, QueryRoomLinkTel.Length - 1) : QueryRoomLinkTel.ToString();
            hotelInfoEXDBEntity.LinkFax = this.EXLinkFax.Value.ToString();
            hotelInfoEXDBEntity.Remark = this.HotelEXLinkRemark_txt.InnerHtml;
            hotelInfoEXDBEntity.ExTime = this.EXExTime.Value.ToString();
            hotelInfoEXDBEntity.ExMode = this.EXExMode.Value.ToString();
            hotelInfoEXDBEntity.Status = "1";
            hotelInfoEXDBEntity.CreateUser = UserSession.Current.UserAccount;
            hotelInfoEXDBEntity.UpdateUser = UserSession.Current.UserAccount;
            _hotelinfoEXEntity.HotelInfoEXDBEntity.Add(hotelInfoEXDBEntity);
            HotelInfoEXBP.UpdateHotelInfoEXByConsultRoom(_hotelinfoEXEntity);
            HotelInfoEXBP.InsertHotelEXHistory(_hotelinfoEXEntity);
            #endregion

            System.IO.File.AppendAllText("C:\\ConsultLog\\" + UserSession.Current.UserAccount + "-Log.txt",
"LM联系人(btnAlertLink_Click)--修改计划EX信息--EXHotelInfo.Value==0(Insert)--结束--时间:" + DateTime.Now.ToString() + DateTime.Now.Millisecond.ToString() + "\r\n", System.Text.Encoding.GetEncoding("GB2312"));
        }
        else
        {
            System.IO.File.AppendAllText("C:\\ConsultLog\\" + UserSession.Current.UserAccount + "-Log.txt",
"LM联系人(btnAlertLink_Click)--修改计划EX信息--EXHotelInfo.Value==0(Insert)--开始--时间:" + DateTime.Now.ToString() + DateTime.Now.Millisecond.ToString() + "\r\n", System.Text.Encoding.GetEncoding("GB2312"));

            #region
            hotelInfoEXDBEntity.HotelID = this.HidPid.Value;
            hotelInfoEXDBEntity.Type = "1";
            //hotelInfoEXDBEntity.LinkMan = QueryRoomLinkMan.ToString().TrimEnd('|');
            //hotelInfoEXDBEntity.LinkTel = QueryRoomLinkTel.ToString().TrimEnd('|');
            hotelInfoEXDBEntity.LinkMan = (QueryRoomLinkMan.ToString().Length > 0) ? QueryRoomLinkMan.ToString().Substring(0, QueryRoomLinkMan.Length - 1) : QueryRoomLinkMan.ToString();
            hotelInfoEXDBEntity.LinkTel = (QueryRoomLinkTel.ToString().Length > 0) ? QueryRoomLinkTel.ToString().Substring(0, QueryRoomLinkTel.Length - 1) : QueryRoomLinkTel.ToString();
            
            hotelInfoEXDBEntity.LinkFax = "";
            hotelInfoEXDBEntity.Remark = this.HotelEXLinkRemark_txt.InnerHtml;
            hotelInfoEXDBEntity.ExTime = "111110000000000000111111";
            hotelInfoEXDBEntity.ExMode = "1";
            hotelInfoEXDBEntity.Status = "1";
            hotelInfoEXDBEntity.CreateUser = UserSession.Current.UserAccount;
            hotelInfoEXDBEntity.UpdateUser = UserSession.Current.UserAccount;
            _hotelinfoEXEntity.HotelInfoEXDBEntity.Add(hotelInfoEXDBEntity);
            HotelInfoEXBP.InsertHotelInfoEX(_hotelinfoEXEntity);
            HotelInfoEXBP.InsertHotelEXHistory(_hotelinfoEXEntity);
            #endregion

            System.IO.File.AppendAllText("C:\\ConsultLog\\" + UserSession.Current.UserAccount + "-Log.txt",
"LM联系人(btnAlertLink_Click)--修改计划EX信息--EXHotelInfo.Value==0(Insert)--结束--时间:" + DateTime.Now.ToString() + DateTime.Now.Millisecond.ToString() + "\r\n", System.Text.Encoding.GetEncoding("GB2312"));
        }

        this.HotelEXLinkMan_span.Text = this.HotelEXLinkMan_txt.Text;
        this.HotelEXLinkMan_txt.Text = this.HotelEXLinkMan_txt.Text;
        this.HotelEXLinkTel_span.Text = this.HotelEXLinkTel_txt.Text;
        this.HotelEXLinkTel_txt.Text = this.HotelEXLinkTel_txt.Text;

        this.HotelEXLinkRemark_span.InnerHtml = this.HotelEXLinkRemark_txt.InnerHtml;
        this.HotelEXLinkRemark_txt.InnerHtml = this.HotelEXLinkRemark_txt.InnerHtml;
        this.btnClearLock.Attributes["style"] = "display:''";
        this.SPANHotelEXLinkRemark.Attributes["style"] = "display:''";
        this.btnEditRemark.Attributes.Add("style", "display:none");
        this.TXTotelEXLinkRemark.Attributes.Add("style", "display:none");
        this.UpdatePanel8.Update();
        ScriptManager.RegisterStartupScript(this.UpdatePanel6, this.GetType(), "keyEditRemark", "BtnCompleteStyle();", true);
        System.IO.File.AppendAllText("C:\\ConsultLog\\" + UserSession.Current.UserAccount + "-Log.txt",
"LM联系人(btnAlertLink_Click)--修改计划EX信息--结束--时间:" + DateTime.Now.ToString() + DateTime.Now.Millisecond.ToString() + "\r\n", System.Text.Encoding.GetEncoding("GB2312"));
    }
    /// <summary>
    /// 从HotelEx 获取询房信息  --- Oracle
    /// </summary>
    /// <returns></returns>
    public DataRow GetHotelExInfo()
    {
        HotelInfoEXEntity _hotelinfoEXEntity = new HotelInfoEXEntity();

        _hotelinfoEXEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _hotelinfoEXEntity.LogMessages.Userid = UserSession.Current.UserAccount;
        _hotelinfoEXEntity.LogMessages.Username = UserSession.Current.UserDspName;
        _hotelinfoEXEntity.LogMessages.IpAddress = UserSession.Current.UserIP;


        _hotelinfoEXEntity.HotelInfoEXDBEntity = new List<HotelInfoEXDBEntity>();
        HotelInfoEXDBEntity hotelInfoEXDBEntity = new HotelInfoEXDBEntity();

        hotelInfoEXDBEntity.HotelID = this.HidPid.Value;//酒店ID
        _hotelinfoEXEntity.HotelInfoEXDBEntity.Add(hotelInfoEXDBEntity);
        System.IO.File.AppendAllText("C:\\ConsultLog\\" + UserSession.Current.UserAccount + "-Log.txt",
"\r\n从HotelEx 获取询房信息--Oracle(GetHotelExInfo)--开始--时间:" + DateTime.Now.ToString() + DateTime.Now.Millisecond.ToString() + "\r\n", System.Text.Encoding.GetEncoding("GB2312"));

        DataSet dsResult = HotelInfoEXBP.SelectHotelInfoEX(_hotelinfoEXEntity).QueryResult;

        System.IO.File.AppendAllText("C:\\ConsultLog\\" + UserSession.Current.UserAccount + "-Log.txt",
"从HotelEx 获取询房信息--Oracle(GetHotelExInfo)--结束--时间:" + DateTime.Now.ToString() + DateTime.Now.Millisecond.ToString() + "\r\n", System.Text.Encoding.GetEncoding("GB2312"));

        if (dsResult.Tables[0] != null && dsResult.Tables[0].Rows.Count > 0)
        {
            DataRow[] rows = dsResult.Tables[0].Select("type='" + 1 + "'");
            if (rows.Length > 0)
            {
                this.EXHotelInfo.Value = "1";
                this.EXLinkFax.Value = rows[0]["LinkFax"].ToString();
                this.EXExTime.Value = rows[0]["EX_Time"].ToString();
                this.EXExMode.Value = rows[0]["EX_Mode"].ToString();
                return rows[0];
            }
            else
            {
                this.EXHotelInfo.Value = "0";
                this.EXLinkFax.Value = "";
                this.EXExTime.Value = "";
                this.EXExMode.Value = "";
                return null;
            }
        }
        else
        {
            this.EXHotelInfo.Value = "0";
            this.EXLinkFax.Value = "";
            this.EXExTime.Value = "";
            this.EXExMode.Value = "";
            return null;
        }
    }