public bool CheckApproveUser(string UserID, int iType)
    {
        messageContent.InnerHtml = "";
        HotelInfoEntity _hotelinfoEntity = new HotelInfoEntity();
        _hotelinfoEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _hotelinfoEntity.LogMessages.Userid = UserSession.Current.UserAccount;
        _hotelinfoEntity.LogMessages.Username = UserSession.Current.UserDspName;
        _hotelinfoEntity.LogMessages.IpAddress = UserSession.Current.UserIP;

        _hotelinfoEntity.HotelInfoDBEntity = new List<HotelInfoDBEntity>();
        HotelInfoDBEntity hotelInfoDBEntity = new HotelInfoDBEntity();
        hotelInfoDBEntity.SalesID = UserID;
        _hotelinfoEntity.HotelInfoDBEntity.Add(hotelInfoDBEntity);
        DataSet dsResult = HotelInfoBP.CheckApproveUser(_hotelinfoEntity).QueryResult;

        if (dsResult.Tables.Count == 0 || dsResult.Tables[0].Rows.Count == 0)
        {
            messageContent.InnerHtml = "该用户非订单审核人员,请确认!";
            return false;
        }

        if (iType == 1)
        {
            dsResult = HotelInfoBP.CheckApproveUserBandHotel(_hotelinfoEntity).QueryResult;
            if (dsResult.Tables.Count == 0 || dsResult.Tables[0].Rows.Count == 0)
            {
                messageContent.InnerHtml = "该订单审核人员未绑定酒店,请确认!";
                return false;
            }
        }

        return true;
    }
        public static HotelInfoEntity GetHotelList(HotelInfoEntity hotelInfoEntity)
        {
            OracleParameter[] parm ={
                                    new OracleParameter("HOTELID",OracleType.VarChar),
                                    new OracleParameter("CITYID",OracleType.VarChar),
                                    new OracleParameter("TRADEAREAID",OracleType.VarChar),
                                    new OracleParameter("SALES",OracleType.VarChar),
                                };
            HotelInfoDBEntity dbParm = (hotelInfoEntity.HotelInfoDBEntity.Count > 0) ? hotelInfoEntity.HotelInfoDBEntity[0] : new HotelInfoDBEntity();
            if (string.IsNullOrEmpty(dbParm.HotelID))
                parm[0].Value = DBNull.Value;
            else
                parm[0].Value = dbParm.HotelID;

            if (string.IsNullOrEmpty(dbParm.City))
                parm[1].Value = DBNull.Value;
            else
                parm[1].Value = dbParm.City;

            if (string.IsNullOrEmpty(dbParm.AreaID))
                parm[2].Value = DBNull.Value;
            else
                parm[2].Value = dbParm.AreaID;

            if (string.IsNullOrEmpty(dbParm.SalesID))
                parm[3].Value = DBNull.Value;
            else
                parm[3].Value = dbParm.SalesID;

            hotelInfoEntity.QueryResult = HotelVp.Common.DBUtility.DbManager.Query("HotelPlanInfo", "t_lm_b_hotelplan_search_list", false, parm);
            return hotelInfoEntity;
        }
        public static HotelInfoEntity BedTypeListSelect(HotelInfoEntity hotelInfoEntity)
        {
            OracleParameter[] parm ={
                                    new OracleParameter("KEYWORD",OracleType.VarChar)
                                };
            HotelInfoDBEntity dbParm = (hotelInfoEntity.HotelInfoDBEntity.Count > 0) ? hotelInfoEntity.HotelInfoDBEntity[0] : new HotelInfoDBEntity();

            if (!String.IsNullOrEmpty(dbParm.KeyWord))
            {
                parm[0].Value = dbParm.KeyWord;
            }
            else
            {
                parm[0].Value = DBNull.Value;
            }

            DataSet dsResult = HotelVp.Common.DBUtility.DbManager.Query("HotelInfo", "t_lm_room_bed_select", false, parm);

            if (dsResult.Tables.Count > 0 && dsResult.Tables[0].Rows.Count > 0)
            {
                Hashtable alNm = GetBedTagNm();
                for (int i = 0; i < dsResult.Tables[0].Rows.Count; i++)
                {
                    dsResult.Tables[0].Rows[i]["BEDTG"] = SetBedTagNm(dsResult.Tables[0].Rows[i]["bed_tag"].ToString(), alNm);
                }
            }

            hotelInfoEntity.QueryResult = dsResult;
            return hotelInfoEntity;
        }
        public static HotelInfoEntity BindHotelList(HotelInfoEntity hotelInfoEntity)
        {
            OracleParameter[] parm ={
                                    new OracleParameter("HOTELID",OracleType.VarChar)
                                };
            HotelInfoDBEntity dbParm = (hotelInfoEntity.HotelInfoDBEntity.Count > 0) ? hotelInfoEntity.HotelInfoDBEntity[0] : new HotelInfoDBEntity();
            parm[0].Value = dbParm.HotelID;

            hotelInfoEntity.QueryResult = HotelVp.Common.DBUtility.DbManager.Query("HotelInfo", "t_lm_b_hotelinfo_bind", false, parm);
            return hotelInfoEntity;
        }
        public static HotelInfoEntity BedTypeListDetail(HotelInfoEntity hotelInfoEntity)
        {
            OracleParameter[] parm ={
                                    new OracleParameter("BEDCD",OracleType.VarChar)
                                };
            HotelInfoDBEntity dbParm = (hotelInfoEntity.HotelInfoDBEntity.Count > 0) ? hotelInfoEntity.HotelInfoDBEntity[0] : new HotelInfoDBEntity();
            parm[0].Value = dbParm.BedCode;

            hotelInfoEntity.QueryResult = HotelVp.Common.DBUtility.DbManager.Query("HotelInfo", "t_lm_room_bed_detail", false, parm);
            return hotelInfoEntity;
        }
        public static HotelInfoEntity BindUpdatePrRoomData(HotelInfoEntity hotelInfoEntity)
        {
            HotelInfoDBEntity dbParm = (hotelInfoEntity.HotelInfoDBEntity.Count > 0) ? hotelInfoEntity.HotelInfoDBEntity[0] : new HotelInfoDBEntity();
            OracleParameter[] dlmParm ={
                                    new OracleParameter("HOTELID",OracleType.VarChar),
                                    new OracleParameter("PRICECD",OracleType.VarChar)
                                };
            dlmParm[0].Value = dbParm.HotelID;
            dlmParm[1].Value = dbParm.PriceCode;

            hotelInfoEntity.QueryResult = DbManager.Query("HotelInfo", "t_price_room_list", false, dlmParm);
            return hotelInfoEntity;
        }
    public static string SetBDlonglatTude(string Longitude, string Latitude)
    {
        HotelInfoEntity hotelinfoEntity = new HotelInfoEntity();
        hotelinfoEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        hotelinfoEntity.LogMessages.Userid = UserSession.Current.UserAccount;
        hotelinfoEntity.LogMessages.Username = UserSession.Current.UserDspName;
        hotelinfoEntity.LogMessages.IpAddress = UserSession.Current.UserIP;

        hotelinfoEntity.HotelInfoDBEntity = new List<HotelInfoDBEntity>();
        HotelInfoDBEntity hotelInfoDBEntity = new HotelInfoDBEntity();
        hotelInfoDBEntity.Longitude = Longitude;
        hotelInfoDBEntity.Latitude = Latitude;
        hotelinfoEntity.HotelInfoDBEntity.Add(hotelInfoDBEntity);
        return HotelInfoBP.SetBDlonglatTude(hotelinfoEntity);
    }
    /// <summary>
    /// 生成房型列表 -- Oracle
    /// </summary>
    /// <param name="strHotelID"></param>
    public static DataSet BindBalanceRoomList(string strHotelID)
    {
        HotelInfoEntity _hotelinfoEntity = new HotelInfoEntity();
        _hotelinfoEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _hotelinfoEntity.LogMessages.Userid = UserSession.Current.UserAccount;
        _hotelinfoEntity.LogMessages.Username = UserSession.Current.UserDspName;
        _hotelinfoEntity.LogMessages.IpAddress = UserSession.Current.UserIP;

        _hotelinfoEntity.HotelInfoDBEntity = new List<HotelInfoDBEntity>();
        HotelInfoDBEntity hotelInfoDBEntity = new HotelInfoDBEntity();

        hotelInfoDBEntity.HotelID = strHotelID;//酒店ID
        _hotelinfoEntity.HotelInfoDBEntity.Add(hotelInfoDBEntity);
        DataSet dsResult = HotelInfoBP.GetBalanceRoomListByHotel(_hotelinfoEntity).QueryResult;
        return dsResult;
    }
        public static HotelInfoEntity BedTypeListSelect(HotelInfoEntity hotelInfoEntity)
        {
            hotelInfoEntity.LogMessages.MsgType = MessageType.INFO;
            hotelInfoEntity.LogMessages.Content = _nameSpaceClass + "BedTypeListSelect";
            LoggerHelper.LogWriter(hotelInfoEntity.LogMessages);

            try
            {
                return HotelInfoDA.BedTypeListSelect(hotelInfoEntity);
            }
            catch (Exception ex)
            {
                hotelInfoEntity.LogMessages.MsgType = MessageType.ERROR;
                hotelInfoEntity.LogMessages.Content = _nameSpaceClass + "BedTypeListSelect  Error: " + ex.Message;
                LoggerHelper.LogWriter(hotelInfoEntity.LogMessages);
                throw ex;
            }
        }
    /// <summary>
    /// 根据时间段  HotelID 取计划  --  接口 
    /// </summary>
    /// <param name="startDate"></param>
    /// <param name="endDate"></param>
    /// <param name="strHotelID"></param>
    /// <returns></returns>
    public static DataSet GetBindLmbarPlanList(string startDate, string endDate, string strHotelID)
    {
        HotelInfoEntity _hotelinfoEntity = new HotelInfoEntity();
        _hotelinfoEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _hotelinfoEntity.LogMessages.Userid = UserSession.Current.UserAccount;
        _hotelinfoEntity.LogMessages.Username = UserSession.Current.UserDspName;
        _hotelinfoEntity.LogMessages.IpAddress = UserSession.Current.UserIP;

        _hotelinfoEntity.HotelInfoDBEntity = new List<HotelInfoDBEntity>();
        HotelInfoDBEntity hotelInfoDBEntity = new HotelInfoDBEntity();
        hotelInfoDBEntity.HotelID = strHotelID;
        hotelInfoDBEntity.SalesStartDT = startDate;
        hotelInfoDBEntity.SalesEndDT = endDate;
        _hotelinfoEntity.HotelInfoDBEntity.Add(hotelInfoDBEntity);

        DataSet dsResult = HotelInfoBP.GetPlanListByIndiscriminatelyRateCode(_hotelinfoEntity).QueryResult;

        return dsResult;
    }
    public static DataTable GetHotel(string hotelID, string cityID, string areaID, string SalesID)
    {
        DataTable dtResult = new DataTable();
        HotelInfoEntity _hotelinfoEntity = new HotelInfoEntity();
        _hotelinfoEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _hotelinfoEntity.LogMessages.Userid = UserSession.Current.UserAccount;
        _hotelinfoEntity.LogMessages.Username = UserSession.Current.UserDspName;
        _hotelinfoEntity.LogMessages.IpAddress = UserSession.Current.UserIP;

        _hotelinfoEntity.HotelInfoDBEntity = new List<HotelInfoDBEntity>();
        HotelInfoDBEntity hotelInfoDBEntity = new HotelInfoDBEntity();

        hotelInfoDBEntity.HotelID = hotelID == "" ? "" : hotelID.Substring((hotelID.IndexOf('[') + 1), (hotelID.IndexOf(']') - 1));//酒店ID
        hotelInfoDBEntity.City = cityID == "" ? "" : cityID.Substring((cityID.IndexOf('[') + 1), (cityID.IndexOf(']') - 1)); //"";//城市ID
        hotelInfoDBEntity.Bussiness = areaID == "" ? "" : areaID.Substring((areaID.IndexOf('[') + 1), (areaID.IndexOf(']') - 1));//"";//商圈ID
        hotelInfoDBEntity.SalesID = SalesID == "" ? "" : SalesID.Substring((SalesID.IndexOf('[') + 1), (SalesID.IndexOf(']') - 1));//"";//销售

        _hotelinfoEntity.HotelInfoDBEntity.Add(hotelInfoDBEntity);
        dtResult = HotelPlanInfoBP.GetHotelList(_hotelinfoEntity).QueryResult.Tables[0];

        return dtResult;
    }
        public static HotelInfoEntity GetBalHotelRoomList(HotelInfoEntity hotelInfoEntity)
        {
            OracleParameter[] parm ={
                                    new OracleParameter("HOTELID",OracleType.VarChar)
                                };
            HotelInfoDBEntity dbParm = (hotelInfoEntity.HotelInfoDBEntity.Count > 0) ? hotelInfoEntity.HotelInfoDBEntity[0] : new HotelInfoDBEntity();
            parm[0].Value = dbParm.HotelID;
            hotelInfoEntity.QueryResult = HotelVp.Common.DBUtility.DbManager.Query("HotelInfo", "t_lm_b_balanceroom_proomlist", true, parm);

            return hotelInfoEntity;
        }
        public static HotelInfoEntity GetBalanceRoomListByHotelAndPriceCode(HotelInfoEntity hotelInfoEntity)
        {
            OracleParameter[] parm ={
                                    new OracleParameter("HOTELID",OracleType.VarChar),
                                    new OracleParameter("PRICECODE",OracleType.VarChar)
                                };
            HotelInfoDBEntity dbParm = (hotelInfoEntity.HotelInfoDBEntity.Count > 0) ? hotelInfoEntity.HotelInfoDBEntity[0] : new HotelInfoDBEntity();
            parm[0].Value = dbParm.HotelID;
            parm[1].Value = dbParm.PriceCode;
            hotelInfoEntity.QueryResult = HotelVp.Common.DBUtility.DbManager.Query("HotelInfo", "t_lm_b_balancerom_byhotelandpricecode", true, parm);

            return hotelInfoEntity;
        }
        public static HotelInfoEntity GetBalanceRoomHistory(HotelInfoEntity hotelInfoEntity)
        {
            OracleParameter[] parm ={
                                    new OracleParameter("HOTELID",OracleType.VarChar),
                                    new OracleParameter("ROOMCD",OracleType.VarChar),
                                    new OracleParameter("STARTDT",OracleType.VarChar),
                                    new OracleParameter("ENDDT",OracleType.VarChar)
                                };
            HotelInfoDBEntity dbParm = (hotelInfoEntity.HotelInfoDBEntity.Count > 0) ? hotelInfoEntity.HotelInfoDBEntity[0] : new HotelInfoDBEntity();
            parm[0].Value = dbParm.HotelID;

            if (String.IsNullOrEmpty(dbParm.HRoomList))
            {
                parm[1].Value = DBNull.Value;
            }
            else
            {
                parm[1].Value = dbParm.HRoomList;
            }

            if (String.IsNullOrEmpty(dbParm.InDateFrom))
            {
                parm[2].Value = DBNull.Value;
            }
            else
            {
                parm[2].Value = dbParm.InDateFrom;
            }

            if (String.IsNullOrEmpty(dbParm.InDateTo))
            {
                parm[3].Value = DBNull.Value;
            }
            else
            {
                parm[3].Value = dbParm.InDateTo;
            }

            DataSet dsResult = new DataSet();
            DataSet dsRoomList = HotelVp.Common.DBUtility.DbManager.Query("HotelInfo", "t_lm_b_balancerom_roomlist", true, parm);
            DataSet dsDataList = HotelVp.Common.DBUtility.DbManager.Query("HotelInfo", "t_lm_b_balancerom_select", true, parm);
            int iLmCount = 0;
            string Cols = string.Empty;
            dsResult.Tables.Add(new DataTable());
            dsResult.Tables[0].Columns.Add("EFFECTDT");
            foreach (DataRow drCol in dsRoomList.Tables[0].Rows)
            {
                if ("LMBAR".Equals(drCol["rate_code"].ToString().ToUpper()))
                {
                    iLmCount = iLmCount + 1;
                }

                dsResult.Tables[0].Columns.Add(drCol["rate_code"].ToString().ToUpper() + "-" + drCol["room_type_code"].ToString().ToUpper());
                Cols = Cols + GetColsNameByRoomTypeCode(dbParm.HotelID, drCol["room_type_code"].ToString()) + ",";
            }

            string strDate = string.Empty;
            foreach (DataRow drVal in dsDataList.Tables[0].Rows)
            {
                if (!strDate.Equals(drVal["EFFECTDATE"].ToString()))
                {
                    strDate = drVal["EFFECTDATE"].ToString();
                    DataRow[] drList = dsDataList.Tables[0].Select("EFFECTDATE='" + strDate + "'");

                    if (drList.Count() == 0)
                    {
                        continue;
                    }

                    DataRow drRow = dsResult.Tables[0].NewRow();
                    drRow["EFFECTDT"] = strDate;
                    string strColNM = string.Empty;
                    foreach (DataRow drTemp in drList)
                    {
                        strColNM = drTemp["rate_code"].ToString().ToUpper() + "-" + drTemp["room_type_code"].ToString().ToUpper();
                        drRow[strColNM] = ("42".Equals(drTemp["commision_mode"].ToString())) ? drTemp["commision"].ToString() + "%" : drTemp["commision"].ToString() + "元";
                    }
                    dsResult.Tables[0].Rows.Add(drRow);
                }
            }

            dsResult.Tables[0].Columns["EFFECTDT"].ColumnName = "日期/房型";
            hotelInfoEntity.LMCount = iLmCount;
            hotelInfoEntity.LM2Count = dsResult.Tables[0].Columns.Count - iLmCount - 1;
            hotelInfoEntity.Cols = Cols.Trim(',');
            hotelInfoEntity.QueryResult = dsResult;
            return hotelInfoEntity;
        }
        public static HotelInfoEntity ExportBalanceRoomHistory(HotelInfoEntity hotelInfoEntity)
        {
            OracleParameter[] parm ={
                                    new OracleParameter("HOTELID",OracleType.VarChar),
                                    new OracleParameter("ROOMCD",OracleType.VarChar),
                                    new OracleParameter("STARTDT",OracleType.VarChar),
                                    new OracleParameter("ENDDT",OracleType.VarChar)
                                };
            HotelInfoDBEntity dbParm = (hotelInfoEntity.HotelInfoDBEntity.Count > 0) ? hotelInfoEntity.HotelInfoDBEntity[0] : new HotelInfoDBEntity();
            parm[0].Value = dbParm.HotelID;

            if (String.IsNullOrEmpty(dbParm.HRoomList))
            {
                parm[1].Value = DBNull.Value;
            }
            else
            {
                parm[1].Value = dbParm.HRoomList;
            }

            if (String.IsNullOrEmpty(dbParm.InDateFrom))
            {
                parm[2].Value = DBNull.Value;
            }
            else
            {
                parm[2].Value = dbParm.InDateFrom;
            }

            if (String.IsNullOrEmpty(dbParm.InDateTo))
            {
                parm[3].Value = DBNull.Value;
            }
            else
            {
                parm[3].Value = dbParm.InDateTo;
            }

            DataSet dsResult = new DataSet();
            DataSet dsRoomList = HotelVp.Common.DBUtility.DbManager.Query("HotelInfo", "t_lm_b_balancerom_roomlist", true, parm);
            DataSet dsDataList = HotelVp.Common.DBUtility.DbManager.Query("HotelInfo", "t_lm_b_balancerom_select", true, parm);

            System.Collections.Hashtable htRoomNm = new System.Collections.Hashtable();
            dsResult.Tables.Add(new DataTable());
            dsResult.Tables[0].Columns.Add("EFFECTDT");
            foreach (DataRow drCol in dsRoomList.Tables[0].Rows)
            {
                dsResult.Tables[0].Columns.Add(drCol["rate_code"].ToString().ToUpper() + "-" + drCol["room_type_code"].ToString().ToUpper());

                if (!htRoomNm.ContainsKey(drCol["rate_code"].ToString().ToUpper() + "-" + drCol["room_type_code"].ToString().ToUpper()))
                {
                    htRoomNm.Add(drCol["rate_code"].ToString().ToUpper() + "-" + drCol["room_type_code"].ToString().ToUpper(), GetColsNameByRoomTypeCode(dbParm.HotelID, drCol["room_type_code"].ToString()));
                }
            }

            string strDate = string.Empty;
            foreach (DataRow drVal in dsDataList.Tables[0].Rows)
            {
                if (!strDate.Equals(drVal["EFFECTDATE"].ToString()))
                {
                    strDate = drVal["EFFECTDATE"].ToString();
                    DataRow[] drList = dsDataList.Tables[0].Select("EFFECTDATE='" + strDate + "'");

                    if (drList.Count() == 0)
                    {
                        continue;
                    }

                    DataRow drRow = dsResult.Tables[0].NewRow();
                    drRow["EFFECTDT"] = strDate;
                    string strColNM = string.Empty;
                    foreach (DataRow drTemp in drList)
                    {
                        strColNM = drTemp["rate_code"].ToString().ToUpper() + "-" + drTemp["room_type_code"].ToString().ToUpper();
                        drRow[strColNM] = ("42".Equals(drTemp["commision_mode"].ToString())) ? drTemp["commision"].ToString() + "%" : drTemp["commision"].ToString() + "元";
                    }
                    dsResult.Tables[0].Rows.Add(drRow);
                }
            }

            dsResult.Tables[0].Columns["EFFECTDT"].ColumnName = "日期/房型";

            for (int i = 1; i < dsResult.Tables[0].Columns.Count; i++)
            {
                dsResult.Tables[0].Columns[i].ColumnName = dsResult.Tables[0].Columns[i].ColumnName.Substring(0, dsResult.Tables[0].Columns[i].ColumnName.IndexOf('-') + 1) + htRoomNm[dsResult.Tables[0].Columns[i].ColumnName].ToString();
            }

            hotelInfoEntity.QueryResult = dsResult;
            return hotelInfoEntity;
        }
 public static bool CheckUpdate(HotelInfoEntity hotelInfoEntity)
 {
     HotelInfoDBEntity dbParm = (hotelInfoEntity.HotelInfoDBEntity.Count > 0) ? hotelInfoEntity.HotelInfoDBEntity[0] : new HotelInfoDBEntity();
     DataCommand cmd = DataCommandManager.GetDataCommand("CheckUpdateSalesID");
     cmd.SetParameterValue("@UserCode", dbParm.SalesID);
     string RoleID = (String.IsNullOrEmpty(ConfigurationManager.AppSettings["SalesRoleID"])) ? "5" : ConfigurationManager.AppSettings["SalesRoleID"].ToString().Trim();
     cmd.SetParameterValue("@RoleID", RoleID);
     DataSet dsResult = cmd.ExecuteDataSet();
     if (dsResult.Tables.Count > 0 && dsResult.Tables[0].Rows.Count > 0)
     {
         return true;
     }
     return false;
 }
    public bool btnAddData()
    {
        MessageContent.InnerHtml = "";
        bool bFlag = true;
        string msgString = "";

        if (String.IsNullOrEmpty(txtHotelNM.Text.ToString().Trim()))
        {
            msgString = msgString + GetLocalResourceObject("UpdateError3").ToString() + "<br/>";
            bFlag = false;
        }

        if (StringUtility.Text_Length(txtHotelNM.Text.ToString().Trim()) > 100)
        {
            msgString = msgString + GetLocalResourceObject("UpdateError2").ToString() + "<br/>";
            bFlag = false;
        }

        if (StringUtility.Text_Length(txtHotelNMEN.Text.ToString().Trim()) > 100)
        {
            msgString = msgString + GetLocalResourceObject("UpdateError12").ToString() + "<br/>";
            bFlag = false;
        }

        if (String.IsNullOrEmpty(txtHotelPN.Text.ToString().Trim()))
        {
            msgString = msgString + GetLocalResourceObject("UpdateError115").ToString() + "<br/>";
            bFlag = false;
        }

        if (StringUtility.Text_Length(txtHotelPN.Text.ToString().Trim()) > 1000)
        {
            msgString = msgString + GetLocalResourceObject("UpdateError101").ToString() + "<br/>";
            bFlag = false;
        }

        if (String.IsNullOrEmpty(txtTotalRooms.Text.ToString().Trim()))
        {
            msgString = msgString + GetLocalResourceObject("UpdateError102").ToString() + "<br/>";
            bFlag = false;
        }

        if (!ChkNumber(txtTotalRooms.Text.ToString().Trim()))
        {
            msgString = msgString + GetLocalResourceObject("UpdateError103").ToString() + "<br/>";
            bFlag = false;
        }

        if (!ChkNumber(txtPriceLow.Text.ToString().Trim()))
        {
            msgString = msgString + GetLocalResourceObject("UpdateError117").ToString() + "<br/>";
            bFlag = false;
        }

        if (String.IsNullOrEmpty(txtHotelJP.Text.ToString().Trim()))
        {
            msgString = msgString + GetLocalResourceObject("UpdateError116").ToString() + "<br/>";
            bFlag = false;
        }

        if (StringUtility.Text_Length(txtHotelJP.Text.ToString().Trim()) > 1000)
        {
            msgString = msgString + GetLocalResourceObject("UpdateError104").ToString() + "<br/>";
            bFlag = false;
        }

        string strCity = hidCityID.Value.Trim();

        if (String.IsNullOrEmpty(strCity.ToString().Trim()))
        {
            msgString = msgString + GetLocalResourceObject("UpdateError105").ToString() + "<br/>";
            bFlag = false;
        }

        if (!strCity.Contains("[") && !strCity.Contains("]"))
        {
            msgString = msgString + GetLocalResourceObject("UpdateError118").ToString() + "<br/>";
            bFlag = false;
        }

        if (String.IsNullOrEmpty(txtAddress.Text.ToString().Trim()))
        {
            msgString = msgString + GetLocalResourceObject("UpdateError106").ToString() + "<br/>";
            bFlag = false;
        }

        if (StringUtility.Text_Length(txtAddress.Text.ToString().Trim()) > 150)
        {
            msgString = msgString + GetLocalResourceObject("UpdateError4").ToString() + "<br/>";
            bFlag = false;
        }

        if ((String.IsNullOrEmpty(txtLatitude.Text.ToString().Trim())) || (String.IsNullOrEmpty(txtLongitude.Text.ToString().Trim())))
        {
            msgString = msgString + GetLocalResourceObject("UpdateError21").ToString() + "<br/>";
            bFlag = false;
        }

        if (String.IsNullOrEmpty(hidBussList.Value.Trim()))
        {
            msgString = msgString + GetLocalResourceObject("UpdateError107").ToString() + "<br/>";
            bFlag = false;
        }

        if (String.IsNullOrEmpty(txtContactNameZh.Text.ToString().Trim()))
        {
            msgString = msgString + GetLocalResourceObject("UpdateError108").ToString() + "<br/>";
            bFlag = false;
        }

        if (StringUtility.Text_Length(txtContactNameZh.Text.ToString().Trim()) > 100)
        {
            msgString = msgString + GetLocalResourceObject("UpdateError109").ToString() + "<br/>";
            bFlag = false;
        }

        if (String.IsNullOrEmpty(txtHotelFax.Text.ToString().Trim()))
        {
            msgString = msgString + GetLocalResourceObject("UpdateError71").ToString() + "<br/>";
            bFlag = false;
        }

        if (!String.IsNullOrEmpty(txtHotelFax.Text.ToString().Trim()) && (StringUtility.Text_Length(txtHotelFax.Text.ToString().Trim()) > 100))
        {
            msgString = msgString + GetLocalResourceObject("UpdateError7").ToString() + "<br/>";
            bFlag = false;
        }

        if (String.IsNullOrEmpty(txtContactPhone.Text.ToString().Trim()))
        {
            msgString = msgString + GetLocalResourceObject("UpdateError110").ToString() + "<br/>";
            bFlag = false;
        }

        if (!String.IsNullOrEmpty(txtContactPhone.Text.ToString().Trim()) && (StringUtility.Text_Length(txtContactPhone.Text.ToString().Trim()) > 30))
        {
            msgString = msgString + GetLocalResourceObject("UpdateError111").ToString() + "<br/>";
            bFlag = false;
        }

        if (String.IsNullOrEmpty(txtHotelTel.Text.ToString().Trim()))
        {
            msgString = msgString + GetLocalResourceObject("UpdateError61").ToString() + "<br/>";
            bFlag = false;
        }

        if (!String.IsNullOrEmpty(txtHotelTel.Text.ToString().Trim()) && (StringUtility.Text_Length(txtHotelTel.Text.ToString().Trim()) > 40))
        {
            msgString = msgString + GetLocalResourceObject("UpdateError6").ToString() + "<br/>";
            bFlag = false;
        }

        if (String.IsNullOrEmpty(txtContactEmail.Text.ToString().Trim()))
        {
            msgString = msgString + GetLocalResourceObject("UpdateError113").ToString() + "<br/>";
            bFlag = false;
        }

        if (StringUtility.Text_Length(txtContactEmail.Text.ToString().Trim()) > 100)
        {
            msgString = msgString + GetLocalResourceObject("UpdateError11").ToString() + "<br/>";
            bFlag = false;
        }

        if (String.IsNullOrEmpty(txtSimpleDescZh.Text.ToString().Trim()))
        {
            msgString = msgString + GetLocalResourceObject("UpdateError112").ToString() + "<br/>";
            bFlag = false;
        }

        if (!String.IsNullOrEmpty(txtSimpleDescZh.Text.ToString().Trim()) && (StringUtility.Text_Length(txtSimpleDescZh.Text.ToString().Trim()) > 1000))
        {
            msgString = msgString + GetLocalResourceObject("UpdateError8").ToString() + "<br/>";
            bFlag = false;
        }

        if (!String.IsNullOrEmpty(txtDescZh.Text.ToString().Trim()) && (StringUtility.Text_Length(txtDescZh.Text.ToString().Trim()) > 2000))
        {
            msgString = msgString + GetLocalResourceObject("UpdateError114").ToString() + "<br/>";
            bFlag = false;
        }

        //if (!RegexValidateData(txtLatitude.Text.ToString().Trim()) || !RegexValidateData(txtLongitude.Text.ToString().Trim()))
        //{
        //    msgString = msgString + GetLocalResourceObject("UpdateError31").ToString() + "<br/>";
        //    bFlag = false;
        //}

        if (!bFlag)
        {
            MessageContent.InnerHtml = GetLocalResourceObject("UpdateError1").ToString() + "<br/>" + msgString;
            return false;
        }

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

        _hotelinfoEntity.HotelInfoDBEntity = new List<HotelInfoDBEntity>();
        HotelInfoDBEntity hotelInfoDBEntity = new HotelInfoDBEntity();

        hotelInfoDBEntity.Name_CN = txtHotelNM.Text.Trim();
        hotelInfoDBEntity.Name_EN = txtHotelNMEN.Text.Trim();
        hotelInfoDBEntity.City = (strCity.IndexOf("]") >= 0) ? strCity.Substring((strCity.IndexOf('[') + 1), (strCity.IndexOf(']') - 1)) : "";
        //hotelInfoDBEntity.Administration = ddpAdministration.SelectedValue.Trim();
        hotelInfoDBEntity.StarRating = ddpStarRating.SelectedValue;
        hotelInfoDBEntity.AddRess = txtAddress.Text.Trim();
        hotelInfoDBEntity.Phone = txtHotelTel.Text.Trim();
        hotelInfoDBEntity.Fax = txtHotelFax.Text.Trim();
        hotelInfoDBEntity.Longitude = txtLongitude.Text.Trim();
        hotelInfoDBEntity.Latitude = txtLatitude.Text.Trim();
        //hotelInfoDBEntity.HotelGroup = ddpHotelGroup.SelectedValue;
        hotelInfoDBEntity.Bussiness = hidBussList.Value.Trim();

        hotelInfoDBEntity.OpenDate = dpOpenDate.Value;
        hotelInfoDBEntity.RepairDate = dpRepairDate.Value;
        hotelInfoDBEntity.SimpleDescZh = txtSimpleDescZh.Text.Trim();
        hotelInfoDBEntity.DescZh = txtDescZh.Text.Trim();
        //hotelInfoDBEntity.HServe = txtHServe.Text.Trim();
        //hotelInfoDBEntity.HFacility = txtHFacility.Text.Trim();

        hotelInfoDBEntity.Status = ddpOnline.SelectedValue.Trim();
        hotelInfoDBEntity.HotelPN = txtHotelPN.Text.Trim();

        hotelInfoDBEntity.TotalRooms = txtTotalRooms.Text.Trim();
        hotelInfoDBEntity.HotelJP = txtHotelJP.Text.Trim();
        hotelInfoDBEntity.Zip = txtZip.Text.Trim();
        hotelInfoDBEntity.PriceLow = txtPriceLow.Text.Trim();
        hotelInfoDBEntity.ContactPer = txtContactNameZh.Text.Trim();
        hotelInfoDBEntity.ContactPhone = txtContactPhone.Text.Trim();
        hotelInfoDBEntity.ContactEmail = txtContactEmail.Text.Trim();

        //hotelInfoDBEntity.ID = hidHotelNo.Value;
        //hotelInfoDBEntity.HotelID = hidHotelID.Value;
        //hotelInfoDBEntity.Status = ddpStatusList.SelectedValue;
        //hotelInfoDBEntity.WebSite = txtWebSite.Text.Trim();
        //hotelInfoDBEntity.Phone = txtPhone.Text.Trim();
        //hotelInfoDBEntity.DiamondRating = ddpDiamondRating.SelectedValue;
        //hotelInfoDBEntity.City = ddpCity.SelectedValue;
        //hotelInfoDBEntity.ContactPer = txtContactPer.Text.Trim();
        //hotelInfoDBEntity.ContactEmail = txtContactEmail.Text.Trim();
        //hotelInfoDBEntity.Evaluation = Evaluation;
        //hotelInfoDBEntity.AutoTrust = (chkAutoTrust.Checked) ? "1" : "0";
        //hotelInfoDBEntity.FogStatus = hidFogStatus.Value;

        _hotelinfoEntity.HotelInfoDBEntity.Add(hotelInfoDBEntity);
        _hotelinfoEntity = HotelInfoBP.SupHotelSave(_hotelinfoEntity);
        int iResult = _hotelinfoEntity.Result;
        string HotelID = _hotelinfoEntity.ErrorMSG;
        _commonEntity.LogMessages = _hotelinfoEntity.LogMessages;
        _commonEntity.CommonDBEntity = new List<CommonDBEntity>();
        CommonDBEntity commonDBEntity = new CommonDBEntity();

        commonDBEntity.Event_Type = "SUP酒店基础信息-保存";
        commonDBEntity.Event_ID = HotelID;
        string conTent = GetLocalResourceObject("EventInsertMessage").ToString();

        conTent = string.Format(conTent,HotelID, hotelInfoDBEntity.Name_CN, hotelInfoDBEntity.Name_EN, hotelInfoDBEntity.City, hotelInfoDBEntity.StarRating, hotelInfoDBEntity.AddRess, hotelInfoDBEntity.Phone, hotelInfoDBEntity.Fax, hotelInfoDBEntity.Longitude, hotelInfoDBEntity.Latitude, hotelInfoDBEntity.Bussiness, hotelInfoDBEntity.OpenDate, hotelInfoDBEntity.RepairDate, hotelInfoDBEntity.SimpleDescZh, hotelInfoDBEntity.DescZh, hotelInfoDBEntity.Status, hotelInfoDBEntity.HotelPN, hotelInfoDBEntity.TotalRooms, hotelInfoDBEntity.HotelJP, hotelInfoDBEntity.Zip, hotelInfoDBEntity.PriceLow, hotelInfoDBEntity.ContactPer, hotelInfoDBEntity.ContactPhone, hotelInfoDBEntity.ContactEmail);
        commonDBEntity.Event_Content = conTent;

        if (iResult == 1)
        {
            commonDBEntity.Event_Result = string.Format(GetLocalResourceObject("UpdateSuccess").ToString(), HotelID);
            MessageContent.InnerHtml = string.Format(GetLocalResourceObject("UpdateSuccess").ToString(), HotelID);
        }
        else if (iResult == 3)
        {
            commonDBEntity.Event_Result = GetLocalResourceObject("UpdateError33").ToString();
            MessageContent.InnerHtml = GetLocalResourceObject("UpdateError33").ToString();
        }
        else if (iResult == 2)
        {
            commonDBEntity.Event_Result = GetLocalResourceObject("UpdateError22").ToString();
            MessageContent.InnerHtml = GetLocalResourceObject("UpdateError22").ToString();
        }
        else
        {
            commonDBEntity.Event_Result = GetLocalResourceObject("UpdateError1").ToString();
            MessageContent.InnerHtml = GetLocalResourceObject("UpdateError1").ToString();
        }
        _commonEntity.CommonDBEntity.Add(commonDBEntity);
        CommonBP.InsertEventHistory(_commonEntity);

        if (iResult == 1)
        {
            return true;
        }
        else
        {
            return false;
        }
    }
 public static HotelInfoEntity CommonProvincialSelect(HotelInfoEntity hotelInfoEntity)
 {
     hotelInfoEntity.QueryResult = HotelVp.Common.DBUtility.DbManager.Query("HotelInfo", "t_lm_b_common_provinciallist", false);
     return hotelInfoEntity;
 }
    public void getHotelLists()
    {
        messageContent.InnerHtml = "";

        DataTable dtResult = new DataTable();
        HotelInfoEntity _hotelinfoEntity = new HotelInfoEntity();
        _hotelinfoEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _hotelinfoEntity.LogMessages.Userid = UserSession.Current.UserAccount;
        _hotelinfoEntity.LogMessages.Username = UserSession.Current.UserDspName;
        _hotelinfoEntity.LogMessages.IpAddress = UserSession.Current.UserIP;

        _hotelinfoEntity.HotelInfoDBEntity = new List<HotelInfoDBEntity>();
        HotelInfoDBEntity hotelInfoDBEntity = new HotelInfoDBEntity();
        string strOrderID = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["OrderID"].ToString())) ? null : ViewState["OrderID"].ToString();
        string strfaxNum = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["FaxNum"].ToString())) ? null : ViewState["FaxNum"].ToString();

        if (!String.IsNullOrEmpty(strOrderID) || !String.IsNullOrEmpty(strfaxNum))
        {
            //hotelInfoDBEntity.Type = ddpSort.SelectedValue;
            hotelInfoDBEntity.OrderID = strOrderID;
            hotelInfoDBEntity.FaxNum = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["FaxNum"].ToString())) ? null : ViewState["FaxNum"].ToString();

            //hotelInfoDBEntity.OutStartDate = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["OutStartDate"].ToString())) ? null : ViewState["OutStartDate"].ToString();
            //hotelInfoDBEntity.OutEndDate = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["OutEndDate"].ToString())) ? null : ViewState["OutEndDate"].ToString();

            _hotelinfoEntity.HotelInfoDBEntity.Add(hotelInfoDBEntity);
            dtResult = HotelInfoBP.GetOrderApproveHotelFaxList(_hotelinfoEntity).QueryResult.Tables[0];

            if (dtResult.Rows.Count == 0)
            {
                messageContent.InnerHtml = "无订单审核,请确认!";
            }
        }
        else if (!String.IsNullOrEmpty(hidSelectCity.Value) || !String.IsNullOrEmpty(hidSelectHotel.Value) || !String.IsNullOrEmpty(hidSelectBussiness.Value))
        {
            if (!String.IsNullOrEmpty(hidSelectHotel.Value))
            {
                if (!hidSelectHotel.Value.Trim().Contains("[") || !hidSelectHotel.Value.Trim().Contains("]"))
                {
                    messageContent.InnerHtml = "查询失败,选择酒店不合法,请修改!";
                    ScriptManager.RegisterStartupScript(this.UpdatePanel5, this.GetType(), "updateScript", "BtnCompleteStyle();", true);
                    return;
                }
            }
            if (!String.IsNullOrEmpty(hidSelectCity.Value))
            {
                if (!hidSelectCity.Value.Trim().Contains("[") || !hidSelectCity.Value.Trim().Contains("]"))
                {
                    messageContent.InnerHtml = "查询失败,选择城市不合法,请修改!";
                    ScriptManager.RegisterStartupScript(this.UpdatePanel5, this.GetType(), "updateScript", "BtnCompleteStyle();", true);
                    return;
                }
            }
            if (!String.IsNullOrEmpty(hidSelectBussiness.Value))
            {
                if (!hidSelectBussiness.Value.Trim().Contains("[") || !hidSelectBussiness.Value.Trim().Contains("]"))
                {
                    messageContent.InnerHtml = "查询失败,选择商圈不合法,请修改!";
                    ScriptManager.RegisterStartupScript(this.UpdatePanel5, this.GetType(), "updateScript", "BtnCompleteStyle();", true);
                    return;
                }
            }

            string OutStartDate = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["OutStartDate"].ToString())) ? null : ViewState["OutStartDate"].ToString();
            string OutEndDate = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["OutEndDate"].ToString())) ? null : ViewState["OutEndDate"].ToString();
            if (String.IsNullOrEmpty(OutStartDate) && String.IsNullOrEmpty(OutEndDate))
            {
                messageContent.InnerHtml = "查询失败,请选择离店日期!";
                ScriptManager.RegisterStartupScript(this.UpdatePanel5, this.GetType(), "updateScript", "BtnCompleteStyle();", true);
                return;
            }
            //ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "setsalesroomKeysOne", "SetSalesRoom('')", true);
            hotelInfoDBEntity.City = hidSelectCity.Value == "" ? "" : hidSelectCity.Value.Substring((hidSelectCity.Value.IndexOf('[') + 1), (hidSelectCity.Value.IndexOf(']') - 1)); //"";//城市ID
            hotelInfoDBEntity.HotelID = hidSelectHotel.Value == "" ? "" : hidSelectHotel.Value.Substring((hidSelectHotel.Value.IndexOf('[') + 1), (hidSelectHotel.Value.IndexOf(']') - 1));//"";//酒店ID
            hotelInfoDBEntity.Bussiness = hidSelectBussiness.Value == "" ? "" : hidSelectBussiness.Value.Substring((hidSelectBussiness.Value.IndexOf('[') + 1), (hidSelectBussiness.Value.IndexOf(']') - 1));//"";//商圈ID
            //hotelInfoDBEntity.Type = ddpSort.SelectedValue;
            //hotelInfoDBEntity.InDateFrom = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["OutStartDate"].ToString())) ? null : ViewState["OutStartDate"].ToString();
            //hotelInfoDBEntity.InDateTo = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["OutEndDate"].ToString())) ? null : ViewState["OutEndDate"].ToString();

            hotelInfoDBEntity.OutStartDate = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["OutStartDate"].ToString())) ? null : ViewState["OutStartDate"].ToString();
            hotelInfoDBEntity.OutEndDate = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["OutEndDate"].ToString())) ? null : ViewState["OutEndDate"].ToString();

            //hotelInfoDBEntity.OutDate = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["OutDateTime"].ToString())) ? null : ViewState["OutDateTime"].ToString();
            hotelInfoDBEntity.OrderID = strOrderID;
            hotelInfoDBEntity.AuditStatus = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["AuditStatus"].ToString())) ? null : ViewState["AuditStatus"].ToString();
            hotelInfoDBEntity.ADStatsBack = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["ADStatsBack"].ToString())) ? null : ViewState["ADStatsBack"].ToString();

            hotelInfoDBEntity.FaxNum = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["FaxNum"].ToString())) ? null : ViewState["FaxNum"].ToString();
            hotelInfoDBEntity.FaxStatus = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["FaxStatus"].ToString())) ? null : ViewState["FaxStatus"].ToString();

            _hotelinfoEntity.HotelInfoDBEntity.Add(hotelInfoDBEntity);
            dtResult = HotelInfoBP.GetOrderApproveHotelFaxList(_hotelinfoEntity).QueryResult.Tables[0];

            if (dtResult.Rows.Count == 0)
            {
                messageContent.InnerHtml = "无订单审核,请确认!";
            }
        }
        else
        {
            if (this.hidSelectSalesID.Value != UserSession.Current.UserAccount)
            {
                if (String.IsNullOrEmpty(this.hidSelectSalesID.Value.Trim()))
                {
                    messageContent.InnerHtml = "查询失败,选择用户不合法,请修改!";
                    ScriptManager.RegisterStartupScript(this.UpdatePanel5, this.GetType(), "updateScript", "BtnCompleteStyle();", true);
                    return;
                }

                if (!hidSelectSalesID.Value.Trim().Contains("[") || !hidSelectSalesID.Value.Trim().Contains("]"))
                {
                    messageContent.InnerHtml = "查询失败,选择用户不合法,请修改!";
                    ScriptManager.RegisterStartupScript(this.UpdatePanel5, this.GetType(), "updateScript", "BtnCompleteStyle();", true);
                    return;
                }
            }

            string OutStartDate = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["OutStartDate"].ToString())) ? null : ViewState["OutStartDate"].ToString();
            string OutEndDate = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["OutEndDate"].ToString())) ? null : ViewState["OutEndDate"].ToString();
            if (String.IsNullOrEmpty(OutStartDate) && String.IsNullOrEmpty(OutEndDate))
            {
                messageContent.InnerHtml = "查询失败,请选择离店日期!";
                ScriptManager.RegisterStartupScript(this.UpdatePanel5, this.GetType(), "updateScript", "BtnCompleteStyle();", true);
                return;
            }

            ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "setsalesroomKeysOne", "SetSalesRoom('" + this.hidSelectSalesID.Value + "')", true);
            hotelInfoDBEntity.SalesID = this.hidSelectSalesID.Value == UserSession.Current.UserAccount ? UserSession.Current.UserAccount : this.hidSelectSalesID.Value.Substring((this.hidSelectSalesID.Value.IndexOf('[') + 1), (this.hidSelectSalesID.Value.IndexOf(']') - 1));//"";//房控人员

            if (!CheckApproveUser(hotelInfoDBEntity.SalesID, 1))
            {
                ScriptManager.RegisterStartupScript(this.UpdatePanel5, this.GetType(), "updateScript", "BtnCompleteStyle();", true);
                return;
            }

            //hotelInfoDBEntity.Type = ddpSort.SelectedValue;
            //hotelInfoDBEntity.InDateFrom = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["OutStartDate"].ToString())) ? null : ViewState["OutStartDate"].ToString();
            //hotelInfoDBEntity.InDateTo = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["OutEndDate"].ToString())) ? null : ViewState["OutEndDate"].ToString();

            hotelInfoDBEntity.OrderID = strOrderID;

            hotelInfoDBEntity.OutStartDate = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["OutStartDate"].ToString())) ? null : ViewState["OutStartDate"].ToString();
            hotelInfoDBEntity.OutEndDate = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["OutEndDate"].ToString())) ? null : ViewState["OutEndDate"].ToString();

            //hotelInfoDBEntity.OutDate = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["OutDateTime"].ToString())) ? null : ViewState["OutDateTime"].ToString();
            hotelInfoDBEntity.AuditStatus = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["AuditStatus"].ToString())) ? null : ViewState["AuditStatus"].ToString();
            hotelInfoDBEntity.ADStatsBack = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["ADStatsBack"].ToString())) ? null : ViewState["ADStatsBack"].ToString();
            hotelInfoDBEntity.FaxStatus = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["FaxStatus"].ToString())) ? null : ViewState["FaxStatus"].ToString();
            _hotelinfoEntity.HotelInfoDBEntity.Add(hotelInfoDBEntity);
            dtResult = HotelInfoBP.GetOrderFaxApproveList(_hotelinfoEntity).QueryResult.Tables[0];//得到当天所有 有计划  的酒店

            if (dtResult.Rows.Count == 0)
            {
                messageContent.InnerHtml = "该审核人员绑定酒店无订单审核,请确认!";
            }
        }

        dtResult.DefaultView.Sort = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["SortID"].ToString())) ? "" : ViewState["SortID"].ToString();
        this.gridHotelList.DataSource = dtResult.DefaultView;
        this.gridHotelList.DataBind();

        //int UADCUN = 0;
        //int ADCUN = 0;
        ////int BCUN = 0;
        //for (int i = 0; i < gridHotelList.Rows.Count; i++)
        //{
        //    //首先判断是否是数据行
        //    if (gridHotelList.Rows[i].RowType == DataControlRowType.DataRow)
        //    {
        //        UADCUN = (String.IsNullOrEmpty(gridHotelList.DataKeys[i].Values[4].ToString())) ? 0 : int.Parse(gridHotelList.DataKeys[i].Values[4].ToString());
        //        ADCUN = (String.IsNullOrEmpty(gridHotelList.DataKeys[i].Values[5].ToString())) ? 0 : int.Parse(gridHotelList.DataKeys[i].Values[5].ToString());
        //        //BCUN = (String.IsNullOrEmpty(gridHotelList.DataKeys[i].Values[6].ToString())) ? 0 : int.Parse(gridHotelList.DataKeys[i].Values[6].ToString());

        //        if (UADCUN == ADCUN)
        //        {
        //            gridHotelList.Rows[i].Cells[0].Attributes.Add("bgcolor", "#70A88C");
        //            gridHotelList.Rows[i].Cells[1].Attributes.Add("bgcolor", "#70A88C");

        //            //gridHotelList.Rows[i].Attributes.Add("bgcolor", "#70A88C");
        //        }
        //        //else if (BCUN > 0)
        //        //{
        //        //    gridHotelList.Rows[i].Cells[0].Attributes.Add("bgcolor", "#94FB92");
        //        //    gridHotelList.Rows[i].Cells[1].Attributes.Add("bgcolor", "#94FB92");

        //        //    //gridHotelList.Rows[i].Attributes.Add("bgcolor", "#94FB92");
        //        //}
        //    }
        //}

        gridViewCSList.DataSource = null;
        gridViewCSList.DataBind();

        this.UpdatePanel1.Update();

        string strOrderCount = dtResult.Rows.Count > 0 ? dtResult.Compute("SUM(ordercount)", "").ToString() : "0";

        this.countNum.InnerText = dtResult.Rows.Count.ToString() + "/" + strOrderCount;
        this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "keys", "BtnCompleteStyle();", true);
    }
 public static HotelInfoEntity CommonHotelGroupSelect(HotelInfoEntity hotelInfoEntity)
 {
     hotelInfoEntity.QueryResult = HotelVp.Common.DBUtility.DbManager.Query("HotelInfo", "t_lm_b_common_hotelgrouplist", false);
     return hotelInfoEntity;
 }
 public static DataSet ClearDApproveData(HotelInfoEntity hotelInfoEntity, DataSet dsHotel, DataSet dsOrder)
 {
     HotelInfoDBEntity dbParm = (hotelInfoEntity.HotelInfoDBEntity.Count > 0) ? hotelInfoEntity.HotelInfoDBEntity[0] : new HotelInfoDBEntity();
     if (dsHotel.Tables.Count > 0 && dsHotel.Tables[0].Rows.Count > 0 && !String.IsNullOrEmpty(dbParm.ADStatsBack))
     {
         for (int i = dsHotel.Tables[0].Rows.Count - 1; i >= 0; i--)
         {
             if (!RefushDApproveData(hotelInfoEntity, dsHotel.Tables[0].Rows[i], dsOrder))
             {
                 dsHotel.Tables[0].Rows.RemoveAt(i);
             }
         }
     }
     return dsHotel;
 }
        public static bool chkInserBed(HotelInfoEntity hotelInfoEntity)
        {
            HotelInfoDBEntity dbParm = (hotelInfoEntity.HotelInfoDBEntity.Count > 0) ? hotelInfoEntity.HotelInfoDBEntity[0] : new HotelInfoDBEntity();
            OracleParameter[] dlmParm ={
                                    new OracleParameter("BEDCD",OracleType.VarChar),
                                    new OracleParameter("BEDNM",OracleType.VarChar)
                                };
            dlmParm[0].Value = dbParm.BedCode;
            dlmParm[1].Value = dbParm.BedName;

            DataSet dsResult = DbManager.Query("HotelInfo", "t_room_bed_inser_check", false, dlmParm);
            if (dsResult.Tables.Count > 0 && dsResult.Tables[0].Rows.Count > 0)
            {
                return false;
            }
            return true;
        }
        public static HotelInfoEntity GetConsultRoomHotelRoomList(HotelInfoEntity hotelInfoEntity)
        {
            OracleParameter[] parm ={
                                    new OracleParameter("SALES",OracleType.VarChar),
                                     new OracleParameter("EXTIME",OracleType.VarChar)
                                };
            HotelInfoDBEntity dbParm = (hotelInfoEntity.HotelInfoDBEntity.Count > 0) ? hotelInfoEntity.HotelInfoDBEntity[0] : new HotelInfoDBEntity();

            if (String.IsNullOrEmpty(dbParm.SalesID))
            {
                parm[0].Value = DBNull.Value;
            }
            else
            {
                parm[0].Value = dbParm.SalesID; ;
            }

            if (String.IsNullOrEmpty(dbParm.EffectDate))
            {
                parm[1].Value = DBNull.Value;
            }
            else
            {
                parm[1].Value = dbParm.EffectDate; ;
            }

            string SqlString = XmlSqlAnalyze.GotSqlTextFromXml("HotelInfo", "t_lm_b_hotelconsulting_roomtable");

            //if (!String.IsNullOrEmpty(dbParm.Type))
            //{
            //    SqlString = SqlString + dbParm.Type;
            //}
            hotelInfoEntity.QueryResult = DbHelperOra.Query(SqlString, true, parm);
            return hotelInfoEntity;

            //hotelInfoEntity.QueryResult = HotelVp.Common.DBUtility.DbManager.Query("HotelInfo", "t_lm_b_hotelconsulting_roomtable", true, parm);
            //return hotelInfoEntity;
        }
        public static int CheckSupInsert(HotelInfoEntity hotelInfoEntity)
        {
            OracleParameter[] parm ={
                                    new OracleParameter("HOTELNM",OracleType.VarChar),
                                    new OracleParameter("TEL",OracleType.VarChar),
                                    new OracleParameter("FAX",OracleType.VarChar),
                                    new OracleParameter("ADDRESS",OracleType.VarChar),
                                    new OracleParameter("LONGITUDE",OracleType.VarChar),
                                    new OracleParameter("LATITUDE",OracleType.VarChar)
                                };
            HotelInfoDBEntity dbParm = (hotelInfoEntity.HotelInfoDBEntity.Count > 0) ? hotelInfoEntity.HotelInfoDBEntity[0] : new HotelInfoDBEntity();
            parm[0].Value = dbParm.Name_CN;
            parm[1].Value = dbParm.Phone;
            parm[2].Value = dbParm.Fax;
            parm[3].Value = dbParm.AddRess;
            parm[4].Value = dbParm.Longitude;
            parm[5].Value = dbParm.Latitude;

            hotelInfoEntity.QueryResult = HotelVp.Common.DBUtility.DbManager.Query("HotelInfo", "t_lm_b_hotelinfo_supinsertcheck", false, parm);

            if (hotelInfoEntity.QueryResult.Tables.Count > 0 && hotelInfoEntity.QueryResult.Tables[0].Rows.Count > 0)
            {
                return 1;
            }
            return 0;
        }
    private void BindBalManagerListGrid()
    {
        _hotelinfoEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _hotelinfoEntity.LogMessages.Userid = UserSession.Current.UserAccount;
        _hotelinfoEntity.LogMessages.Username = UserSession.Current.UserDspName;
        _hotelinfoEntity.LogMessages.IpAddress = UserSession.Current.UserIP;

        _hotelinfoEntity.HotelInfoDBEntity = new List<HotelInfoDBEntity>();
        HotelInfoDBEntity hotelInfoDBEntity = new HotelInfoDBEntity();
        hotelInfoDBEntity.HotelID = hidHotelID.Value;

        hotelInfoDBEntity.HRoomList = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["BalRoomCD"].ToString())) ? null : ViewState["BalRoomCD"].ToString();
        hotelInfoDBEntity.InDateFrom = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["BalStartDT"].ToString())) ? null : ViewState["BalStartDT"].ToString();
        hotelInfoDBEntity.InDateTo = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["BalEndDT"].ToString())) ? null : ViewState["BalEndDT"].ToString();

        _hotelinfoEntity.HotelInfoDBEntity.Add(hotelInfoDBEntity);
        _hotelinfoEntity = HotelInfoBP.GetBalanceRoomHistory(_hotelinfoEntity);
        DataSet dsResult = _hotelinfoEntity.QueryResult;
        hidLMCount.Value = _hotelinfoEntity.LMCount.ToString();
        hidLM2Count.Value = _hotelinfoEntity.LM2Count.ToString();
        hidColsNM.Value = _hotelinfoEntity.Cols;
        //gridViewCSBalList.DataSource = dsResult.Tables[0].DefaultView;
        //gridViewCSBalList.DataKeyNames = new string[] { "ID" };//主键
        //gridViewCSBalList.DataBind();

        //for (int i = 0; i < gridViewCSBalList.Rows.Count; i++)
        //{
        //    for (int j = 0; j < dsResult.Tables[0].Columns.Count; j++)
        //    {
        //        gridViewCSBalList.Rows[i].Cells[j].HorizontalAlign = HorizontalAlign.Center;
        //    }
        //}
    }
        public static int DeleteLMSalesHistory(HotelInfoEntity hotelInfoEntity)
        {
            HotelInfoDBEntity dbParm = (hotelInfoEntity.HotelInfoDBEntity.Count > 0) ? hotelInfoEntity.HotelInfoDBEntity[0] : new HotelInfoDBEntity();
            OracleParameter[] dlmParm ={
                                    new OracleParameter("HOTELID",OracleType.VarChar),
                                    new OracleParameter("SALESID",OracleType.VarChar)
                                };
            dlmParm[0].Value = dbParm.HotelID;

            if (String.IsNullOrEmpty(dbParm.SalesID))
            {
                dlmParm[1].Value = DBNull.Value;
            }
            else
            {
                dlmParm[1].Value = dbParm.SalesID;
            }

            DbManager.ExecuteSql("HotelInfo", "t_lm_sales_history_delete", dlmParm);
            return 1;
        }
    public void GetBasicOrderAprInfo(string strHotelID)
    {
        HotelInfoEntity _hotelinfoEntity = new HotelInfoEntity();
        _hotelinfoEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _hotelinfoEntity.LogMessages.Userid = UserSession.Current.UserAccount;
        _hotelinfoEntity.LogMessages.Username = UserSession.Current.UserDspName;
        _hotelinfoEntity.LogMessages.IpAddress = UserSession.Current.UserIP;

        _hotelinfoEntity.HotelInfoDBEntity = new List<HotelInfoDBEntity>();
        HotelInfoDBEntity hotelInfoDBEntity = new HotelInfoDBEntity();
        hotelInfoDBEntity.HotelID = strHotelID;
        _hotelinfoEntity.HotelInfoDBEntity.Add(hotelInfoDBEntity);
        DataSet dsResult = HotelInfoBP.SelectHotelInfoEX(_hotelinfoEntity).QueryResult;
        if (dsResult.Tables.Count > 0 && dsResult.Tables[0].Rows.Count > 0)
        {
            //日/夜审
            if (dsResult.Tables[0].Rows[0]["Ex_Mode"].ToString() == "1") { this.rdOrderVerifyTypeFax.Checked = true; this.rdOrderVerifyTypeTel.Checked = false; }
            else { this.rdOrderVerifyTypeFax.Checked = false; this.rdOrderVerifyTypeTel.Checked = true; }
            //审核方式
            if (dsResult.Tables[0].Rows[0]["Ex_Time"].ToString() == "000000000111111111100000") { this.rdOrderVerifyTimeDay.Checked = true; this.rdOrderVerifyTimeNight.Checked = false; }
            else { this.rdOrderVerifyTimeDay.Checked = false; this.rdOrderVerifyTimeNight.Checked = true; }

            if (dsResult.Tables[0].Rows[0]["Ex_Time"].ToString() == "000000000111111111100000")
            {
                //审核联系人
                this.txtOrderVerifyLinkMan.Text = (String.IsNullOrEmpty(dsResult.Tables[0].Rows[0]["LINKMAN"].ToString())) ? "" : dsResult.Tables[0].Rows[0]["LINKMAN"].ToString().Split('|')[10].ToString();
                //审核联系电话
                this.txtOrderVerifyLinkTel.Text = (String.IsNullOrEmpty(dsResult.Tables[0].Rows[0]["LINKTEL"].ToString())) ? "" : dsResult.Tables[0].Rows[0]["LINKTEL"].ToString().Split('|')[10].ToString();
                //审核联系传真
                this.txtOrderVerifyLinkFax.Text = (String.IsNullOrEmpty(dsResult.Tables[0].Rows[0]["LINKFAX"].ToString())) ? "" : dsResult.Tables[0].Rows[0]["LINKFAX"].ToString().Split('|')[10].ToString();
            }
            else
            {
                //审核联系人
                this.txtOrderVerifyLinkMan.Text = (String.IsNullOrEmpty(dsResult.Tables[0].Rows[0]["LINKMAN"].ToString())) ? "" : dsResult.Tables[0].Rows[0]["LINKMAN"].ToString().Split('|')[0].ToString();
                //审核联系电话
                this.txtOrderVerifyLinkTel.Text = (String.IsNullOrEmpty(dsResult.Tables[0].Rows[0]["LINKTEL"].ToString())) ? "" : dsResult.Tables[0].Rows[0]["LINKTEL"].ToString().Split('|')[0].ToString();
                //审核联系传真
                this.txtOrderVerifyLinkFax.Text = (String.IsNullOrEmpty(dsResult.Tables[0].Rows[0]["LINKFAX"].ToString())) ? "" : dsResult.Tables[0].Rows[0]["LINKFAX"].ToString().Split('|')[0].ToString();
            }
            //审核备注
            this.txtOrderVerifyRemark.InnerHtml = dsResult.Tables[0].Rows[0]["REMARK"].ToString();
        }
        else
        {
            rdOrderVerifyTimeDay.Checked = false;
            rdOrderVerifyTimeNight.Checked = false;
            rdOrderVerifyTypeFax.Checked = false;
            rdOrderVerifyTypeTel.Checked = false;

            txtOrderVerifyLinkMan.Text = "";
            txtOrderVerifyLinkTel.Text = "";
            txtOrderVerifyLinkFax.Text = "";
            txtOrderVerifyRemark.Value = "";
        }
    }
        public static bool chkDApproveData(HotelInfoEntity hotelInfoEntity, DataRow drRow)
        {
            HotelInfoDBEntity dbParm = (hotelInfoEntity.HotelInfoDBEntity.Count > 0) ? hotelInfoEntity.HotelInfoDBEntity[0] : new HotelInfoDBEntity();

            string LDStatus = string.Empty;
            string NSStatus = string.Empty;
            string LDdbAppr = string.Empty;
            string NSdbAppr = string.Empty;
            string ADStatsBack = (String.IsNullOrEmpty(dbParm.ADStatsBack)) ? "" : dbParm.ADStatsBack;

            if (ADStatsBack.Contains("1") || ADStatsBack.Contains("3"))
            {
                LDStatus = "离店";
            }

            if (ADStatsBack.Contains("2") || ADStatsBack.Contains("4"))
            {
                NSStatus = "No-Show";
            }

            if (ADStatsBack.Contains("1"))
            {
                LDdbAppr = "0";
            }
            else if (ADStatsBack.Contains("3"))
            {
                LDdbAppr = "1";
            }

            if (ADStatsBack.Contains("2"))
            {
                NSdbAppr = "0";
            }
            else if (ADStatsBack.Contains("4"))
            {
                NSdbAppr = "1";
            }

            OrderInfoEntity _orderInfoEntity = new OrderInfoEntity();
            _orderInfoEntity.OrderInfoDBEntity = new List<OrderInfoDBEntity>();
            OrderInfoDBEntity orderinfoEntity = new OrderInfoDBEntity();
            orderinfoEntity.HotelID = drRow["prop"].ToString();
            orderinfoEntity.OutDate = dbParm.OutDate;
            orderinfoEntity.OrderID = dbParm.OrderID;
            orderinfoEntity.AuditStatus = dbParm.AuditStatus;
            orderinfoEntity.ADStatsBack = dbParm.ADStatsBack;
            _orderInfoEntity.OrderInfoDBEntity.Add(orderinfoEntity);

               DataSet dsOrders = OrderInfoDA.BindOrderApproveFaxList(_orderInfoEntity).QueryResult;
               DataSet dsResult = new DataSet();
               for (int i = dsOrders.Tables[0].Rows.Count - 1; i >= 0; i--)
               {
               if ("未审核".Equals(dsOrders.Tables[0].Rows[i]["ORDERST"].ToString()))
               {
                    continue;
               }

               if (!String.IsNullOrEmpty(ADStatsBack))
               {
                   DataCommand cmd = DataCommandManager.GetDataCommand("ChkApproveOrderList");
                   cmd.SetParameterValue("@ORDERID", dsOrders.Tables[0].Rows[i]["ORDERID"].ToString());
                   dsResult = cmd.ExecuteDataSet();

                   if (dsResult.Tables.Count == 0 || dsResult.Tables[0].Rows.Count == 0)
                   {
                       dsOrders.Tables[0].Rows.RemoveAt(i);
                   }
                   else
                   {
                       if ("离店".Equals(dsResult.Tables[0].Rows[0]["OD_STATUS"].ToString()))
                       {
                           if (!(!String.IsNullOrEmpty(LDStatus) && LDdbAppr.Equals(dsResult.Tables[0].Rows[0]["ISDBAPPROVE"].ToString())))
                           {
                               dsOrders.Tables[0].Rows.RemoveAt(i);
                           }
                       }
                       else if ("No-Show".Equals(dsResult.Tables[0].Rows[0]["OD_STATUS"].ToString()))
                       {
                           if (!(!String.IsNullOrEmpty(NSStatus) && NSdbAppr.Equals(dsResult.Tables[0].Rows[0]["ISDBAPPROVE"].ToString())))
                           {
                               dsOrders.Tables[0].Rows.RemoveAt(i);
                           }
                       }
                       else
                       {
                           dsOrders.Tables[0].Rows.RemoveAt(i);
                       }
                   }
               }
               }

               if (dsOrders.Tables.Count > 0 && dsOrders.Tables[0].Rows.Count > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
        public static HotelInfoEntity CountHotelOnlineLb(HotelInfoEntity hotelInfoEntity)
        {
            OracleParameter[] parm ={
                                    new OracleParameter("HotelID",OracleType.VarChar),
                                    new OracleParameter("EffectDate",OracleType.VarChar),
                                    new OracleParameter("CityID",OracleType.VarChar),
                                    new OracleParameter("AreaID",OracleType.VarChar)
                                };
            HotelInfoDBEntity dbParm = (hotelInfoEntity.HotelInfoDBEntity.Count > 0) ? hotelInfoEntity.HotelInfoDBEntity[0] : new HotelInfoDBEntity();
            parm[0].Value = dbParm.HotelID;
            parm[1].Value = dbParm.EffectDate;
            parm[2].Value = dbParm.City;
            parm[3].Value = dbParm.AreaID;

            hotelInfoEntity.QueryResult = HotelVp.Common.DBUtility.DbManager.Query("HotelInfo", "CountHotelOnlineLb", false, parm);
            return hotelInfoEntity;
        }
        public static HotelInfoEntity CreateHotelInfo(HotelInfoEntity hotelInfoEntity)
        {
            if (hotelInfoEntity.HotelInfoDBEntity.Count == 0)
            {
                hotelInfoEntity.Result = 0;
                return hotelInfoEntity;
            }

            if (hotelInfoEntity.LogMessages == null)
            {
                hotelInfoEntity.Result = 0;
                return hotelInfoEntity;
            }

            if (CheckSupInsert(hotelInfoEntity) > 0)
            {
                hotelInfoEntity.Result = 2;
                return hotelInfoEntity;
            }

            if (CheckSupCity(hotelInfoEntity) <= 0)
            {
                hotelInfoEntity.Result = 3;
                return hotelInfoEntity;
            }

            List<CommandInfo> sqlList = new List<CommandInfo>();
            HotelInfoDBEntity dbParm = (hotelInfoEntity.HotelInfoDBEntity.Count > 0) ? hotelInfoEntity.HotelInfoDBEntity[0] : new HotelInfoDBEntity();

            CommandInfo InsertLmbPropInfo = new CommandInfo();
            OracleParameter[] lmParm ={
                                    new OracleParameter("HOTELNM",OracleType.VarChar),
                                    new OracleParameter("HOTELEN",OracleType.VarChar),
                                    new OracleParameter("CITYID",OracleType.VarChar),
                                    new OracleParameter("STARRATING",OracleType.VarChar),
                                    new OracleParameter("DIAMONDRATING",OracleType.VarChar),
                                    new OracleParameter("ADDRESS",OracleType.VarChar),
                                    new OracleParameter("FAX",OracleType.VarChar),
                                     new OracleParameter("LONGITUDE",OracleType.VarChar),
                                    new OracleParameter("LATITUDE",OracleType.VarChar),
                                    new OracleParameter("CONTACTEMAIL",OracleType.VarChar),
                                    new OracleParameter("OPENDATE",OracleType.VarChar),
                                    new OracleParameter("REPAIRDATE",OracleType.VarChar),
                                    new OracleParameter("SIMPLEDESCZH",OracleType.VarChar),
                                    new OracleParameter("DESCZH",OracleType.VarChar),
                                    new OracleParameter("STATUSID",OracleType.VarChar),
                                    new OracleParameter("HOTELPN",OracleType.VarChar),
                                    new OracleParameter("TOTALROOMS",OracleType.VarChar),
                                    new OracleParameter("HOTELJP",OracleType.VarChar),
                                    new OracleParameter("ZIP",OracleType.VarChar),
                                    new OracleParameter("PRICELOW",OracleType.VarChar),
                                    new OracleParameter("CONTACTPER",OracleType.VarChar),
                                    new OracleParameter("CONTACTPHONE",OracleType.VarChar),
                                    new OracleParameter("PHONE",OracleType.VarChar),
                                    new OracleParameter("HOTELID",OracleType.Int32),
                                    new OracleParameter("EVALUATION",OracleType.VarChar),
                                    new OracleParameter("HOTELREMARK",OracleType.VarChar),
                                    new OracleParameter("WEBSITE",OracleType.VarChar),
                                    new OracleParameter("BDLONGITUDE",OracleType.VarChar),
                                    new OracleParameter("BDLATITUDE",OracleType.VarChar),
                                    new OracleParameter("KEYWORDS",OracleType.VarChar),
                                    new OracleParameter("HOTELGROUP",OracleType.VarChar),
                                    new OracleParameter("ISMYHOTEL",OracleType.VarChar)
                                };

            lmParm[0].Value = dbParm.Name_CN;
            lmParm[1].Value = dbParm.Name_EN;
            lmParm[2].Value = dbParm.City;
            lmParm[3].Value = dbParm.StarRating.Split('|')[0].ToString().Trim();
            lmParm[4].Value = dbParm.StarRating.Split('|')[1].ToString().Trim();
            lmParm[5].Value = dbParm.AddRess;
            lmParm[6].Value = dbParm.Fax;
            lmParm[7].Value = dbParm.Longitude;
            lmParm[8].Value = dbParm.Latitude;
            lmParm[9].Value = dbParm.ContactEmail;
            lmParm[10].Value = dbParm.OpenDate;
            lmParm[11].Value = dbParm.RepairDate;
            lmParm[12].Value = dbParm.SimpleDescZh;
            lmParm[13].Value = dbParm.DescZh;
            lmParm[14].Value = dbParm.Status;
            lmParm[15].Value = dbParm.HotelPN;
            lmParm[16].Value = dbParm.TotalRooms;
            lmParm[17].Value = dbParm.HotelJP;
            lmParm[18].Value = dbParm.Zip;
            lmParm[19].Value = dbParm.PriceLow;
            lmParm[20].Value = dbParm.ContactPer;
            lmParm[21].Value = dbParm.ContactPhone;
            lmParm[22].Value = dbParm.Phone;
            lmParm[23].Value = getMaxIDfromSeq("T_LM_B_PROP_SEQ");
            lmParm[24].Value = dbParm.Evaluation;
            //lmParm[25].Value = dbParm.HotelRemark;
            if (string.IsNullOrEmpty(dbParm.HotelRemark))
            {
                lmParm[25].Value = DBNull.Value;
            }else
            {
                lmParm[25].Value = dbParm.HotelRemark;
            }

            lmParm[26].Value = dbParm.WebSite;
            lmParm[27].Value = dbParm.BDLongitude;
            lmParm[28].Value = dbParm.BDLatitude;
            lmParm[29].Value = dbParm.KeyWords;
            lmParm[30].Value = dbParm.HotelGroup;
            lmParm[31].Value = dbParm.IsMyHotel;
            //lmParm[9].Value = dbParm.Bussiness;
            //DbManager.ExecuteSql("HotelInfo", "t_lm_b_suphotelinfo_insert", lmParm);

            InsertLmbPropInfo.SqlName = "HotelInfo";
            InsertLmbPropInfo.SqlId = "t_lm_b_createhotelinfo_insert";
            InsertLmbPropInfo.Parameters = lmParm;
            sqlList.Add(InsertLmbPropInfo);

            CommandInfo InsertLmbBussInfo = new CommandInfo();
            OracleParameter[] lmBussParm ={
                                    new OracleParameter("HOTELID",OracleType.VarChar)
                                };

            lmBussParm[0].Value = lmParm[23].Value;

            InsertLmbBussInfo.SqlName = "HotelInfo";
            InsertLmbBussInfo.SqlId = "t_lm_b_fvphotelbussinfo_insert";
            InsertLmbBussInfo.Parameters = lmBussParm;
            sqlList.Add(InsertLmbBussInfo);

            if (!String.IsNullOrEmpty(dbParm.Bussiness))
            {
                string strAreaID = "";
                string[] strBusList = dbParm.Bussiness.Split(',');
                foreach (string par in strBusList)
                {
                    strAreaID = (par.IndexOf("]") >= 0) ? par.Substring((par.IndexOf('[') + 1), (par.IndexOf(']') - 1)) : "";
                    if (String.IsNullOrEmpty(strAreaID))
                    {
                        continue;
                    }
                    CommandInfo InsertLmbAreaInfo = new CommandInfo();
                    OracleParameter[] lmAreaParm ={
                                    new OracleParameter("HOTELID",OracleType.VarChar),
                                    new OracleParameter("AREAID",OracleType.VarChar)
                                };

                    lmAreaParm[0].Value = lmParm[23].Value;
                    lmAreaParm[1].Value = strAreaID;

                    InsertLmbAreaInfo.SqlName = "HotelInfo";
                    InsertLmbAreaInfo.SqlId = "t_lm_b_suphotelareainfo_insert";
                    InsertLmbAreaInfo.Parameters = lmAreaParm;
                    sqlList.Add(InsertLmbAreaInfo);
                }
            }

            DbManager.ExecuteSqlTran(sqlList);

            hotelInfoEntity.Result = 1;
            hotelInfoEntity.ErrorMSG = lmParm[23].Value.ToString();
            return hotelInfoEntity;
        }