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 void GetShwoHisPlanInfoList(string strHotelID, string effectDate, string priceCode, string roomCode) { _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.EffectDate = DateTime.Parse(effectDate).ToShortDateString().Replace("/", "-"); hotelInfoDBEntity.PriceCode = priceCode; hotelInfoDBEntity.RoomCode = roomCode; _hotelinfoEntity.HotelInfoDBEntity.Add(hotelInfoDBEntity); DataSet dsResult = HotelInfoBP.GetShwoHisPlanInfoList(_hotelinfoEntity).QueryResult; if (dsResult.Tables.Count == 0 || dsResult.Tables[0].Rows.Count == 0) { dvHisPlanInfoList.InnerHtml = "无酒店计划历史,请确认!"; return; } StringBuilder sbString = new StringBuilder(); string strTemp = string.Empty; string strMsg = string.Empty; //修改计划 string strMeno = string.Empty; sbString.Append("<table cellspacing='0' cellpadding='0' width='100%' style='border:1px solid #D5D5D5'><tr class='GView_HeaderCSS' style='border-collapse:collapse'><td width='30%' style='white-space:nowrap; border: solid #D5D5D5 1px;'>操作人</td><td width='40%' style='white-space:nowrap; border: solid #D5D5D5 1px;'>操作时间</td><td width='30%' style='white-space:nowrap; border: solid #D5D5D5 1px;'>操作内容</td></tr>"); for (int i = 0; i < dsResult.Tables[0].Rows.Count; i++) { strMsg = dsResult.Tables[0].Rows[i]["ope_msg"].ToString(); strMeno = dsResult.Tables[0].Rows[i]["opememo"].ToString(); if ("修改计划".Equals(strMeno)) { if (strMsg.Contains("status") && "F".Equals(strMsg.Substring(strMsg.IndexOf("status") + 7, 1).Trim().ToUpper())) { strMeno = "操作下线"; } if (strMsg.Contains("isRoomful") && "1".Equals(strMsg.Substring(strMsg.IndexOf("isRoomful") + 10, 1).Trim().ToUpper())) { strMeno = ("操作下线".Equals(strMeno)) ? "满房&下线" : "标记满房"; } } strTemp = strTemp + "<tr id='" + "trHis" + i.ToString() + "' class='GView_ItemCSS' style='border-collapse:collapse' onclick=DvChangeEvent('" + "dvHis" + i.ToString() + "','" + "trHis" + i.ToString() + "')><td style='border:1px solid #D5D5D5'><font color='#3A599C'>" + dsResult.Tables[0].Rows[i]["operator"].ToString().PadRight(25, ' ') + "</font></td><td style='border:1px solid #D5D5D5'><font color='#3A599C'>" + dsResult.Tables[0].Rows[i]["opetime"].ToString() + "</font></td><td style='border:1px solid #D5D5D5'><font color='#3A599C'>" + strMeno + "</font></td></tr>"; strTemp = strTemp + "<tr id='" + "dvHis" + i.ToString() + "' style='display:none;border:1px solid #D5D5D5;border-collapse:collapse;'><td colspan='3' style='border:1px solid #D5D5D5;' align='left'>" + dsResult.Tables[0].Rows[i]["ope_msg"].ToString() + "</td></tr>"; sbString.Append(strTemp); strTemp = ""; strMeno = ""; } sbString.Append("</table>"); dvHisPlanInfoList.InnerHtml = sbString.ToString(); }
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; }
/// <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; }
/// <summary> /// 生成房型列表 /// </summary> /// <param name="strHotelID"></param> public void BindBalanceRoomList(string strHotelID) { chkHotelRoomListLMBAR2.Items.Clear(); chkHotelRoomListLMBAR.Items.Clear(); _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 hotelInfoDBEntity.PriceCode = "LMBAR2";//价格代码 _hotelinfoEntity.HotelInfoDBEntity.Add(hotelInfoDBEntity); DataSet dsResultLMBAR2 = HotelInfoBP.GetBalanceRoomList(_hotelinfoEntity).QueryResult; if (dsResultLMBAR2.Tables.Count > 0 && dsResultLMBAR2.Tables[0].Rows.Count > 0) { chkHotelRoomListLMBAR2.DataTextField = "ROOMNM"; chkHotelRoomListLMBAR2.DataValueField = "ROOMCODE"; chkHotelRoomListLMBAR2.DataSource = dsResultLMBAR2; chkHotelRoomListLMBAR2.DataBind(); } _hotelinfoEntity.HotelInfoDBEntity = new List<HotelInfoDBEntity>(); hotelInfoDBEntity = new HotelInfoDBEntity(); hotelInfoDBEntity.HotelID = strHotelID;//酒店ID hotelInfoDBEntity.PriceCode = "LMBAR";//价格代码 _hotelinfoEntity.HotelInfoDBEntity.Add(hotelInfoDBEntity); DataSet dsResultLMBAR = HotelInfoBP.GetBalanceRoomList(_hotelinfoEntity).QueryResult; if (dsResultLMBAR.Tables.Count > 0 && dsResultLMBAR.Tables[0].Rows.Count > 0) { chkHotelRoomListLMBAR.DataTextField = "ROOMNM"; chkHotelRoomListLMBAR.DataValueField = "ROOMCODE"; chkHotelRoomListLMBAR.DataSource = dsResultLMBAR; chkHotelRoomListLMBAR.DataBind(); } }
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; }
/// <summary> /// 酒店信息-LM联系人 /// </summary> public void GetBasicLMInfo(string strHotelID) { _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.BindHotelList(_hotelinfoEntity).QueryResult; if (dsResult.Tables.Count > 0 && dsResult.Tables[0].Rows.Count > 0) { ContactTel.Text = dsResult.Tables[0].Rows[0]["PHONE"].ToString(); ContactMan.Text = dsResult.Tables[0].Rows[0]["CONTACTPER"].ToString(); } else { ContactTel.Text = ""; ContactMan.Text = ""; } }
private void SetBtnSearchClick() { if (!String.IsNullOrEmpty(Request.QueryString["hid"])) { string HotelID = Request.QueryString["hid"].ToString().Trim(); MessageContent.InnerHtml = ""; _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; _hotelinfoEntity.HotelInfoDBEntity.Add(hotelInfoDBEntity); DataSet dsResult = HotelInfoBP.ChkLMPropHotelList(_hotelinfoEntity).QueryResult; if (dsResult.Tables.Count > 0 && dsResult.Tables[0].Rows.Count > 0) { //wctHotel.AutoResult = dsResult.Tables[0].Rows[0]["REVALUE_ALL"].ToString(); SetSelectHotelControl(); } } }
private void GetBalanceRoomList(string strHotelID) { _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; _hotelinfoEntity.HotelInfoDBEntity.Add(hotelInfoDBEntity); DataSet dsResult = HotelInfoBP.GetBalanceRoomList(_hotelinfoEntity).QueryResult; if (dsResult.Tables.Count > 0 && dsResult.Tables[0].Rows.Count > 0) { //chkHotelRoomList.DataTextField = "ROOMNM"; //chkHotelRoomList.DataValueField = "ROOMCODE"; //chkHotelRoomList.DataSource = dsResult; //chkHotelRoomList.DataBind(); DataRow dr0 = dsResult.Tables[0].NewRow(); dr0["ROOMCODE"] = ""; dr0["ROOMNM"] = "不限制"; dsResult.Tables[0].Rows.InsertAt(dr0, 0); //ddpRoomList.DataTextField = "ROOMNM"; //ddpRoomList.DataValueField = "ROOMCODE"; //ddpRoomList.DataSource = dsResult.Tables[0].DefaultView; //ddpRoomList.DataBind(); } }
private void GetSalesManager(string strHotelID) { _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; _hotelinfoEntity.HotelInfoDBEntity.Add(hotelInfoDBEntity); DataSet dsResult = HotelInfoBP.GetSalesManager(_hotelinfoEntity).QueryResult; if (dsResult.Tables.Count > 0 && dsResult.Tables[0].Rows.Count > 0) { //dpSalesStart.Value = dsResult.Tables[0].Rows[0]["StartDtime"].ToString().Replace('/','-'); //dpSalesEnd.Value = dsResult.Tables[0].Rows[0]["EndDtime"].ToString().Replace('/', '-'); //wctSales.AutoResult = dsResult.Tables[0].Rows[0]["DISPNM"].ToString(); hidSalesID.Value = dsResult.Tables[0].Rows[0]["DISPNM"].ToString(); } BindSalesManagerListGrid(); }
private DataTable GetHotelRoomList(string hotelID) { HotelInfoEntity _hotelinfoEntity = new HotelInfoEntity(); CommonEntity _commonEntity = new CommonEntity(); _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; _hotelinfoEntity.HotelInfoDBEntity.Add(hotelInfoDBEntity); DataSet dsResult = HotelInfoBP.GetHotelRoomList(_hotelinfoEntity).QueryResult; return dsResult.Tables[0]; }
private void BindSalesManagerListGrid() { _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; _hotelinfoEntity.HotelInfoDBEntity.Add(hotelInfoDBEntity); DataSet dsResult = HotelInfoBP.GetSalesManagerSettingHistory(_hotelinfoEntity).QueryResult; //gridViewCSSalesList.DataSource = dsResult.Tables[0].DefaultView; //gridViewCSSalesList.DataKeyNames = new string[] { "SALESNM" };//主键 //gridViewCSSalesList.DataBind(); }
protected void btnReadFog_Click(object sender, EventArgs e) { MessageContent.InnerHtml = ""; _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(); _hotelinfoEntity.HotelInfoDBEntity.Add(hotelInfoDBEntity); hotelInfoDBEntity.HotelID = hidHotelID.Value; DataSet dsResult = HotelInfoBP.ReadFogHotelInfo(_hotelinfoEntity).QueryResult; if (dsResult.Tables.Count == 0 || dsResult.Tables[0].Rows.Count == 0) { return; } txtHotelNM.Text = dsResult.Tables[0].Rows[0]["HOTELNM"].ToString(); //txtHotelNMEN.Text = dsResult.Tables[0].Rows[0]["HotelNMEN"].ToString(); //ddpStatusList.SelectedValue = dsResult.Tables[0].Rows[0]["ONLINESTATUS"].ToString(); //ddpHotelGroup.SelectedValue = dsResult.Tables[0].Rows[0]["GROUPID"].ToString(); //ddpStarRating.SelectedValue = dsResult.Tables[0].Rows[0]["STARRATING"].ToString(); //ddpDiamondRating.SelectedValue = dsResult.Tables[0].Rows[0]["DIAMONDRATING"].ToString(); ////ddpProvincial.SelectedIndex=-1; //ddpCity.SelectedValue = dsResult.Tables[0].Rows[0]["CITYID"].ToString(); //lbFogStatus.Text = dsResult.Tables[0].Rows[0]["FOGSTATUSDIS"].ToString(); //hidFogStatus.Value = dsResult.Tables[0].Rows[0]["FOGSTATUS"].ToString(); //ddpHotelGroup.SelectedValue = dsResult.Tables[0].Rows[0]["GROUPID"].ToString().Trim(); if (!String.IsNullOrEmpty(dsResult.Tables[0].Rows[0]["STARRATING"].ToString())) { ddpStarRating.SelectedValue = dsResult.Tables[0].Rows[0]["STARRATING"].ToString(); } if (!String.IsNullOrEmpty(dsResult.Tables[0].Rows[0]["DIAMONDRATING"].ToString())) { //ddpDiamondRating.SelectedValue = dsResult.Tables[0].Rows[0]["DIAMONDRATING"].ToString(); } if (!String.IsNullOrEmpty(dsResult.Tables[0].Rows[0]["CITYID"].ToString())) { //ddpCity.SelectedValue = dsResult.Tables[0].Rows[0]["CITYID"].ToString(); } dpOpenDate.Value = dsResult.Tables[0].Rows[0]["OPENDATE"].ToString(); dpRepairDate.Value = dsResult.Tables[0].Rows[0]["REPAIRDATE"].ToString(); txtAddress.Text = dsResult.Tables[0].Rows[0]["ADDRESS"].ToString(); //txtWebSite.Text = dsResult.Tables[0].Rows[0]["WEBSITE"].ToString(); //txtPhone.Text = dsResult.Tables[0].Rows[0]["PHONE"].ToString(); //txtFax.Text = dsResult.Tables[0].Rows[0]["FAX"].ToString(); //txtContactPer.Text = dsResult.Tables[0].Rows[0]["CONTACTPER"].ToString(); //txtContactEmail.Text = dsResult.Tables[0].Rows[0]["CONTACTEMAIL"].ToString(); txtLongitude.Text = dsResult.Tables[0].Rows[0]["LONGITUDE"].ToString(); txtLatitude.Text = dsResult.Tables[0].Rows[0]["LATITUDE"].ToString(); txtSimpleDescZh.Text = dsResult.Tables[0].Rows[0]["SIMPLEDESCZH"].ToString(); txtDescZh.Text = dsResult.Tables[0].Rows[0]["DESCZH"].ToString(); //txtEvaluation.Text = dsResult.Tables[0].Rows[0]["EVALUATION"].ToString(); //divModify.Style.Add("display", "none"); divBtnList.Style.Add("display", ""); //dvSales.Style.Add("display", ""); //dvBalSearch.Style.Add("display", ""); //dvBalAdd.Style.Add("display", ""); RestControlEnable(true, 2); SetEvalGridBtnStyle(true); //dvLink.Style.Add("display", ""); //dvEvlGrid.Style.Add("display", ""); RestBalGridData(); //this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "key", "SetSelectEnable('disabled')", true); }
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 DataTable GetHotel(string hotelID, string cityID, string areaID, string SalesID, string Type, string EffDate) { 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(); #region 单个查询酒店 if (!string.IsNullOrEmpty(hotelID)) { hotelInfoDBEntity.HotelID = hotelID == "" ? "" : hotelID.Substring((hotelID.IndexOf('[') + 1), (hotelID.IndexOf(']') - 1));//酒店ID hotelInfoDBEntity.Type = Type;//排序方式 hotelInfoDBEntity.EffectDate = EffDate;//排序方式 _hotelinfoEntity.HotelInfoDBEntity.Add(hotelInfoDBEntity); dtResult = HotelInfoBP.GetConsultRoomHotelRoomListByProp(_hotelinfoEntity).QueryResult.Tables[0]; } #endregion #region 城市 商圈 if (!string.IsNullOrEmpty(cityID) || !string.IsNullOrEmpty(areaID)) { 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.Type = Type;//排序方式 hotelInfoDBEntity.EffectDate = EffDate;//排序方式 _hotelinfoEntity.HotelInfoDBEntity.Add(hotelInfoDBEntity); dtResult = HotelInfoBP.GetConsultRoomHotelRoomListByHotel(_hotelinfoEntity).QueryResult.Tables[0]; } #endregion #region 询房用户 if (!string.IsNullOrEmpty(SalesID)) { hotelInfoDBEntity.SalesID = SalesID == "" ? "" : SalesID.Substring((SalesID.IndexOf('[') + 1), (SalesID.IndexOf(']') - 1));//房控人员 hotelInfoDBEntity.Type = Type;//排序方式 hotelInfoDBEntity.EffectDate = EffDate;//排序方式 _hotelinfoEntity.HotelInfoDBEntity.Add(hotelInfoDBEntity); dtResult = HotelInfoBP.GetConsultRoomHotelRoomList(_hotelinfoEntity).QueryResult.Tables[0];//得到当天所有 有计划 的酒店 #region 过滤所有计划关闭 且 关闭人为销售人员 if (dtResult != null && dtResult.Rows.Count > 0) { DataTable dtNewResult = new DataTable(); dtNewResult.Columns.Add("PROP"); dtNewResult.Columns.Add("CITYID"); dtNewResult.Columns.Add("NAME_CN"); dtNewResult.Columns.Add("LINKMAN"); dtNewResult.Columns.Add("LINKTEL"); dtNewResult.Columns.Add("LINKEMAIL"); dtNewResult.Columns.Add("SALES_ACCOUNT"); dtNewResult.Columns.Add("PROP_NAME_ZH"); dtNewResult.Columns.Add("ISPLAN"); dtNewResult.Columns.Add("ORDERCOUNT"); dtNewResult.Columns.Add("EXLINKMAN"); dtNewResult.Columns.Add("EXLINKTEL"); dtNewResult.Columns.Add("EXREMARK"); dtNewResult.Columns.Add("BACKPROPNAME"); dtNewResult.Columns.Add("EXMODE"); dtNewResult.Columns.Add("HASBEENTOHOTELS"); dtNewResult.Columns.Add("COLOR"); DataTable dtSales = GetSalesManagerList();//所有的销售人员 string FilterJJHotels = (String.IsNullOrEmpty(ConfigurationManager.AppSettings["FilterJinJiangHotels"])) ? "" : ConfigurationManager.AppSettings["FilterJinJiangHotels"].ToString().Trim(); string hotelId = ""; bool IsFlag = false; for (int i = 0; i < dtResult.Rows.Count; i++) { IsFlag = false; if (hotelId == "" || hotelId != dtResult.Rows[i]["prop"].ToString()) { #region for (int j = 0; j < FilterJJHotels.Split(',').Length; j++) { if (!string.IsNullOrEmpty(FilterJJHotels.Split(',')[j].ToString())) { if (dtResult.Rows[i]["prop"].ToString() == FilterJJHotels.Split(',')[j].ToString()) { IsFlag = true; break; } } } #endregion if (!IsFlag) { #region hotelId = dtResult.Rows[i]["prop"].ToString(); DataRow[] rowsAll = dtResult.Select("prop='" + hotelId + "'");//获取当前酒店所有计划 DataRow[] rowsCloseAll = dtResult.Select("prop='" + hotelId + "' and status=0");//获取当前酒店所有已关闭的计划 if (rowsAll.Length > 0 && rowsCloseAll.Length > 0) { if (rowsAll.Length == rowsCloseAll.Length)//计划全部关闭 且 关闭人为销售人员 { int count = 0; for (int j = 0; j < rowsCloseAll.Length; j++) { DataRow[] salesRow = dtSales.Select("REVALUE_ALL like '%" + rowsCloseAll[j]["MODIFIER"].ToString() + "%'"); if (salesRow.Length > 0) { count++; continue; } else { break; } } if (count != rowsCloseAll.Length) { DataRow dr = dtNewResult.NewRow(); dr["PROP"] = hotelId; dr["CITYID"] = dtResult.Rows[i]["cityid"].ToString(); dr["NAME_CN"] = dtResult.Rows[i]["name_cn"].ToString(); dr["LINKMAN"] = dtResult.Rows[i]["linkman"].ToString(); dr["LINKTEL"] = dtResult.Rows[i]["linktel"].ToString(); dr["LINKEMAIL"] = dtResult.Rows[i]["linkemail"].ToString(); dr["SALES_ACCOUNT"] = dtResult.Rows[i]["sales_account"].ToString(); dr["PROP_NAME_ZH"] = dtResult.Rows[i]["PROP_NAME_ZH"].ToString(); dr["isplan"] = dtResult.Rows[i]["isplan"].ToString(); dr["ordercount"] = dtResult.Rows[i]["ordercount"].ToString(); dr["EXLinkMan"] = dtResult.Rows[i]["EXLinkMan"].ToString() == "" ? "" : dtResult.Rows[i]["EXLinkMan"].ToString().Split('|')[0].ToString(); dr["EXLinkTel"] = dtResult.Rows[i]["EXLinkTel"].ToString() == "" ? " " : "(" + dtResult.Rows[i]["EXLinkTel"].ToString().Split('|')[0].ToString() + ")"; dr["EXRemark"] = dtResult.Rows[i]["EXRemark"].ToString() == "" ? "" : dtResult.Rows[i]["EXRemark"].ToString().Split('|')[0].ToString(); dr["BackPropName"] = dtResult.Rows[i]["PROP_NAME_ZH"].ToString(); dr["EXMODE"] = dtResult.Rows[i]["EXMODE"]; dr["HASBEENTOHOTELS"] = dtResult.Rows[i]["HasBeenToHotels"]; dr["COLOR"] = dtResult.Rows[i]["Color"]; dtNewResult.Rows.Add(dr); } } else { DataRow dr = dtNewResult.NewRow(); dr["PROP"] = hotelId; dr["CITYID"] = dtResult.Rows[i]["cityid"].ToString(); dr["NAME_CN"] = dtResult.Rows[i]["name_cn"].ToString(); dr["LINKMAN"] = dtResult.Rows[i]["linkman"].ToString(); dr["LINKTEL"] = dtResult.Rows[i]["linktel"].ToString(); dr["LINKEMAIL"] = dtResult.Rows[i]["linkemail"].ToString(); dr["SALES_ACCOUNT"] = dtResult.Rows[i]["sales_account"].ToString(); dr["PROP_NAME_ZH"] = dtResult.Rows[i]["PROP_NAME_ZH"].ToString(); dr["isplan"] = dtResult.Rows[i]["isplan"].ToString(); dr["ordercount"] = dtResult.Rows[i]["ordercount"].ToString(); dr["EXLinkMan"] = dtResult.Rows[i]["EXLinkMan"].ToString() == "" ? "" : dtResult.Rows[i]["EXLinkMan"].ToString().Split('|')[0].ToString(); dr["EXLinkTel"] = dtResult.Rows[i]["EXLinkTel"].ToString() == "" ? " " : "(" + dtResult.Rows[i]["EXLinkTel"].ToString().Split('|')[0].ToString() + ")"; dr["EXRemark"] = dtResult.Rows[i]["EXRemark"].ToString() == "" ? "" : dtResult.Rows[i]["EXRemark"].ToString().Split('|')[0].ToString(); dr["BackPropName"] = dtResult.Rows[i]["PROP_NAME_ZH"].ToString(); dr["EXMODE"] = dtResult.Rows[i]["EXMODE"]; dr["HASBEENTOHOTELS"] = dtResult.Rows[i]["HasBeenToHotels"]; dr["COLOR"] = dtResult.Rows[i]["Color"]; dtNewResult.Rows.Add(dr); } } else { DataRow dr = dtNewResult.NewRow(); dr["PROP"] = hotelId; dr["CITYID"] = dtResult.Rows[i]["cityid"].ToString(); dr["NAME_CN"] = dtResult.Rows[i]["name_cn"].ToString(); dr["LINKMAN"] = dtResult.Rows[i]["linkman"].ToString(); dr["LINKTEL"] = dtResult.Rows[i]["linktel"].ToString(); dr["LINKEMAIL"] = dtResult.Rows[i]["linkemail"].ToString(); dr["SALES_ACCOUNT"] = dtResult.Rows[i]["sales_account"].ToString(); dr["PROP_NAME_ZH"] = dtResult.Rows[i]["PROP_NAME_ZH"].ToString(); dr["isplan"] = dtResult.Rows[i]["isplan"].ToString(); dr["ordercount"] = dtResult.Rows[i]["ordercount"].ToString(); dr["EXLinkMan"] = dtResult.Rows[i]["EXLinkMan"].ToString() == "" ? "" : dtResult.Rows[i]["EXLinkMan"].ToString().Split('|')[0].ToString(); dr["EXLinkTel"] = dtResult.Rows[i]["EXLinkTel"].ToString() == "" ? " " : "(" + dtResult.Rows[i]["EXLinkTel"].ToString().Split('|')[0].ToString() + ")"; dr["EXRemark"] = dtResult.Rows[i]["EXRemark"].ToString() == "" ? "" : dtResult.Rows[i]["EXRemark"].ToString().Split('|')[0].ToString(); dr["BackPropName"] = dtResult.Rows[i]["PROP_NAME_ZH"].ToString(); dr["EXMODE"] = dtResult.Rows[i]["EXMODE"]; dr["HASBEENTOHOTELS"] = dtResult.Rows[i]["HasBeenToHotels"]; dr["COLOR"] = dtResult.Rows[i]["Color"]; dtNewResult.Rows.Add(dr); } #endregion } } } for (int i = 0; i < dtNewResult.Rows.Count; i++) { if (dtNewResult.Rows[i]["EXMODE"].ToString() == "3") { dtNewResult.Rows.Remove(dtNewResult.Rows[i]); } } dtNewResult.DefaultView.Sort = Type; dtResult = dtNewResult.DefaultView.ToTable(); } #endregion } #endregion DataTable dtConsultResult = GetConsultRoomHistoryList().Tables[0];//获取已询房酒店列表 for (int i = 0; i < dtResult.Rows.Count; i++) { for (int j = 0; j < dtConsultResult.Rows.Count; j++) { if (dtResult.Rows[i]["prop"].ToString().Trim() == dtConsultResult.Rows[j]["HotelID"].ToString().Trim()) { if (DateTime.Parse(dtConsultResult.Rows[j]["PlanDate"].ToString()).ToShortDateString() == DateTime.Now.ToShortDateString()) { if (DateTime.Parse(dtConsultResult.Rows[j]["CreateTime"].ToString()).Hour >= 18) { dtResult.Rows[i]["Color"] = "#FF6666"; //gridHotelList.Rows[i].Cells[7].Text = "#CD5C5C"; //gridHotelList.Rows[i].BackColor = System.Drawing.ColorTranslator.FromHtml("#FF6666"); //((System.Web.UI.WebControls.WebControl)((Label)gridHotelList.Rows[i].FindControl("Label1"))).BackColor = System.Drawing.ColorTranslator.FromHtml("#CD5C5C"); } else { dtResult.Rows[i]["Color"] = "#80c0a0"; //gridHotelList.Rows[i].Cells[7].Text = "#70A88C"; //gridHotelList.Rows[i].BackColor = System.Drawing.ColorTranslator.FromHtml("#80c0a0"); //((System.Web.UI.WebControls.WebControl)((Label)gridHotelList.Rows[i].FindControl("Label1"))).BackColor = System.Drawing.ColorTranslator.FromHtml("#70A88C"); } dtResult.Rows[i]["HasBeenToHotels"] = "1"; } } } } return dtResult; }
public static string GetBasicSalesInfo(string hotelID) { 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; _hotelinfoEntity.HotelInfoDBEntity.Add(hotelInfoDBEntity); DataSet dsResult = HotelInfoBP.GetSalesManager(_hotelinfoEntity).QueryResult; string result = ""; if (dsResult.Tables.Count > 0 && dsResult.Tables[0].Rows.Count > 0) { result = "LM酒店负责人:" + dsResult.Tables[0].Rows[0]["DISPNM"].ToString().Replace("null", "") + " 电话:" + dsResult.Tables[0].Rows[0]["User_Tel"].ToString().Replace("null", ""); } else { result = "LM酒店负责人: 电话: "; } return "{\"message\":\"" + result + "\",\"code\":200}"; }
protected void btnSaveSales_Click(object sender, EventArgs e) { hidSelectedID.Value = "1"; MessageContent.InnerHtml = ""; bool bFlag = true; string msgString = ""; if (String.IsNullOrEmpty(wctSales.AutoResult) || !wctSales.AutoResult.Trim().Equals(hidSalesID.Value.Trim())) { msgString = msgString + GetLocalResourceObject("UpdateError14").ToString() + "<br/>"; bFlag = false; } if (String.IsNullOrEmpty(dpSalesStart.Value) || String.IsNullOrEmpty(dpSalesEnd.Value)) { msgString = msgString + GetLocalResourceObject("UpdateError15").ToString() + "<br/>"; bFlag = false; } if (String.IsNullOrEmpty(txtPhone.Text.ToString().Trim())) { msgString = msgString + GetLocalResourceObject("UpdateError61").ToString() + "<br/>"; bFlag = false; } if (String.IsNullOrEmpty(txtFax.Text.ToString().Trim())) { msgString = msgString + GetLocalResourceObject("UpdateError71").ToString() + "<br/>"; bFlag = false; } if (!String.IsNullOrEmpty(txtPhone.Text.ToString().Trim()) && (StringUtility.Text_Length(txtPhone.Text.ToString().Trim()) > 40)) { msgString = msgString + GetLocalResourceObject("UpdateError6").ToString() + "<br/>"; bFlag = false; } if (!String.IsNullOrEmpty(txtFax.Text.ToString().Trim()) && (StringUtility.Text_Length(txtFax.Text.ToString().Trim()) > 20)) { msgString = msgString + GetLocalResourceObject("UpdateError7").ToString() + "<br/>"; bFlag = false; } if (StringUtility.Text_Length(txtContactPer.Text.ToString().Trim()) > 100) { msgString = msgString + GetLocalResourceObject("UpdateError10").ToString() + "<br/>"; bFlag = false; } if (StringUtility.Text_Length(txtContactEmail.Text.ToString().Trim()) > 100) { msgString = msgString + GetLocalResourceObject("UpdateError11").ToString() + "<br/>"; bFlag = false; } if (!bFlag) { MessageContent.InnerHtml = GetLocalResourceObject("UpdateError13").ToString() + "<br/>" + msgString; RestBalGridData(); return; } _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.Name_CN = txtHotelNM.Text.Trim(); hotelInfoDBEntity.SalesID = hidSalesID.Value.Substring((hidSalesID.Value.IndexOf('[') + 1), (hidSalesID.Value.IndexOf(']') - 1)); hotelInfoDBEntity.Phone = txtPhone.Text.Trim(); hotelInfoDBEntity.Fax = txtFax.Text.Trim(); hotelInfoDBEntity.ContactPer = txtContactPer.Text.Trim(); hotelInfoDBEntity.ContactEmail = txtContactEmail.Text.Trim(); hotelInfoDBEntity.SalesStartDT = dpSalesStart.Value; hotelInfoDBEntity.SalesEndDT = dpSalesEnd.Value; _hotelinfoEntity.HotelInfoDBEntity.Add(hotelInfoDBEntity); int iResult = HotelInfoBP.UpdateHotelSalesList(_hotelinfoEntity); _commonEntity.LogMessages = _hotelinfoEntity.LogMessages; _commonEntity.CommonDBEntity = new List<CommonDBEntity>(); CommonDBEntity commonDBEntity = new CommonDBEntity(); commonDBEntity.Event_Type = "酒店签约信息-保存"; commonDBEntity.Event_ID = hidHotelID.Value; string conTent = GetLocalResourceObject("EventInsertSalesMessage").ToString(); conTent = string.Format(conTent, hotelInfoDBEntity.HotelID, hotelInfoDBEntity.Name_CN, hotelInfoDBEntity.Fax, hotelInfoDBEntity.Phone, hotelInfoDBEntity.ContactPer, hotelInfoDBEntity.ContactEmail, hotelInfoDBEntity.SalesID, hotelInfoDBEntity.SalesStartDT, hotelInfoDBEntity.SalesEndDT); commonDBEntity.Event_Content = conTent; if (iResult == 1) { commonDBEntity.Event_Result = GetLocalResourceObject("UpdateSalesSuccess").ToString(); MessageContent.InnerHtml = GetLocalResourceObject("UpdateSalesSuccess").ToString(); BindSalesManagerListGrid(); } else if (iResult == 2) { commonDBEntity.Event_Result = GetLocalResourceObject("UpdateSalesError2").ToString(); MessageContent.InnerHtml = GetLocalResourceObject("UpdateSalesError2").ToString(); } else { commonDBEntity.Event_Result = GetLocalResourceObject("UpdateError13").ToString(); MessageContent.InnerHtml = GetLocalResourceObject("UpdateError13").ToString(); } _commonEntity.CommonDBEntity.Add(commonDBEntity); CommonBP.InsertEventHistory(_commonEntity); RestBalGridData(); this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "key", "SetSalesControlVal()", true); }
/// <summary> /// 酒店信息-销售联系人 /// </summary> /// <param name="strHotelID"></param> public void GetBasicSalesInfo(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.GetSalesManager(_hotelinfoEntity).QueryResult; if (dsResult.Tables.Count > 0 && dsResult.Tables[0].Rows.Count > 0) { //lblContactDetails.Text = "LM酒店负责人:" + dsResult.Tables[0].Rows[0]["DISPNM"].ToString().Replace("null", "") + " 电话: " + dsResult.Tables[0].Rows[0]["User_Tel"].ToString().Replace("null", ""); //this.HidContactDetails.Value = "LM酒店负责人:" + dsResult.Tables[0].Rows[0]["DISPNM"].ToString().Replace("null", "") + " 电话: " + dsResult.Tables[0].Rows[0]["User_Tel"].ToString().Replace("null", ""); this.HidAlertContactDetails.Value = "LM酒店负责人:" + dsResult.Tables[0].Rows[0]["DISPNM"].ToString().Replace("null", "") + " 电话: " + dsResult.Tables[0].Rows[0]["User_Tel"].ToString().Replace("null", ""); ScriptManager.RegisterStartupScript(this.UpdatePanel7, this.GetType(), "msgAlertY", "alert('" + this.HidAlertContactDetails.Value + "')", true); } else { //lblContactDetails.Text = "LM酒店负责人: 电话: "; //this.HidContactDetails.Value = "LM酒店负责人: 电话: "; this.HidAlertContactDetails.Value = "LM酒店负责人: 电话: "; ScriptManager.RegisterStartupScript(this.UpdatePanel7, this.GetType(), "msgAlertN", "alert('" + this.HidAlertContactDetails.Value + "')", true); } }
protected void btnBalAdd_Click(object sender, EventArgs e) { RestControlEnable(true, 2); //dvEvlGrid.Style.Add("display", ""); //dvLink.Style.Add("display", ""); SetEvalGridBtnStyle(true); divBtnList.Style.Add("display", ""); dvSales.Style.Add("display", ""); dvBalSearch.Style.Add("display", ""); dvBalAdd.Style.Add("display", ""); hidSelectedID.Value = "2"; MessageContent.InnerHtml = ""; bool bFlag = true; string msgString = ""; if (String.IsNullOrEmpty(dpInDTStart.Value) || String.IsNullOrEmpty(dpInDTEnd.Value)) { msgString = msgString + GetLocalResourceObject("UpdateError17").ToString() + "<br/>"; bFlag = false; } if (!ChkBalVal(txtBalVal.Text.Trim())) { msgString = msgString + GetLocalResourceObject("UpdateError19").ToString() + "<br/>"; bFlag = false; } string strHRoomList = ""; foreach (ListItem lt in chkHotelRoomList.Items) { if (lt.Selected) { strHRoomList = strHRoomList + lt.Value + ","; } } strHRoomList = strHRoomList.Trim(','); if (String.IsNullOrEmpty(strHRoomList)) { msgString = msgString + GetLocalResourceObject("UpdateError18").ToString() + "<br/>"; bFlag = false; } if (!bFlag) { MessageContent.InnerHtml = GetLocalResourceObject("UpdateError16").ToString() + "<br/>" + msgString; RestBalGridData(); return; } _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.PriceCode = ddpPriceCode.SelectedValue.Trim(); hotelInfoDBEntity.HRoomList = strHRoomList; hotelInfoDBEntity.InDateFrom = dpInDTStart.Value.Trim(); hotelInfoDBEntity.InDateTo = dpInDTEnd.Value.Trim(); hotelInfoDBEntity.BalType = ddpBalType.SelectedValue.Trim(); hotelInfoDBEntity.BalValue = txtBalVal.Text.Trim(); _hotelinfoEntity.HotelInfoDBEntity.Add(hotelInfoDBEntity); _hotelinfoEntity = HotelInfoBP.SetBalanceRoomList(_hotelinfoEntity); int iResult = _hotelinfoEntity.Result; _commonEntity.LogMessages = _hotelinfoEntity.LogMessages; _commonEntity.CommonDBEntity = new List<CommonDBEntity>(); CommonDBEntity commonDBEntity = new CommonDBEntity(); commonDBEntity.Event_Type = "酒店结算信息-保存"; commonDBEntity.Event_ID = hidHotelID.Value; string conTent = GetLocalResourceObject("EventInsertBalMessage").ToString(); conTent = string.Format(conTent, hotelInfoDBEntity.HotelID, hotelInfoDBEntity.Name_CN, hotelInfoDBEntity.PriceCode, hotelInfoDBEntity.HRoomList, hotelInfoDBEntity.InDateFrom, hotelInfoDBEntity.InDateTo, hotelInfoDBEntity.BalType, hotelInfoDBEntity.BalValue); commonDBEntity.Event_Content = conTent; if (iResult == 1) { commonDBEntity.Event_Result = GetLocalResourceObject("UpdateBalSuccess").ToString(); MessageContent.InnerHtml = GetLocalResourceObject("UpdateBalSuccess").ToString(); } else if (iResult == 2) { commonDBEntity.Event_Result = _hotelinfoEntity.ErrorMSG;// GetLocalResourceObject("UpdateBalError2").ToString(); MessageContent.InnerHtml = _hotelinfoEntity.ErrorMSG;//GetLocalResourceObject("UpdateBalError2").ToString(); } else { commonDBEntity.Event_Result = GetLocalResourceObject("UpdateError16").ToString(); MessageContent.InnerHtml = GetLocalResourceObject("UpdateError16").ToString(); } _commonEntity.CommonDBEntity.Add(commonDBEntity); CommonBP.InsertEventHistory(_commonEntity); BindBalManagerListGrid(); //this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "key", "SetSalesControlVal()", true); }
public void BindDdpList() { MessageContent.InnerHtml = ""; DataSet dsOnlineStatus = CommonBP.GetConfigList(GetLocalResourceObject("Online").ToString()); if (dsOnlineStatus.Tables.Count > 0) { dsOnlineStatus.Tables[0].Columns["Key"].ColumnName = "ONLINESTATUS"; dsOnlineStatus.Tables[0].Columns["Value"].ColumnName = "ONLINEDIS"; //ddpStatusList.DataTextField = "ONLINEDIS"; //ddpStatusList.DataValueField = "ONLINESTATUS"; //ddpStatusList.DataSource = dsOnlineStatus; //ddpStatusList.DataBind(); } _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(); _hotelinfoEntity.HotelInfoDBEntity.Add(hotelInfoDBEntity); DataSet dsHotelGroup = HotelInfoBP.CommonHotelGroupSelect(_hotelinfoEntity).QueryResult; ddpHotelGroup.DataTextField = "NAMEZH"; ddpHotelGroup.DataValueField = "GROUPCODE"; ddpHotelGroup.DataSource = dsHotelGroup; ddpHotelGroup.DataBind(); //DataSet dsProvincial = HotelInfoBP.CommonProvincialSelect(_hotelinfoEntity).QueryResult; //ddpProvincial.DataTextField = "NAMEZH"; //ddpProvincial.DataValueField = "GROUPCODE"; //ddpProvincial.DataSource = dsProvincial; //ddpProvincial.DataBind(); DataSet dsCity = HotelInfoBP.CommonCitySelect(_hotelinfoEntity).QueryResult; ddpCity.DataTextField = "NAMEZH"; ddpCity.DataValueField = "CITYID"; ddpCity.DataSource = dsCity; ddpCity.DataBind(); DataSet dsStarRating = CommonBP.GetConfigList(GetLocalResourceObject("StarRating").ToString()); if (dsStarRating.Tables.Count > 0) { dsStarRating.Tables[0].Columns["Key"].ColumnName = "STARKEY"; dsStarRating.Tables[0].Columns["Value"].ColumnName = "STARDIS"; ddpStarRating.DataTextField = "STARDIS"; ddpStarRating.DataValueField = "STARKEY"; ddpStarRating.DataSource = dsStarRating; ddpStarRating.DataBind(); } DataSet dsDiamondRating = CommonBP.GetConfigList(GetLocalResourceObject("DiamondRating").ToString()); if (dsDiamondRating.Tables.Count > 0) { dsDiamondRating.Tables[0].Columns["Key"].ColumnName = "DIAMONDKEY"; dsDiamondRating.Tables[0].Columns["Value"].ColumnName = "DIAMONDDIS"; //ddpDiamondRating.DataTextField = "DIAMONDDIS"; //ddpDiamondRating.DataValueField = "DIAMONDKEY"; //ddpDiamondRating.DataSource = dsDiamondRating; //ddpDiamondRating.DataBind(); } DataTable dtTicketTD = GetPriceCodeData(); ddpPriceCode.DataSource = dtTicketTD; ddpPriceCode.DataTextField = "PRICECD_TEXT"; ddpPriceCode.DataValueField = "PRICECD_STATUS"; ddpPriceCode.DataBind(); ddpPriceCode.SelectedIndex = 0; DataTable dtBalType = GetBalTypeData(); ddpBalType.DataSource = dtBalType; ddpBalType.DataTextField = "BALTYPE_TEXT"; ddpBalType.DataValueField = "BALTYPE_STATUS"; ddpBalType.DataBind(); ddpBalType.SelectedIndex = 0; }
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 (StringUtility.Text_Length(txtAddress.Text.ToString().Trim()) > 150) { msgString = msgString + GetLocalResourceObject("UpdateError4").ToString() + "<br/>"; bFlag = false; } //if (StringUtility.Text_Length(txtWebSite.Text.ToString().Trim()) > 200) //{ // msgString = msgString + GetLocalResourceObject("UpdateError5").ToString() + "<br/>"; // bFlag = false; //} //if (String.IsNullOrEmpty(txtPhone.Text.ToString().Trim())) //{ // msgString = msgString + GetLocalResourceObject("UpdateError61").ToString() + "<br/>"; // bFlag = false; //} //if (String.IsNullOrEmpty(txtFax.Text.ToString().Trim())) //{ // msgString = msgString + GetLocalResourceObject("UpdateError71").ToString() + "<br/>"; // bFlag = false; //} //if (!String.IsNullOrEmpty(txtPhone.Text.ToString().Trim()) && (StringUtility.Text_Length(txtPhone.Text.ToString().Trim()) > 40 )) //{ // msgString = msgString + GetLocalResourceObject("UpdateError6").ToString() + "<br/>"; // bFlag = false; //} //if (!String.IsNullOrEmpty(txtFax.Text.ToString().Trim()) && (StringUtility.Text_Length(txtFax.Text.ToString().Trim()) > 20 )) //{ // msgString = msgString + GetLocalResourceObject("UpdateError7").ToString() + "<br/>"; // bFlag = false; //} //if (StringUtility.Text_Length(txtContactPer.Text.ToString().Trim()) > 100) //{ // msgString = msgString + GetLocalResourceObject("UpdateError10").ToString() + "<br/>"; // bFlag = false; //} //if (StringUtility.Text_Length(txtContactEmail.Text.ToString().Trim()) > 100) //{ // msgString = msgString + GetLocalResourceObject("UpdateError11").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 (!RegexValidateData(txtLatitude.Text.ToString().Trim()) || !RegexValidateData(txtLongitude.Text.ToString().Trim())) { msgString = msgString + GetLocalResourceObject("UpdateError31").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; } string Evaluation = string.Empty; for (int i = 0; i < this.gridViewEvaluationList.Rows.Count; i++) { TextBox txtBox = (TextBox)gridViewEvaluationList.Rows[i].FindControl("txtEvalist"); if (!ChkEvaContent(txtBox.Text.Trim()))//if (txtBox.Text.Trim().Contains(",") || txtBox.Text.Trim().Contains(",")) { msgString = msgString + GetLocalResourceObject("UpdateError32").ToString() + "<br/>"; bFlag = false; break; } Evaluation = (!string.IsNullOrEmpty(txtBox.Text.Trim())) ? Evaluation + txtBox.Text.Trim() + "," : Evaluation; } Evaluation = (Evaluation.Length > 0) ? Evaluation.Substring(0, Evaluation.Length - 1) : Evaluation; if (!String.IsNullOrEmpty(Evaluation) && (StringUtility.Text_Length(Evaluation) > 1000)) { msgString = msgString + GetLocalResourceObject("UpdateError9").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.ID = hidHotelNo.Value; hotelInfoDBEntity.HotelID = hidHotelID.Value; hotelInfoDBEntity.Name_CN = txtHotelNM.Text.Trim(); hotelInfoDBEntity.Name_EN = txtHotelNMEN.Text.Trim(); //hotelInfoDBEntity.Status = ddpStatusList.SelectedValue; hotelInfoDBEntity.HotelGroup = ddpHotelGroup.SelectedValue; hotelInfoDBEntity.StarRating = ddpStarRating.SelectedValue; //hotelInfoDBEntity.DiamondRating = ddpDiamondRating.SelectedValue; hotelInfoDBEntity.City = ddpCity.SelectedValue; hotelInfoDBEntity.OpenDate = dpOpenDate.Value; hotelInfoDBEntity.RepairDate = dpRepairDate.Value; hotelInfoDBEntity.AddRess = txtAddress.Text.Trim(); //hotelInfoDBEntity.WebSite = txtWebSite.Text.Trim(); //hotelInfoDBEntity.Phone = txtPhone.Text.Trim(); //hotelInfoDBEntity.Fax = txtFax.Text.Trim(); //hotelInfoDBEntity.ContactPer = txtContactPer.Text.Trim(); //hotelInfoDBEntity.ContactEmail = txtContactEmail.Text.Trim(); hotelInfoDBEntity.Longitude = txtLongitude.Text.Trim(); hotelInfoDBEntity.Latitude = txtLatitude.Text.Trim(); hotelInfoDBEntity.SimpleDescZh = txtSimpleDescZh.Text.Trim(); hotelInfoDBEntity.DescZh = txtDescZh.Text.Trim(); hotelInfoDBEntity.Evaluation = Evaluation; //hotelInfoDBEntity.AutoTrust = (chkAutoTrust.Checked) ? "1" : "0"; //hotelInfoDBEntity.FogStatus = hidFogStatus.Value; _hotelinfoEntity.HotelInfoDBEntity.Add(hotelInfoDBEntity); int iResult = HotelInfoBP.HotelSave(_hotelinfoEntity); _commonEntity.LogMessages = _hotelinfoEntity.LogMessages; _commonEntity.CommonDBEntity = new List<CommonDBEntity>(); CommonDBEntity commonDBEntity = new CommonDBEntity(); commonDBEntity.Event_Type = "酒店基础信息-保存"; commonDBEntity.Event_ID = hidHotelID.Value; string conTent = GetLocalResourceObject("EventInsertMessage").ToString(); conTent = string.Format(conTent, hotelInfoDBEntity.HotelID, hotelInfoDBEntity.Name_CN, hotelInfoDBEntity.Status, hotelInfoDBEntity.HotelGroup, hotelInfoDBEntity.StarRating, hotelInfoDBEntity.DiamondRating, hotelInfoDBEntity.City, hotelInfoDBEntity.OpenDate.ToString(), hotelInfoDBEntity.RepairDate.ToString(), hotelInfoDBEntity.AddRess, hotelInfoDBEntity.WebSite, hotelInfoDBEntity.SimpleDescZh, hotelInfoDBEntity.DescZh, hotelInfoDBEntity.Evaluation); commonDBEntity.Event_Content = conTent; if (iResult == 1) { commonDBEntity.Event_Result = GetLocalResourceObject("UpdateSuccess").ToString(); MessageContent.InnerHtml = GetLocalResourceObject("UpdateSuccess").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 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; } }
/// <summary> /// 根据HotelID得到所有房型 /// </summary> /// <param name="strHotelID"></param> private DataSet GetBalanceRoomList(string strHotelID) { _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); return HotelInfoBP.GetBalHotelRoomList(_hotelinfoEntity).QueryResult; }
protected void btnExportBal_Click(object sender, EventArgs e) { MessageContent.InnerHtml = ""; RestControlEnable(true, 2); //dvEvlGrid.Style.Add("display", ""); //dvLink.Style.Add("display", ""); SetEvalGridBtnStyle(true); divBtnList.Style.Add("display", ""); //dvSales.Style.Add("display", ""); //dvBalSearch.Style.Add("display", ""); //dvBalAdd.Style.Add("display", ""); hidSelectedID.Value = "2"; //ViewState["BalStartDT"] = dpBalStart.Value; //ViewState["BalEndDT"] = dpBalEnd.Value; //ViewState["BalPriceCD"] = ddpBalType.SelectedValue; _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); DataSet dsResult = HotelInfoBP.ExportBalanceRoomHistory(_hotelinfoEntity).QueryResult; CommonFunction.ExportExcelForLM(dsResult); BindBalManagerListGrid(); //if (gridViewCSBalList.Rows.Count > 0) //{ //DataSet dsResult = (DataSet)gridViewCSBalList.DataSource; //ExportGridToExcel(gridViewCSBalList); //} }
public void BindHotelInfo() { MessageContent.InnerHtml = ""; _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; _hotelinfoEntity.HotelInfoDBEntity.Add(hotelInfoDBEntity); DataSet dsResult = HotelInfoBP.BindHotelList(_hotelinfoEntity).QueryResult; if (dsResult.Tables.Count == 0 || dsResult.Tables[0].Rows.Count == 0) { RestControlValue(); //chkAutoTrust.Checked = true; return; } txtHotelNM.Text = dsResult.Tables[0].Rows[0]["HOTELNM"].ToString(); //txtHotelNMEN.Text = dsResult.Tables[0].Rows[0]["HotelNMEN"].ToString(); //lbFogStatus.Text = dsResult.Tables[0].Rows[0]["FOGSTATUSDIS"].ToString(); //hidFogStatus.Value = dsResult.Tables[0].Rows[0]["FOGSTATUS"].ToString(); if (!String.IsNullOrEmpty(dsResult.Tables[0].Rows[0]["ONLINESTATUS"].ToString())) { //ddpStatusList.SelectedValue = dsResult.Tables[0].Rows[0]["ONLINESTATUS"].ToString(); } //if (!String.IsNullOrEmpty(dsResult.Tables[0].Rows[0]["GROUPID"].ToString())) //{ // if (ddpHotelGroup.Items.FindByValue(dsResult.Tables[0].Rows[0]["GROUPID"].ToString().Trim()) != null) // { // ddpHotelGroup.SelectedValue = dsResult.Tables[0].Rows[0]["GROUPID"].ToString().Trim(); // } //} if (!String.IsNullOrEmpty(dsResult.Tables[0].Rows[0]["STARRATING"].ToString())) { ddpStarRating.SelectedValue = dsResult.Tables[0].Rows[0]["STARRATING"].ToString(); } if (!String.IsNullOrEmpty(dsResult.Tables[0].Rows[0]["DIAMONDRATING"].ToString())) { //ddpDiamondRating.SelectedValue = dsResult.Tables[0].Rows[0]["DIAMONDRATING"].ToString(); } if (!String.IsNullOrEmpty(dsResult.Tables[0].Rows[0]["CITYID"].ToString())) { //ddpCity.SelectedValue = dsResult.Tables[0].Rows[0]["CITYID"].ToString(); //ddpCity.SelectedIndex = ddpCity.Items.IndexOf(ddpCity.Items.FindByValue(dsResult.Tables[0].Rows[0]["CITYID"].ToString())); } //ddpProvincial.SelectedIndex=-1; dpOpenDate.Value = dsResult.Tables[0].Rows[0]["OPENDATE"].ToString(); dpRepairDate.Value = dsResult.Tables[0].Rows[0]["REPAIRDATE"].ToString(); txtAddress.Text = dsResult.Tables[0].Rows[0]["ADDRESS"].ToString(); //txtWebSite.Text = dsResult.Tables[0].Rows[0]["WEBSITE"].ToString(); //txtPhone.Text = dsResult.Tables[0].Rows[0]["PHONE"].ToString(); //txtFax.Text = dsResult.Tables[0].Rows[0]["FAX"].ToString(); //txtContactPer.Text = dsResult.Tables[0].Rows[0]["CONTACTPER"].ToString(); //txtContactEmail.Text = dsResult.Tables[0].Rows[0]["CONTACTEMAIL"].ToString(); txtSimpleDescZh.Text = dsResult.Tables[0].Rows[0]["SIMPLEDESCZH"].ToString(); txtDescZh.Text = dsResult.Tables[0].Rows[0]["DESCZH"].ToString(); //txtEvaluation.Text = dsResult.Tables[0].Rows[0]["EVALUATION"].ToString(); //chkAutoTrust.Checked = "1".Equals(dsResult.Tables[0].Rows[0]["AUTOTRUST"].ToString()) ? true : false; txtLongitude.Text = dsResult.Tables[0].Rows[0]["LONGITUDE"].ToString(); txtLatitude.Text = dsResult.Tables[0].Rows[0]["LATITUDE"].ToString(); ArrayList ayHotelImage = HotelInfoBP.BindHotelImagesList(_hotelinfoEntity).HotelInfoDBEntity[0].HotelImage; if (ayHotelImage.Count > 0) { PreViewImage(ayHotelImage); } else { //ImageReview.InnerHtml = ""; } //SetGridEvalList(txtEvaluation.Text); GetSalesManager(hidHotelID.Value); GetBalanceRoomList(hidHotelID.Value); }
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 = ""; } }
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; // } //} }
/// <summary> /// 查询 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnSelect_Click(object sender, EventArgs e) { 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(); if (!string.IsNullOrEmpty(this.hidSelectHotel.Value)) { if (!string.IsNullOrEmpty(this.hidSelectHotel.Value)) { if (!hidSelectHotel.Value.Trim().Contains("[") || !hidSelectHotel.Value.Trim().Contains("]")) { messageContent.InnerHtml = "查询失败,选择酒店不合法,请修改!"; ScriptManager.RegisterStartupScript(this.UpdatePanel5, this.GetType(), "updateScript", "BtnCompleteStyle();", true); return; } } #region ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "setsalesroomKeysOne", "SetSalesRoom('')", true); hotelInfoDBEntity.HotelID = this.hidSelectHotel.Value == "" ? "" : this.hidSelectHotel.Value.Substring((this.hidSelectHotel.Value.IndexOf('[') + 1), (this.hidSelectHotel.Value.IndexOf(']') - 1));//"";//酒店ID hotelInfoDBEntity.Type = DropDownList2.SelectedValue; hotelInfoDBEntity.EffectDate = this.radioListBookStatus.SelectedValue.Trim(); hotelInfoDBEntity.BalValue = (String.IsNullOrEmpty(ConfigurationManager.AppSettings["FilterJinJiangHotels"])) ? "" : ConfigurationManager.AppSettings["FilterJinJiangHotels"].ToString().Trim() + ","; _hotelinfoEntity.HotelInfoDBEntity.Add(hotelInfoDBEntity); dtResult = HotelInfoBP.GetConsultRoomHotelRoomListByProp(_hotelinfoEntity).QueryResult.Tables[0]; dtResult.Columns.Add("RowOldColor", typeof(string)); dtResult.Columns.Add("ColOldColor", typeof(string)); dtResult.Columns.Add("RowNewColor", typeof(string)); dtResult.Columns.Add("ColNewColor", typeof(string)); for (int i = 0; i < dtResult.Rows.Count; i++) { dtResult.Rows[i]["EXLinkMan"] = dtResult.Rows[i]["EXLinkMan"].ToString() == "" ? "" : dtResult.Rows[i]["EXLinkMan"].ToString().Split('|')[0].ToString(); dtResult.Rows[i]["EXLinkTel"] = dtResult.Rows[i]["EXLinkTel"].ToString() == "" ? "" : "(" + dtResult.Rows[i]["EXLinkTel"].ToString().Split('|')[0].ToString() + ")"; dtResult.Rows[i]["EXRemark"] = dtResult.Rows[i]["EXRemark"].ToString() == "" ? "" : dtResult.Rows[i]["EXRemark"].ToString().Split('|')[0].ToString(); if (i % 2 == 0) { dtResult.Rows[i]["RowOldColor"] = "#f6f6f6"; dtResult.Rows[i]["ColOldColor"] = "#ECECEC"; dtResult.Rows[i]["RowNewColor"] = "#f6f6f6"; dtResult.Rows[i]["ColNewColor"] = "#ECECEC"; } else { dtResult.Rows[i]["RowOldColor"] = "#ffffff"; dtResult.Rows[i]["ColOldColor"] = "#ECECEC"; dtResult.Rows[i]["RowNewColor"] = "#ffffff"; dtResult.Rows[i]["ColNewColor"] = "#ECECEC"; } } #endregion } else if (!string.IsNullOrEmpty(this.hidSelectCity.Value) || !string.IsNullOrEmpty(this.hidSelectBussiness.Value)) { #region if (!string.IsNullOrEmpty(this.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(this.hidSelectBussiness.Value)) { if (!hidSelectBussiness.Value.Trim().Contains("[") || !hidSelectBussiness.Value.Trim().Contains("]")) { messageContent.InnerHtml = "查询失败,选择商圈不合法,请修改!"; ScriptManager.RegisterStartupScript(this.UpdatePanel5, this.GetType(), "updateScript", "BtnCompleteStyle();", true); return; } } #endregion #region ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "setsalesroomKeysOne", "SetSalesRoom('')", true); hotelInfoDBEntity.City = this.hidSelectCity.Value == "" ? "" : this.hidSelectCity.Value.Substring((this.hidSelectCity.Value.IndexOf('[') + 1), (this.hidSelectCity.Value.IndexOf(']') - 1)); //"";//城市ID hotelInfoDBEntity.HotelID = this.hidSelectHotel.Value == "" ? "" : this.hidSelectHotel.Value.Substring((this.hidSelectHotel.Value.IndexOf('[') + 1), (this.hidSelectHotel.Value.IndexOf(']') - 1));//"";//酒店ID hotelInfoDBEntity.Bussiness = this.hidSelectBussiness.Value == "" ? "" : this.hidSelectBussiness.Value.Substring((this.hidSelectBussiness.Value.IndexOf('[') + 1), (this.hidSelectBussiness.Value.IndexOf(']') - 1));//"";//商圈ID hotelInfoDBEntity.Type = DropDownList2.SelectedValue; hotelInfoDBEntity.EffectDate = this.radioListBookStatus.SelectedValue.Trim(); hotelInfoDBEntity.BalValue = (String.IsNullOrEmpty(ConfigurationManager.AppSettings["FilterJinJiangHotels"])) ? "" : ConfigurationManager.AppSettings["FilterJinJiangHotels"].ToString().Trim() + ","; _hotelinfoEntity.HotelInfoDBEntity.Add(hotelInfoDBEntity); dtResult = HotelInfoBP.GetConsultRoomHotelRoomListByHotel(_hotelinfoEntity).QueryResult.Tables[0]; dtResult.Columns.Add("RowOldColor", typeof(string)); dtResult.Columns.Add("ColOldColor", typeof(string)); dtResult.Columns.Add("RowNewColor", typeof(string)); dtResult.Columns.Add("ColNewColor", typeof(string)); for (int i = 0; i < dtResult.Rows.Count; i++) { dtResult.Rows[i]["EXLinkMan"] = dtResult.Rows[i]["EXLinkMan"].ToString() == "" ? "" : dtResult.Rows[i]["EXLinkMan"].ToString().Split('|')[0].ToString(); dtResult.Rows[i]["EXLinkTel"] = dtResult.Rows[i]["EXLinkTel"].ToString() == "" ? "" : "(" + dtResult.Rows[i]["EXLinkTel"].ToString().Split('|')[0].ToString() + ")"; dtResult.Rows[i]["EXRemark"] = dtResult.Rows[i]["EXRemark"].ToString() == "" ? "" : dtResult.Rows[i]["EXRemark"].ToString().Split('|')[0].ToString(); if (i % 2 == 0) { dtResult.Rows[i]["RowOldColor"] = "#f6f6f6"; dtResult.Rows[i]["ColOldColor"] = "#ECECEC"; dtResult.Rows[i]["RowNewColor"] = "#f6f6f6"; dtResult.Rows[i]["ColNewColor"] = "#ECECEC"; } else { dtResult.Rows[i]["RowOldColor"] = "#ffffff"; dtResult.Rows[i]["ColOldColor"] = "#ECECEC"; dtResult.Rows[i]["RowNewColor"] = "#ffffff"; dtResult.Rows[i]["ColNewColor"] = "#ECECEC"; } } #endregion } else { #region if (this.hidSelectSalesID.Value != UserSession.Current.UserAccount.ToLower()) { 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; } } #endregion ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "setsalesroomKeysOne", "SetSalesRoom('" + this.hidSelectSalesID.Value + "')", true); hotelInfoDBEntity.SalesID = this.hidSelectSalesID.Value == UserSession.Current.UserAccount.ToLower() ? UserSession.Current.UserAccount.ToLower() : this.hidSelectSalesID.Value.Substring((this.hidSelectSalesID.Value.IndexOf('[') + 1), (this.hidSelectSalesID.Value.IndexOf(']') - 1));//"";//房控人员 hotelInfoDBEntity.Type = DropDownList2.SelectedValue; hotelInfoDBEntity.EffectDate = this.radioListBookStatus.SelectedValue.Trim(); _hotelinfoEntity.HotelInfoDBEntity.Add(hotelInfoDBEntity); dtResult = HotelInfoBP.GetConsultRoomHotelRoomList(_hotelinfoEntity).QueryResult.Tables[0];//得到当天所有 有计划 的酒店 #region 过滤所有计划关闭 且 关闭人为销售人员 if (dtResult != null && dtResult.Rows.Count > 0) { DataTable dtNewResult = new DataTable(); dtNewResult.Columns.Add("PROP"); dtNewResult.Columns.Add("CITYID"); dtNewResult.Columns.Add("LINKMAN"); dtNewResult.Columns.Add("LINKTEL"); dtNewResult.Columns.Add("LINKEMAIL"); dtNewResult.Columns.Add("SALES_ACCOUNT"); dtNewResult.Columns.Add("PROP_NAME_ZH"); dtNewResult.Columns.Add("isplan"); dtNewResult.Columns.Add("ordercount"); dtNewResult.Columns.Add("EXLinkMan"); dtNewResult.Columns.Add("EXLinkTel"); dtNewResult.Columns.Add("EXRemark"); dtNewResult.Columns.Add("BackPropName"); dtNewResult.Columns.Add("EXMODE"); dtNewResult.Columns.Add("RowOldColor"); dtNewResult.Columns.Add("ColOldColor"); dtNewResult.Columns.Add("RowNewColor"); dtNewResult.Columns.Add("ColNewColor"); DataTable dtSales = GetSalesManagerList();//所有的销售人员 string FilterJJHotels = (String.IsNullOrEmpty(ConfigurationManager.AppSettings["FilterJinJiangHotels"])) ? "" : ConfigurationManager.AppSettings["FilterJinJiangHotels"].ToString().Trim(); string hotelId = ""; bool IsFlag = false; for (int i = 0; i < dtResult.Rows.Count; i++) { IsFlag = false; if (hotelId == "" || hotelId != dtResult.Rows[i]["prop"].ToString()) { #region for (int j = 0; j < FilterJJHotels.Split(',').Length; j++) { if (!string.IsNullOrEmpty(FilterJJHotels.Split(',')[j].ToString())) { if (dtResult.Rows[i]["prop"].ToString() == FilterJJHotels.Split(',')[j].ToString()) { IsFlag = true; break; } } } #endregion if (!IsFlag) { #region hotelId = dtResult.Rows[i]["prop"].ToString(); DataRow[] rowsAll = dtResult.Select("prop='" + hotelId + "'");//获取当前酒店所有计划 DataRow[] rowsCloseAll = dtResult.Select("prop='" + hotelId + "' and status=0");//获取当前酒店所有已关闭的计划 if (rowsAll.Length > 0 && rowsCloseAll.Length > 0) { if (rowsAll.Length == rowsCloseAll.Length)//计划全部关闭 且 关闭人为销售人员 { int count = 0; for (int j = 0; j < rowsCloseAll.Length; j++) { DataRow[] salesRow = dtSales.Select("REVALUE_ALL like '%" + rowsCloseAll[j]["MODIFIER"].ToString() + "%'"); if (salesRow.Length > 0) { count++; continue; } else { break; } } if (count != rowsCloseAll.Length) { DataRow dr = dtNewResult.NewRow(); dr["PROP"] = hotelId; dr["CITYID"] = dtResult.Rows[i]["cityid"].ToString(); dr["LINKMAN"] = dtResult.Rows[i]["linkman"].ToString(); dr["LINKTEL"] = dtResult.Rows[i]["linktel"].ToString(); dr["LINKEMAIL"] = dtResult.Rows[i]["linkemail"].ToString(); dr["SALES_ACCOUNT"] = dtResult.Rows[i]["sales_account"].ToString(); dr["PROP_NAME_ZH"] = dtResult.Rows[i]["PROP_NAME_ZH"].ToString(); dr["isplan"] = dtResult.Rows[i]["isplan"].ToString(); dr["ordercount"] = dtResult.Rows[i]["ordercount"].ToString(); dr["EXLinkMan"] = dtResult.Rows[i]["EXLinkMan"].ToString() == "" ? "" : dtResult.Rows[i]["EXLinkMan"].ToString().Split('|')[0].ToString(); dr["EXLinkTel"] = dtResult.Rows[i]["EXLinkTel"].ToString() == "" ? " " : "(" + dtResult.Rows[i]["EXLinkTel"].ToString().Split('|')[0].ToString() + ")"; dr["EXRemark"] = dtResult.Rows[i]["EXRemark"].ToString() == "" ? "" : dtResult.Rows[i]["EXRemark"].ToString().Split('|')[0].ToString(); dr["BackPropName"] = dtResult.Rows[i]["PROP_NAME_ZH"].ToString(); dr["EXMODE"] = dtResult.Rows[i]["EXMODE"]; if (i % 2 == 0) { dr["RowOldColor"] = "#f6f6f6"; dr["ColOldColor"] = "#ECECEC"; dr["RowNewColor"] = "#f6f6f6"; dr["ColNewColor"] = "#ECECEC"; } else { dr["RowOldColor"] = "#ffffff"; dr["ColOldColor"] = "#ECECEC"; dr["RowNewColor"] = "#ffffff"; dr["ColNewColor"] = "#ECECEC"; } dtNewResult.Rows.Add(dr); } } else { DataRow dr = dtNewResult.NewRow(); dr["PROP"] = hotelId; dr["CITYID"] = dtResult.Rows[i]["cityid"].ToString(); dr["LINKMAN"] = dtResult.Rows[i]["linkman"].ToString(); dr["LINKTEL"] = dtResult.Rows[i]["linktel"].ToString(); dr["LINKEMAIL"] = dtResult.Rows[i]["linkemail"].ToString(); dr["SALES_ACCOUNT"] = dtResult.Rows[i]["sales_account"].ToString(); dr["PROP_NAME_ZH"] = dtResult.Rows[i]["PROP_NAME_ZH"].ToString(); dr["isplan"] = dtResult.Rows[i]["isplan"].ToString(); dr["ordercount"] = dtResult.Rows[i]["ordercount"].ToString(); dr["EXLinkMan"] = dtResult.Rows[i]["EXLinkMan"].ToString() == "" ? "" : dtResult.Rows[i]["EXLinkMan"].ToString().Split('|')[0].ToString(); dr["EXLinkTel"] = dtResult.Rows[i]["EXLinkTel"].ToString() == "" ? " " : "(" + dtResult.Rows[i]["EXLinkTel"].ToString().Split('|')[0].ToString() + ")"; dr["EXRemark"] = dtResult.Rows[i]["EXRemark"].ToString() == "" ? "" : dtResult.Rows[i]["EXRemark"].ToString().Split('|')[0].ToString(); dr["BackPropName"] = dtResult.Rows[i]["PROP_NAME_ZH"].ToString(); dr["EXMODE"] = dtResult.Rows[i]["EXMODE"]; if (i % 2 == 0) { dr["RowOldColor"] = "#f6f6f6"; dr["ColOldColor"] = "#ECECEC"; dr["RowNewColor"] = "#f6f6f6"; dr["ColNewColor"] = "#ECECEC"; } else { dr["RowOldColor"] = "#ffffff"; dr["ColOldColor"] = "#ECECEC"; dr["RowNewColor"] = "#ffffff"; dr["ColNewColor"] = "#ECECEC"; } dtNewResult.Rows.Add(dr); } } else { DataRow dr = dtNewResult.NewRow(); dr["PROP"] = hotelId; dr["CITYID"] = dtResult.Rows[i]["cityid"].ToString(); dr["LINKMAN"] = dtResult.Rows[i]["linkman"].ToString(); dr["LINKTEL"] = dtResult.Rows[i]["linktel"].ToString(); dr["LINKEMAIL"] = dtResult.Rows[i]["linkemail"].ToString(); dr["SALES_ACCOUNT"] = dtResult.Rows[i]["sales_account"].ToString(); dr["PROP_NAME_ZH"] = dtResult.Rows[i]["PROP_NAME_ZH"].ToString(); dr["isplan"] = dtResult.Rows[i]["isplan"].ToString(); dr["ordercount"] = dtResult.Rows[i]["ordercount"].ToString(); dr["EXLinkMan"] = dtResult.Rows[i]["EXLinkMan"].ToString() == "" ? "" : dtResult.Rows[i]["EXLinkMan"].ToString().Split('|')[0].ToString(); dr["EXLinkTel"] = dtResult.Rows[i]["EXLinkTel"].ToString() == "" ? " " : "(" + dtResult.Rows[i]["EXLinkTel"].ToString().Split('|')[0].ToString() + ")"; dr["EXRemark"] = dtResult.Rows[i]["EXRemark"].ToString() == "" ? "" : dtResult.Rows[i]["EXRemark"].ToString().Split('|')[0].ToString(); dr["BackPropName"] = dtResult.Rows[i]["PROP_NAME_ZH"].ToString(); dr["EXMODE"] = dtResult.Rows[i]["EXMODE"]; if (i % 2 == 0) { dr["RowOldColor"] = "#f6f6f6"; dr["ColOldColor"] = "#ECECEC"; dr["RowNewColor"] = "#f6f6f6"; dr["ColNewColor"] = "#ECECEC"; } else { dr["RowOldColor"] = "#ffffff"; dr["ColOldColor"] = "#ECECEC"; dr["RowNewColor"] = "#ffffff"; dr["ColNewColor"] = "#ECECEC"; } dtNewResult.Rows.Add(dr); } #endregion } } } for (int i = 0; i < dtNewResult.Rows.Count; i++) { if (dtNewResult.Rows[i]["EXMODE"].ToString() == "3") { dtNewResult.Rows.Remove(dtNewResult.Rows[i]); } } dtNewResult.DefaultView.Sort = DropDownList2.SelectedValue; dtResult = dtNewResult.DefaultView.ToTable(); } #endregion } int operandNum = 0; this.gridHotelList.DataSource = dtResult.DefaultView; this.gridHotelList.DataBind(); #region DataTable dtConsultResult = GetConsultRoomHistoryList().Tables[0];//获取已询房酒店列表 for (int i = 0; i < gridHotelList.Rows.Count; i++) { for (int j = 0; j < dtConsultResult.Rows.Count; j++) { if (gridHotelList.DataKeys[i].Values[0].ToString().Trim() == dtConsultResult.Rows[j]["HotelID"].ToString().Trim()) { // if (DateTime.Parse(dtConsultResult.Rows[j]["CreateTime"].ToString()).Day == System.DateTime.Now.Day) if (DateTime.Parse(dtConsultResult.Rows[j]["PlanDate"].ToString()).ToShortDateString() == DateTime.Now.ToShortDateString()) { if (DateTime.Parse(dtConsultResult.Rows[j]["CreateTime"].ToString()).Hour >= 18) { gridHotelList.Rows[i].Cells[6].Text = "#FF6666"; gridHotelList.Rows[i].Cells[7].Text = "#CD5C5C"; gridHotelList.Rows[i].BackColor = System.Drawing.ColorTranslator.FromHtml("#FF6666"); ((System.Web.UI.WebControls.WebControl)((Label)gridHotelList.Rows[i].FindControl("Label1"))).BackColor = System.Drawing.ColorTranslator.FromHtml("#CD5C5C"); } else { gridHotelList.Rows[i].Cells[6].Text = "#80c0a0"; gridHotelList.Rows[i].Cells[7].Text = "#70A88C"; gridHotelList.Rows[i].BackColor = System.Drawing.ColorTranslator.FromHtml("#80c0a0"); ((System.Web.UI.WebControls.WebControl)((Label)gridHotelList.Rows[i].FindControl("Label1"))).BackColor = System.Drawing.ColorTranslator.FromHtml("#70A88C"); } operandNum += 1; } } } this.HiaAllHotelID.Value += gridHotelList.DataKeys[i].Values[0].ToString().Trim() + "&"; } #endregion this.UpdatePanel4.Update(); this.operandNum.InnerText = operandNum.ToString(); this.countNum.InnerText = dtResult.Rows.Count.ToString(); if (dtResult.Rows.Count > 0)//当查询有值时,自动触发单个酒店详情事件 { this.HidIsAsync.Value = "true"; this.HidSelIndex.Value = "0"; btnSingleHotel_Click(null, null); } ScriptManager.RegisterStartupScript(this.UpdatePanel4, this.GetType(), "keys", "BtnCompleteStyle();", true); }
private string SetHotelNM(string strHotelID) { string strResult = ""; 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.ChkLMPropHotelList(_hotelinfoEntity).QueryResult; if (dsResult.Tables.Count > 0 && dsResult.Tables[0].Rows.Count > 0) { strResult = dsResult.Tables[0].Rows[0]["REVALUE_ALL"].ToString(); } return strResult; }