//导出Excel文件 protected void btnExport_Click(object sender, EventArgs e) { LmSystemLogEntity _lmSystemLogEntity = new LmSystemLogEntity(); CommonEntity _commonEntity = new CommonEntity(); _lmSystemLogEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _lmSystemLogEntity.LogMessages.Userid = UserSession.Current.UserAccount; _lmSystemLogEntity.LogMessages.Username = UserSession.Current.UserDspName; _lmSystemLogEntity.LogMessages.IpAddress = UserSession.Current.UserIP; _lmSystemLogEntity.EventID = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["OrderID"].ToString())) ? null : ViewState["OrderID"].ToString(); _lmSystemLogEntity.StartDTime = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["StartDTime"].ToString())) ? null : ViewState["StartDTime"].ToString(); ; _lmSystemLogEntity.EndDTime = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["EndDTime"].ToString())) ? null : ViewState["EndDTime"].ToString(); ; _lmSystemLogEntity.HotelID = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["HotelID"].ToString())) ? null : ViewState["HotelID"].ToString(); _lmSystemLogEntity.CityID = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["CityID"].ToString())) ? null : ViewState["CityID"].ToString(); _lmSystemLogEntity.PayCode = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["PayCode"].ToString())) ? null : ViewState["PayCode"].ToString(); _lmSystemLogEntity.BookStatus = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["BookStatus"].ToString())) ? null : ViewState["BookStatus"].ToString(); _lmSystemLogEntity.PayStatus = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["PayStatus"].ToString())) ? null : ViewState["PayStatus"].ToString(); _lmSystemLogEntity.PlatForm = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["PlatForm"].ToString())) ? null : ViewState["PlatForm"].ToString(); _lmSystemLogEntity.Ticket = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["Ticket"].ToString())) ? null : ViewState["Ticket"].ToString(); _lmSystemLogEntity.Mobile = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["Mobile"].ToString())) ? null : ViewState["Mobile"].ToString(); _lmSystemLogEntity.InStart = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["InStart"].ToString())) ? null : ViewState["InStart"].ToString(); _lmSystemLogEntity.InEnd = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["InEnd"].ToString())) ? null : ViewState["InEnd"].ToString(); _lmSystemLogEntity.Aprove = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["Aprove"].ToString())) ? null : ViewState["Aprove"].ToString(); DataSet dsResult = LmSystemLogBP.ReviewSelectByNew(_lmSystemLogEntity).QueryResult; if (dsResult.Tables.Count == 0 && dsResult.Tables[0].Rows.Count ==0) { messageContent.InnerHtml = GetLocalResourceObject("WarningMessage").ToString(); return; } CommonFunction.ExportExcelForLM(dsResult); }
public static string CrCruisePlan(string Action, string BoatID, string CreateStart, string PlanNumer) { CruiseInfoEntity _cruiseinfoEntity = new CruiseInfoEntity(); CommonEntity _commonEntity = new CommonEntity(); _cruiseinfoEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _commonEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _cruiseinfoEntity.LogMessages.Userid = UserSession.Current.UserAccount; _cruiseinfoEntity.LogMessages.Username = UserSession.Current.UserDspName; _cruiseinfoEntity.LogMessages.IpAddress = UserSession.Current.UserIP; _cruiseinfoEntity.CruiseInfoDBEntity = new List<CruiseInfoDBEntity>(); CruiseInfoDBEntity cruiseInfoDBEntity = new CruiseInfoDBEntity(); cruiseInfoDBEntity.Action = Action; cruiseInfoDBEntity.BoatID = BoatID; cruiseInfoDBEntity.CreateStart = CreateStart; cruiseInfoDBEntity.PlanNumer = PlanNumer; _cruiseinfoEntity.CruiseInfoDBEntity.Add(cruiseInfoDBEntity); _cruiseinfoEntity = CruiseInfoBP.SaveCruisePlanList(_cruiseinfoEntity); int iResult = _cruiseinfoEntity.Result; //_commonEntity.LogMessages = _cruiseinfoEntity.LogMessages; //_commonEntity.CommonDBEntity = new List<CommonDBEntity>(); //CommonDBEntity commonDBEntity = new CommonDBEntity(); //commonDBEntity.Event_Type = "游轮库存-保存"; //commonDBEntity.Event_ID = cruiseInfoDBEntity.PlanID; //string conTent = "库存保存 - 原库存:{0} 修改后库存:{1}"; //conTent = string.Format(conTent, PlanNumer); //commonDBEntity.Event_Content = conTent; if (iResult == 1) { //commonDBEntity.Event_Result = "库存保存成功!"; ; //MessageContent.InnerHtml = string.Format(GetLocalResourceObject("SaveSuccess").ToString(), HotelID); } else { //commonDBEntity.Event_Result = GetLocalResourceObject("SaveError").ToString(); //MessageContent.InnerHtml = GetLocalResourceObject("SaveError").ToString(); } //_commonEntity.CommonDBEntity.Add(commonDBEntity); //CommonBP.InsertEventHistory(_commonEntity); return "库存保存成功!"; }
public static CommonEntity GetEventHistoryList(CommonEntity commonEntity) { commonEntity.LogMessages.MsgType = MessageType.INFO; commonEntity.LogMessages.Content = _nameSpaceClass + "GetEventHistoryList"; LoggerHelper.LogWriter(commonEntity.LogMessages); try { return CommonDA.GetEventHistoryList(commonEntity); } catch (Exception ex) { commonEntity.LogMessages.MsgType = MessageType.ERROR; commonEntity.LogMessages.Content = _nameSpaceClass + "GetEventHistoryList Error: " + ex.Message; LoggerHelper.LogWriter(commonEntity.LogMessages); throw ex; } }
//导出Excel文件 protected void btnExport_Click(object sender, EventArgs e) { ReportCenterEntity _reportCenterEntity = new ReportCenterEntity(); CommonEntity _commonEntity = new CommonEntity(); _reportCenterEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _reportCenterEntity.LogMessages.Userid = UserSession.Current.UserAccount; _reportCenterEntity.LogMessages.Username = UserSession.Current.UserDspName; _reportCenterEntity.LogMessages.IpAddress = UserSession.Current.UserIP; _reportCenterEntity.StartDTime = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["StartDTime"].ToString())) ? null : ViewState["StartDTime"].ToString(); _reportCenterEntity.EndDTime = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["EndDTime"].ToString())) ? null : ViewState["EndDTime"].ToString(); DataSet dsResult = ReportCenterBP.CCCancelDataReportSelect(_reportCenterEntity).QueryResult; if (dsResult.Tables.Count == 0 && dsResult.Tables[0].Rows.Count ==0) { messageContent.InnerHtml = GetLocalResourceObject("WarningMessage").ToString(); return; } CommonFunction.ExportExcelForLM(dsResult); }
public static CommonEntity GetEventHistoryList(CommonEntity commonEntity) { DataCommand cmd = DataCommandManager.GetDataCommand("GetEventHistoryList"); CommonDBEntity dbParm = (commonEntity.CommonDBEntity.Count > 0) ? commonEntity.CommonDBEntity[0] : new CommonDBEntity(); cmd.SetParameterValue("@USERID", dbParm.UserID); cmd.SetParameterValue("@USERNAME", dbParm.UserName); cmd.SetParameterValue("@IPADDRESS", dbParm.IpAddress); cmd.SetParameterValue("@EVENTTYPE", dbParm.Event_Type); cmd.SetParameterValue("@EVENTID", dbParm.Event_ID); cmd.SetParameterValue("@EVENTCONTENT", dbParm.Event_Content); cmd.SetParameterValue("@EVENTRESULT", dbParm.Event_Result); cmd.SetParameterValue("@StartDTime", dbParm.StartDTime); cmd.SetParameterValue("@EndDTime", dbParm.EndDTime); cmd.SetParameterValue("@PageCurrent", commonEntity.PageCurrent); cmd.SetParameterValue("@PageSize", commonEntity.PageSize); cmd.SetParameterValue("@SortField", commonEntity.SortField); cmd.SetParameterValue("@SortType", commonEntity.SortType); commonEntity.QueryResult = cmd.ExecuteDataSet(); commonEntity.TotalCount = (int)cmd.GetParameterValue("@TotalCount"); return commonEntity; }
//导出Excel文件 protected void btnExport_Click(object sender, EventArgs e) { LmSystemLogEntity _lmSystemLogEntity = new LmSystemLogEntity(); CommonEntity _commonEntity = new CommonEntity(); _lmSystemLogEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _lmSystemLogEntity.LogMessages.Userid = UserSession.Current.UserAccount; _lmSystemLogEntity.LogMessages.Username = UserSession.Current.UserDspName; _lmSystemLogEntity.LogMessages.IpAddress = UserSession.Current.UserIP; _lmSystemLogEntity.OutTest = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["OutTest"].ToString())) ? null : ViewState["OutTest"].ToString(); _lmSystemLogEntity.RestBookStatus = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["RestBookStatus"].ToString())) ? null : ViewState["RestBookStatus"].ToString(); _lmSystemLogEntity.StartDTime = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["StartDTime"].ToString())) ? null : ViewState["StartDTime"].ToString();//下单开始时间 _lmSystemLogEntity.EndDTime = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["EndDTime"].ToString())) ? null : ViewState["EndDTime"].ToString();//下单结束时间 _lmSystemLogEntity.GroupID = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["GroupID"].ToString())) ? null : ViewState["GroupID"].ToString();//集团 _lmSystemLogEntity.InStart = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["InStart"].ToString())) ? null : ViewState["InStart"].ToString();//入住开始日期 _lmSystemLogEntity.InEnd = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["InEnd"].ToString())) ? null : ViewState["InEnd"].ToString();//入住结束日期 _lmSystemLogEntity.CityID = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["CityID"].ToString())) ? null : ViewState["CityID"].ToString(); //城市 _lmSystemLogEntity.TagInfo = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["Business"].ToString())) ? null : ViewState["Business"].ToString();//商圈 _lmSystemLogEntity.OutStart = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["OutStart"].ToString())) ? null : ViewState["OutStart"].ToString();//离店开始时间 _lmSystemLogEntity.OutEnd = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["OutEnd"].ToString())) ? null : ViewState["OutEnd"].ToString();//离店结束时间 _lmSystemLogEntity.Sales = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["Sales"].ToString())) ? null : ViewState["Sales"].ToString(); //销售 _lmSystemLogEntity.HotelID = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["HotelID"].ToString())) ? null : ViewState["HotelID"].ToString();//酒店 _lmSystemLogEntity.Mobile = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["Mobile"].ToString())) ? null : ViewState["Mobile"].ToString();//登录手机 _lmSystemLogEntity.FogOrderID = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["OrderID"].ToString())) ? null : ViewState["OrderID"].ToString();//订单ID _lmSystemLogEntity.GuestName = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["GuestName"].ToString())) ? null : ViewState["GuestName"].ToString();//入住人 _lmSystemLogEntity.CreateStatus = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["BookStatusOtherCreate"].ToString())) ? null : ViewState["BookStatusOtherCreate"].ToString();//创建状态 成功 失败 _lmSystemLogEntity.UserCancel = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["UserCancel"].ToString())) ? null : ViewState["UserCancel"].ToString();//用户取消 1 是 2 否 _lmSystemLogEntity.PriceCode = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["PriceCode"].ToString())) ? null : ViewState["PriceCode"].ToString(); //价格代码 _lmSystemLogEntity.AffirmStatus = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["BookStatusOtherAffirm"].ToString())) ? null : ViewState["BookStatusOtherAffirm"].ToString();//确认状态 _lmSystemLogEntity.Timeout = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["Timeout"].ToString())) ? null : ViewState["Timeout"].ToString();//确认超时 1是 2 否 _lmSystemLogEntity.Ticket = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["Ticket"].ToString())) ? null : ViewState["Ticket"].ToString();//含返现券 1是 2 否 _lmSystemLogEntity.PlatForm = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["PlatForm"].ToString())) ? null : ViewState["PlatForm"].ToString();//订单平台 _lmSystemLogEntity.OrderChannel = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["OrderChannel"].ToString())) ? null : ViewState["OrderChannel"].ToString();//订单渠道 _lmSystemLogEntity.Aprove = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["Aprove"].ToString())) ? null : ViewState["Aprove"].ToString();//审核状态 _lmSystemLogEntity.HotelComfirm = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["HotelComfirm"].ToString())) ? null : ViewState["HotelComfirm"].ToString();//酒店是否已确认 _lmSystemLogEntity.BookStatus = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["BookStatus"].ToString())) ? null : ViewState["BookStatus"].ToString();//LMBAR状态 _lmSystemLogEntity.PayCode = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["PayCode"].ToString())) ? null : ViewState["PayCode"].ToString();//支付方式 _lmSystemLogEntity.PayStatus = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["PayStatus"].ToString())) ? null : ViewState["PayStatus"].ToString();//支付状态 #region 优惠券信息 _lmSystemLogEntity.RestBookStatus = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["RestBookStatus"].ToString())) ? null : ViewState["RestBookStatus"].ToString(); _lmSystemLogEntity.RestPriceCode = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["RestPriceCode"].ToString())) ? null : ViewState["RestPriceCode"].ToString(); _lmSystemLogEntity.TicketType = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["TicketType"].ToString())) ? null : ViewState["TicketType"].ToString(); _lmSystemLogEntity.TicketData = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["TicketData"].ToString())) ? null : ViewState["TicketData"].ToString(); _lmSystemLogEntity.TicketPayCode = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["TicketPcode"].ToString())) ? null : ViewState["TicketPcode"].ToString(); _lmSystemLogEntity.PackageName = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["packagename"].ToString())) ? null : ViewState["packagename"].ToString(); _lmSystemLogEntity.AmountFrom = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["amountfrom"].ToString())) ? null : ViewState["amountfrom"].ToString(); _lmSystemLogEntity.AmountTo = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["amountto"].ToString())) ? null : ViewState["amountto"].ToString(); _lmSystemLogEntity.PickfromDate = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["pickfromdate"].ToString())) ? null : ViewState["pickfromdate"].ToString(); _lmSystemLogEntity.PicktoDate = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["picktodate"].ToString())) ? null : ViewState["picktodate"].ToString(); _lmSystemLogEntity.TicketTime = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["tickettime"].ToString())) ? null : ViewState["tickettime"].ToString(); #endregion _lmSystemLogEntity.SortField = gridViewCSReviewLmSystemLogList.Attributes["SortExpression"].ToString(); _lmSystemLogEntity.SortType = gridViewCSReviewLmSystemLogList.Attributes["SortDirection"].ToString(); DataSet dsResult = new DataSet(); if (ViewState["orderXPaymentCode"].ToString() != "" && ViewState["orderXPaymentCode"].ToString() == "QuFen") { //dsResult = LmSystemLogBP.order_XPayment_ReviewLmOrderLogExport(_lmSystemLogEntity).QueryResult; } else if (ViewState["orderInTheNight"].ToString() != "" && ViewState["orderInTheNight"].ToString() == "CKIN") { //dsResult = LmSystemLogBP.order_InTheNight_ReviewLmOrderLogExport(_lmSystemLogEntity).QueryResult; } else if (ViewState["Rests"].ToString() != "" && ViewState["Rests"].ToString() == "Rests") { //dsResult = LmSystemLogBP.ExportLmOrderSelectByRests(_lmSystemLogEntity).QueryResult;//其他 排除已存在的渠道 } else { dsResult = OrderSearchBP.ExportOrderListSelect(_lmSystemLogEntity).QueryResult; } if (dsResult.Tables.Count == 0 && dsResult.Tables[0].Rows.Count == 0) { messageContent.InnerHtml = GetLocalResourceObject("WarningMessage").ToString(); return; } if (dsResult.Tables.Count > 0 && dsResult.Tables[0].Rows.Count > 0) { //for (int i = 0; i < dsResult.Tables[0].Rows.Count; i++) for (int i = dsResult.Tables[0].Rows.Count - 1; i >= 0; i--) { if (dsResult.Tables[0].Rows[i]["LOGIN_MOBILE"].ToString() == "" && (dsResult.Tables[0].Rows[i]["ORDER_CHANNEL"].ToString() == "HOTELVP" || dsResult.Tables[0].Rows[i]["ORDER_CHANNEL"].ToString() == "HOTELVPPRO" || dsResult.Tables[0].Rows[i]["ORDER_CHANNEL"].ToString() == "GETAROOM")) { dsResult.Tables[0].Rows[i]["LOGIN_MOBILE"] = "游客"; } else if (dsResult.Tables[0].Rows[i]["LOGIN_MOBILE"].ToString() == "" && dsResult.Tables[0].Rows[i]["ORDER_CHANNEL"].ToString() == "QUNAR") { dsResult.Tables[0].Rows[i]["LOGIN_MOBILE"] = "QUNAR"; } if (!string.IsNullOrEmpty(ViewState["Timeout"].ToString())) { if (!string.IsNullOrEmpty(dsResult.Tables[0].Rows[i]["confirmTime"].ToString())) { if (ViewState["Timeout"].ToString() == "1")//只取超时订单 { if (int.Parse(dsResult.Tables[0].Rows[i]["confirmTime"].ToString()) <= 30) { dsResult.Tables[0].Rows.Remove(dsResult.Tables[0].Rows[i]); } } else//只取没有超时的订单 { if (int.Parse(dsResult.Tables[0].Rows[i]["confirmTime"].ToString()) > 30) { dsResult.Tables[0].Rows.Remove(dsResult.Tables[0].Rows[i]); } } } else { dsResult.Tables[0].Rows.Remove(dsResult.Tables[0].Rows[i]); } } } } CommonFunction.ExportExcelForLM(dsResult); }
/// <summary> /// 计划更新 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnRenewPlan_Click(object sender, EventArgs e) { //根据时间段 酒店ID 取出原有计划 string priceCode = this.rdLmbar.Checked == true ? "LMBAR" : "LMBAR2"; DataSet planResult = GetBindLmbarPlanList(longPlanStartDate.Value, longPlanEndDate.Value, ViewState["hotelID"].ToString(), priceCode); if (planResult.Tables.Count > 0 && planResult.Tables[0].Rows.Count > 0) { APPContentEntity _appcontentEntity = new APPContentEntity(); _appcontentEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _appcontentEntity.LogMessages.Userid = UserSession.Current.UserAccount; _appcontentEntity.LogMessages.Username = UserSession.Current.UserDspName; _appcontentEntity.LogMessages.IpAddress = UserSession.Current.UserIP; CommonEntity _commonEntity = new CommonEntity(); _commonEntity.CommonDBEntity = new List<CommonDBEntity>(); _commonEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _commonEntity.LogMessages.IpAddress = UserSession.Current.UserIP; _commonEntity.LogMessages.Username = UserSession.Current.UserDspName; _commonEntity.LogMessages.Userid = UserSession.Current.UserAccount; _appcontentEntity.APPContentDBEntity = new List<APPContentDBEntity>(); APPContentDBEntity appcontentDBEntity = new APPContentDBEntity(); appcontentDBEntity.HotelID = ViewState["hotelID"].ToString(); appcontentDBEntity.PriceCode = priceCode; string strHRoomListName = ""; if (priceCode == "LMBAR2") { foreach (ListItem lt in chkHotelRoomListLMBAR2.Items) { if (lt.Selected) { strHRoomListName = strHRoomListName + lt.Text + ","; } } } else { foreach (ListItem lt in chkHotelRoomListLMBAR.Items) { if (lt.Selected) { strHRoomListName = strHRoomListName + lt.Text + ","; } } } strHRoomListName = strHRoomListName.Trim(','); if (strHRoomListName == "") { //Page.RegisterStartupScript(" ", " <script> alert( '请选择房型! '); return false;</script> "); ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "keyalertroom", "alert('请选择房型!')", true); return; } appcontentDBEntity.RoomName = strHRoomListName; string strHRoomListCode = ""; if (priceCode == "LMBAR2") { foreach (ListItem lt in chkHotelRoomListLMBAR2.Items) { if (lt.Selected) { strHRoomListCode = strHRoomListCode + lt.Value + ","; } } } else { foreach (ListItem lt in chkHotelRoomListLMBAR.Items) { if (lt.Selected) { strHRoomListCode = strHRoomListCode + lt.Value + ","; } } } strHRoomListCode = strHRoomListCode.Trim(','); appcontentDBEntity.RoomCode = strHRoomListCode; appcontentDBEntity.RoomStatus = this.dropStatusOpen.Checked == true ? "true" : "false"; //this.dropStatus.SelectedValue; //房量和是否是保留房 应根据状态的开启和关闭 取不同的值 if (this.dropStatusOpen.Checked) { if (this.txtRoomCount.Text.Trim() != "") { appcontentDBEntity.RoomCount = this.txtRoomCount.Text; } //appcontentDBEntity.RoomCount = this.txtRoomCount.Text; appcontentDBEntity.IsReserve = this.ckReserve.Checked == true ? "0" : "1"; } appcontentDBEntity.WeekList = "1,2,3,4,5,6,7"; //得到 中断的时间段 List<string> list = new List<string>(); list.Add(planResult.Tables[0].Rows[0]["EFFECTDATESTRING"].ToString()); for (int i = 0; i < planResult.Tables[0].Rows.Count; i++) { if (i != planResult.Tables[0].Rows.Count - 1) { string effToDate = planResult.Tables[0].Rows[i + 1]["EFFECTDATESTRING"].ToString(); string effYesDate = planResult.Tables[0].Rows[i]["EFFECTDATESTRING"].ToString(); TimeSpan effectDate = DateTime.Parse(effToDate) - DateTime.Parse(effYesDate); if (effectDate.Days > 1) { list.Add(effYesDate); list.Add(effToDate); } } else { list.Add(planResult.Tables[0].Rows[i]["EFFECTDATESTRING"].ToString()); } } appcontentDBEntity.UpdateUser = UserSession.Current.UserDspName; CommonDBEntity commonDBEntity = new CommonDBEntity(); for (int j = 0; j < list.Count; j++) { appcontentDBEntity.StartDTime = list[j].ToString(); appcontentDBEntity.EndDTime = list[j + 1].ToString(); j = j + 1; _appcontentEntity.APPContentDBEntity.Add(appcontentDBEntity); commonDBEntity = new CommonDBEntity(); commonDBEntity.Event_Type = "酒店管理-房控计划批量维护"; commonDBEntity.Event_ID = ViewState["hotelID"].ToString(); commonDBEntity.IpAddress = UserSession.Current.UserIP; commonDBEntity.UserID = UserSession.Current.UserAccount; commonDBEntity.UserName = UserSession.Current.UserDspName; commonDBEntity.Event_Content = "房控计划批量更新 - 酒店ID:" + ViewState["hotelID"].ToString() + " 价格代码:" + priceCode + " 房型Code:" + appcontentDBEntity.RoomCode + " 计划开始生效时间:" + appcontentDBEntity.StartDTime + " 计划结束生效时间:" + appcontentDBEntity.EndDTime + " 计划状态:" + appcontentDBEntity.RoomStatus; commonDBEntity.Event_Result = "已提交"; _commonEntity.CommonDBEntity.Add(commonDBEntity); //CommonBP.InsertEventHistory(_commonEntity); _commonEntity.CommonDBEntity.Clear(); // _appcontentEntity = HotelInfoBP.RenewPlanFullRoom(_appcontentEntity); } #region //appcontentDBEntity.StartDTime = "";//开始日期 //appcontentDBEntity.EndDTime = "";//结束日期 //appcontentDBEntity.MoneyType = "";//"币种: CNY(人民币) USD(美元) HKD(港币)" //appcontentDBEntity.HotelID = "";//"酒店ID" //appcontentDBEntity.HotelNM = "";//"酒店名称" //appcontentDBEntity.RoomName = "";//房型名称 //appcontentDBEntity.RoomCode = "";//房型代码 //appcontentDBEntity.RoomStatus = "";//true:打开 false:关闭 //appcontentDBEntity.RoomCount = "";//房间数量 //appcontentDBEntity.UpdateDTime = "";//更新时间 //appcontentDBEntity.UpdateUser = "";//操作人 //appcontentDBEntity.OnePrice = "";//单人价 //appcontentDBEntity.TwoPrice = "";//双人价 //appcontentDBEntity.ThreePrice = "";//三人价 //appcontentDBEntity.FourPrice = "";//四人价 //appcontentDBEntity.BedPrice = "";//加床价 //appcontentDBEntity.BreakfastNum = "";//早餐数量 //appcontentDBEntity.BreakPrice = "";//每份早餐价格 //appcontentDBEntity.IsNetwork = "";//ctrue(有宽带)false(无宽带) //appcontentDBEntity.PriceCode="";//” LMBAR:预付;LMBAR2:现付” //appcontentDBEntity.Offsetval = "";//浮动值 //appcontentDBEntity.Offsetunit = "";//浮动标志,0:固定值,1:百分比 //appcontentDBEntity.IsReserve = "";//是否保留房:0:保留房;1:非保留房 //appcontentDBEntity.WeekList="";//"1,2,3,4,5,6,7(分别对应:星期日,一,二,三,四,五,六)值与值之间有逗号分隔" #endregion } BindData(); //if (this.dropStatusOpen.Checked) //{ // ScriptManager.RegisterStartupScript(this.UpdatePanel3, this.GetType(), "unReport", "document.getElementById('managerTxtRoomCount').style.display = 'block';document.getElementById('manegerCkReserve').style.display = 'block';", true); //} //else //{ // ScriptManager.RegisterStartupScript(this.UpdatePanel3, this.GetType(), "unReport", "document.getElementById('managerTxtRoomCount').style.display = 'none';document.getElementById('manegerCkReserve').style.display = 'none';", true); //} this.longPlanStartDate.Value = DateTime.Now.ToShortDateString().Replace("/", "-"); this.longPlanEndDate.Value = DateTime.Now.AddDays(7).ToShortDateString().Replace("/", "-"); this.rdLmbar2.Checked = true; this.rdLmbar.Checked = false; this.chkHotelRoomListLMBAR2DIV.Attributes["style"] = "display:''"; this.chkHotelRoomListLMBARDIV.Attributes.Add("style", "display:none"); this.dropStatusOpen.Checked = true; this.dropStatusClose.Checked = false; this.managerTxtRoomCount.Attributes["style"] = "display:''"; this.manegerCkReserve.Attributes["style"] = "display:''"; }
/// <summary> /// 更新计划 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnDivRenewPlan_Click(object sender, EventArgs e) { APPContentEntity _appcontentEntity = new APPContentEntity(); _appcontentEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _appcontentEntity.LogMessages.Userid = UserSession.Current.UserAccount; _appcontentEntity.LogMessages.Username = UserSession.Current.UserDspName; _appcontentEntity.LogMessages.IpAddress = UserSession.Current.UserIP; CommonEntity _commonEntity = new CommonEntity(); _commonEntity.CommonDBEntity = new List<CommonDBEntity>(); _commonEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _commonEntity.LogMessages.IpAddress = UserSession.Current.UserIP; _commonEntity.LogMessages.Username = UserSession.Current.UserDspName; _commonEntity.LogMessages.Userid = UserSession.Current.UserAccount; CommonDBEntity commonDBEntity = new CommonDBEntity(); _appcontentEntity.APPContentDBEntity = new List<APPContentDBEntity>(); APPContentDBEntity appcontentDBEntity = new APPContentDBEntity(); #region //城市ID string CityID = this.HidCityID.Value; appcontentDBEntity.CityID = CityID; //酒店ID string hotelID = this.HidPid.Value; appcontentDBEntity.HotelID = hotelID; //酒店名称 string hotelName = this.HidPcode.Value; appcontentDBEntity.HotelNM = hotelName; //价格代码 string priceCode = this.HiddenPriceCode.Value; appcontentDBEntity.PriceCode = priceCode; //价格 string twoPrice = this.HiddenPrice.Value; appcontentDBEntity.TwoPrice = twoPrice; //状态 开启 关闭 string status = this.dropDivStatusOpen.Checked == true ? "true" : "false"; appcontentDBEntity.RoomStatus = status; appcontentDBEntity.PlanStatus = status; if (status == "true") { //房量 if (this.txtDivRoomCount.Text.Trim() != "") { string roomNum = this.txtDivRoomCount.Text; appcontentDBEntity.RoomCount = roomNum; } //是否是保留房 string isReserve = this.ckDivReserve.Checked == true ? "0" : "1"; appcontentDBEntity.IsReserve = isReserve; } else { appcontentDBEntity.RoomCount = this.HiddenRoomNum.Value; appcontentDBEntity.IsReserve = this.HiddenIsReserve.Value; } //房型名称 string RoomName = this.HiddenRoomName.Value; appcontentDBEntity.RoomName = RoomName; //房型Code string RoomCode = this.HiddenRoomCode.Value; appcontentDBEntity.RoomCode = RoomCode; bool IsFlag = false; //批量更新日期 开始 结束 string divPlanStartDate = this.divPlanStartDate.Value; string divPlanEndDate = this.divPlanEndDate.Value; //if (DateTime.Parse(divPlanStartDate) >= System.DateTime.Now || DateTime.Parse(divPlanEndDate) <= System.DateTime.Now) if (DateTime.Parse(divPlanStartDate) == DateTime.Parse(System.DateTime.Now.ToShortDateString())) { IsFlag = true; } appcontentDBEntity.WeekList = "1,2,3,4,5,6,7"; //备注 string remark = this.txtRemark.Value; appcontentDBEntity.Remark = remark; //操作人 string userName = UserSession.Current.UserAccount; appcontentDBEntity.CreateUser = userName; appcontentDBEntity.UpdateUser = userName; #endregion #region appcontentDBEntity.StartDTime = divPlanStartDate; appcontentDBEntity.EndDTime = divPlanEndDate; int DateDiff = calculateDateDiff(divPlanStartDate, divPlanEndDate); for (int j = 0; j <= DateDiff; j++) { appcontentDBEntity.PlanTime = DateTime.Parse(divPlanStartDate).AddDays(j).ToShortDateString(); _appcontentEntity.APPContentDBEntity.Add(appcontentDBEntity); CommonBP.InsertConsultRoomHistory(_appcontentEntity); _appcontentEntity.APPContentDBEntity.Clear(); } _appcontentEntity.APPContentDBEntity.Add(appcontentDBEntity); _appcontentEntity = HotelInfoBP.RenewPlanFullRoomByUpdatePlan(_appcontentEntity); int SelectedIndex = int.Parse(this.HidSelIndex.Value); //ScriptManager.RegisterStartupScript(this.UpdatePanel4, this.GetType(), "clickbtnSingle", "ClickEvent('" + this.HidPcode.Value + "','" + this.HidPid.Value + "','" + SelectedIndex + "','" + this.HidCityID.Value + "','false');", true); //ScriptManager.RegisterStartupScript(this.UpdatePanel4, this.GetType(), "clickbtnSingle", "ClickEvent('" + this.HidPcode.Value + "','" + this.HidPid.Value + "','" + SelectedIndex + "','" + this.HidCityID.Value + "','" + this.HidHotelEXLinkMan.Value + "','" + this.HidHotelEXLinkTel.Value + "','" + this.HidHotelEXLinkRemark.Value + "','false','true','false');", true); btnSingleHotel_Click(null, null); //ScriptManager.RegisterStartupScript(this.UpdatePanel4, this.GetType(), "scrollReset", "GetResultFromServer();", true); if (IsFlag) { if (DateTime.Now.Hour >= 18) { if (gridHotelList.Rows[SelectedIndex].BackColor != System.Drawing.ColorTranslator.FromHtml("#FF6666")) { gridHotelList.Rows[SelectedIndex].Cells[6].Text = "#FF6666"; gridHotelList.Rows[SelectedIndex].Cells[7].Text = "#CD5C5C"; this.operandNum.InnerText = (int.Parse(this.operandNum.InnerText) + 1).ToString(); gridHotelList.Rows[SelectedIndex].BackColor = System.Drawing.ColorTranslator.FromHtml("#FF6666"); ((System.Web.UI.WebControls.WebControl)((Label)gridHotelList.Rows[int.Parse(this.HidSelIndex.Value)].FindControl("Label1"))).BackColor = System.Drawing.ColorTranslator.FromHtml("#CD5C5C"); } } else { if (gridHotelList.Rows[SelectedIndex].BackColor != System.Drawing.ColorTranslator.FromHtml("#80c0a0")) { gridHotelList.Rows[SelectedIndex].Cells[6].Text = "#80c0a0"; gridHotelList.Rows[SelectedIndex].Cells[7].Text = "#70A88C"; this.operandNum.InnerText = (int.Parse(this.operandNum.InnerText) + 1).ToString(); gridHotelList.Rows[SelectedIndex].BackColor = System.Drawing.ColorTranslator.FromHtml("#80c0a0"); ((System.Web.UI.WebControls.WebControl)((Label)gridHotelList.Rows[int.Parse(this.HidSelIndex.Value)].FindControl("Label1"))).BackColor = System.Drawing.ColorTranslator.FromHtml("#70A88C"); } } } #endregion ScriptManager.RegisterStartupScript(this.UpdatePanel10, this.GetType(), "keyinvokeCloseDiv", "invokeCloseDiv();", true); ScriptManager.RegisterStartupScript(this.UpdatePanel10, this.GetType(), "keyinvokeCloseDiv1", "BtnCompleteStyle();", true); this.UpdatePanel5.Update(); }
private void BindViewCSUserListDetail(string strToDay) { MasterInfoEntity _masterInfoEntity = new MasterInfoEntity(); CommonEntity _commonEntity = new CommonEntity(); _masterInfoEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _masterInfoEntity.LogMessages.Userid = UserSession.Current.UserAccount; _masterInfoEntity.LogMessages.Username = UserSession.Current.UserDspName; _masterInfoEntity.LogMessages.IpAddress = UserSession.Current.UserIP; _masterInfoEntity.MasterInfoDBEntity = new List<MasterInfoDBEntity>(); MasterInfoDBEntity msterInfoDBEntity = new MasterInfoDBEntity(); _masterInfoEntity.MasterInfoDBEntity.Add(msterInfoDBEntity); msterInfoDBEntity.Today = strToDay; //DataSet dsDetailResult = MasterInfoBP.CommonSelect(_masterInfoEntity).QueryResult; //以下代码 注释 //lbYesterDate2.Text = ""; //lbYesterDate.Text = ""; //lbTitle.Text = "昨日订单简报"; //以下代码 注释 #region //if (dsDetailResult.Tables.Count > 0) //{ // if (dsDetailResult.Tables["OrderAll"].Rows.Count > 0) // { // decimal decOrderInAll = String.IsNullOrEmpty(dsDetailResult.Tables["OrderAll"].Rows[0][0].ToString().Trim()) ? 0 : decimal.Parse(dsDetailResult.Tables["OrderAll"].Rows[0][0].ToString().Trim()); // lbOrderInAll.Text = decOrderInAll.ToString("#,##0"); // } // else // { // lbOrderInAll.Text = "0"; // } // if (dsDetailResult.Tables["AllTic"].Rows.Count > 0) // { // decimal decSUTicket = String.IsNullOrEmpty(dsDetailResult.Tables["AllTic"].Rows[0]["SUTicket"].ToString().Trim()) ? 0 : decimal.Parse(dsDetailResult.Tables["AllTic"].Rows[0]["SUTicket"].ToString().Trim()); // decimal decALTicket = String.IsNullOrEmpty(dsDetailResult.Tables["AllTic"].Rows[0]["ALTicket"].ToString().Trim()) ? 0 : decimal.Parse(dsDetailResult.Tables["AllTic"].Rows[0]["ALTicket"].ToString().Trim()); // lbSUTicket.Text = (decSUTicket > 0 ) ? " (" + decSUTicket.ToString("#,##0") + ")" : ""; // lbALTicket.Text = (decALTicket > 0 ) ? " (" + decALTicket.ToString("#,##0") + ")" : ""; // } // else // { // lbSUTicket.Text = ""; // lbALTicket.Text = ""; // } // if (dsDetailResult.Tables["OrderTic"].Rows.Count > 0) // { // string ticpricecode = string.Empty; // string ticcolvalue = string.Empty; // decimal decYFTicAll = 0; // decimal decXFTicAll = 0; // decimal decCXFTicAll = 0; // foreach (DataRow drRow in dsDetailResult.Tables["OrderTic"].Rows) // { // ticpricecode = drRow["PRICECODE"].ToString().Trim().ToLower(); // ticcolvalue = drRow["COLVALUE"].ToString().Trim(); // if ("lmbar".Equals(ticpricecode)) // { // decYFTicAll = decYFTicAll + (String.IsNullOrEmpty(ticcolvalue) ? 0 : decimal.Parse(ticcolvalue)); // } // else if ("lmbar2".Equals(ticpricecode)) // { // decXFTicAll = decXFTicAll + (String.IsNullOrEmpty(ticcolvalue) ? 0 : decimal.Parse(ticcolvalue)); // } // else if ("barb".Equals(ticpricecode) || "bar".Equals(ticpricecode)) // { // decCXFTicAll = decCXFTicAll + (String.IsNullOrEmpty(ticcolvalue) ? 0 : decimal.Parse(ticcolvalue)); // } // } // lbYFTicAll.Text = (decYFTicAll > 0) ? " (" + decYFTicAll.ToString("#,##0") + ")" : ""; // lbXFTicAll.Text = (decXFTicAll > 0) ? " (" + decXFTicAll.ToString("#,##0") + ")" : ""; // lbCXFTicAll.Text = (decCXFTicAll > 0) ? " (" + decCXFTicAll.ToString("#,##0") + ")" : ""; // } // else // { // lbYFTicAll.Text = ""; // lbXFTicAll.Text = ""; // lbCXFTicAll.Text = ""; // } // if (dsDetailResult.Tables["RoomTic"].Rows.Count > 0) // { // decimal decRoomTicAll = String.IsNullOrEmpty(dsDetailResult.Tables["RoomTic"].Rows[0]["COLVALUE"].ToString().Trim()) ? 0 : decimal.Parse(dsDetailResult.Tables["RoomTic"].Rows[0]["COLVALUE"].ToString().Trim()); // lbRoomTicAll.Text = (decRoomTicAll > 0) ? " (" + decRoomTicAll.ToString("#,##0") + ")" : ""; // } // else // { // lbRoomTicAll.Text = ""; // } // #region // decimal decOrderSum = 0; // if (dsDetailResult.Tables["OrderSum"].Rows.Count > 0) // { // if ("0".Equals(strToDay)) // { // lbTitle.Text = "昨日订单简报"; // lbYesterDate2.Text = "昨日(" + dsDetailResult.Tables["OrderSum"].Rows[0]["YESTERDATE2"].ToString() + ")"; // hidDate.Value = dsDetailResult.Tables["OrderSum"].Rows[0]["YESTERDATE2"].ToString(); // hidDateType.Value = "0"; // } // else // { // lbTitle.Text = "今日订单简报"; // lbYesterDate2.Text = "今日(" + dsDetailResult.Tables["OrderSum"].Rows[0]["YESTERDATE2"].ToString() + ")"; // hidDate.Value = dsDetailResult.Tables["OrderSum"].Rows[0]["YESTERDATE2"].ToString(); // hidDateType.Value = "1"; // } // //lbOrderAll.Text = (String.IsNullOrEmpty(dsDetailResult.Tables["OrderSum"].Rows[0]["SUMPRICE"].ToString())) ? "0" : decimal.Parse(dsDetailResult.Tables["OrderSum"].Rows[0]["SUMPRICE"].ToString()).ToString("#,##0"); // decOrderSum = (String.IsNullOrEmpty(dsDetailResult.Tables["OrderSum"].Rows[0]["SUMPRICE"].ToString())) ? 0 : decimal.Parse(dsDetailResult.Tables["OrderSum"].Rows[0]["SUMPRICE"].ToString()); // } // else // { // if ("0".Equals(strToDay)) // { // lbTitle.Text = "昨日订单简报"; // lbYesterDate2.Text = "昨日()"; // } // else // { // lbTitle.Text = "今日订单简报"; // lbYesterDate2.Text = "今日()"; // } // lbOrderAll.Text = "0"; // lbUnvOrderPr.Text = "0"; // } // #endregion // decimal decOrderAll = 0; // decimal decYFOrderIOS = 0; // decimal decYFOrderAND = 0; // decimal decYFOrderWAP = 0; // decimal decYFOrderWP7 = 0; // decimal decYFOrderHTK = 0; // decimal decYFOrderQER = 0; // decimal decXFOrderIOS = 0; // decimal decXFOrderAND = 0; // decimal decXFOrderWAP = 0; // decimal decXFOrderWP7 = 0; // decimal decXFOrderHTK = 0; // decimal decXFOrderQER = 0; // decimal decCXFOrderIOS = 0; // decimal decCXFOrderAND = 0; // decimal decCXFOrderWAP = 0; // decimal decCXFOrderWP7 = 0; // decimal decCXFOrderHTK = 0; // decimal decCXFOrderQER = 0; // #region // if (dsDetailResult.Tables["OrderList"].Rows.Count > 0) // { // string pricecode = ""; // string booksource = ""; // string colvalue = ""; // foreach (DataRow drRow in dsDetailResult.Tables["OrderList"].Rows) // { // pricecode = drRow["PRICECODE"].ToString().Trim().ToLower(); // booksource = drRow["BOOKSOURCE"].ToString().Trim().ToLower(); // colvalue = drRow["COLVALUE"].ToString().Trim().ToLower(); // if ("lmbar".Equals(pricecode)) // { // if ("lm_ios".Equals(booksource) || "ios".Equals(booksource)) // { // decYFOrderIOS = decYFOrderIOS + (String.IsNullOrEmpty(colvalue) ? 0 : decimal.Parse(colvalue)); // } // else if ("lm_android".Equals(booksource) || "android".Equals(booksource)) // { // decYFOrderAND = decYFOrderAND + (String.IsNullOrEmpty(colvalue) ? 0 : decimal.Parse(colvalue)); // } // else if ("lm_web".Equals(booksource) || "lm_116114web".Equals(booksource)) // { // decYFOrderWAP = decYFOrderWAP + (String.IsNullOrEmpty(colvalue) ? 0 : decimal.Parse(colvalue)); // } // else if ("wp".Equals(booksource)) // { // decYFOrderWP7 = decYFOrderWP7 + (String.IsNullOrEmpty(colvalue) ? 0 : decimal.Parse(colvalue)); // } // else if ("htk".Equals(booksource)) // { // decYFOrderHTK = decYFOrderHTK + (String.IsNullOrEmpty(colvalue) ? 0 : decimal.Parse(colvalue)); // } // else if ("qunar".Equals(booksource)) // { // decYFOrderQER = decYFOrderQER + (String.IsNullOrEmpty(colvalue) ? 0 : decimal.Parse(colvalue)); // } // } // else if ("lmbar2".Equals(pricecode)) // { // if ("lm_ios".Equals(booksource) || "ios".Equals(booksource)) // { // decXFOrderIOS = decXFOrderIOS + (String.IsNullOrEmpty(colvalue) ? 0 : decimal.Parse(colvalue)); // } // else if ("lm_android".Equals(booksource) || "android".Equals(booksource)) // { // decXFOrderAND = decXFOrderAND + (String.IsNullOrEmpty(colvalue) ? 0 : decimal.Parse(colvalue)); // } // else if ("lm_web".Equals(booksource) || "lm_116114web".Equals(booksource)) // { // decXFOrderWAP = decXFOrderWAP + (String.IsNullOrEmpty(colvalue) ? 0 : decimal.Parse(colvalue)); // } // else if ("wp".Equals(booksource)) // { // decXFOrderWP7 = decXFOrderWP7 + (String.IsNullOrEmpty(colvalue) ? 0 : decimal.Parse(colvalue)); // } // else if ("htk".Equals(booksource)) // { // decXFOrderHTK = decXFOrderHTK + (String.IsNullOrEmpty(colvalue) ? 0 : decimal.Parse(colvalue)); // } // else if ("qunar".Equals(booksource)) // { // decXFOrderQER = decXFOrderQER + (String.IsNullOrEmpty(colvalue) ? 0 : decimal.Parse(colvalue)); // } // } // else if ("barb".Equals(pricecode) || "bar".Equals(pricecode)) // { // if ("lm_ios".Equals(booksource) || "ios".Equals(booksource)) // { // decCXFOrderIOS = decCXFOrderIOS + (String.IsNullOrEmpty(colvalue) ? 0 : decimal.Parse(colvalue)); // } // else if ("lm_android".Equals(booksource) || "android".Equals(booksource)) // { // decCXFOrderAND = decCXFOrderAND + (String.IsNullOrEmpty(colvalue) ? 0 : decimal.Parse(colvalue)); // } // else if ("lm_web".Equals(booksource) || "lm_116114web".Equals(booksource)) // { // decCXFOrderWAP = decCXFOrderWAP + (String.IsNullOrEmpty(colvalue) ? 0 : decimal.Parse(colvalue)); // } // else if ("wp".Equals(booksource)) // { // decCXFOrderWP7 = decCXFOrderWP7 + (String.IsNullOrEmpty(colvalue) ? 0 : decimal.Parse(colvalue)); // } // else if ("htk".Equals(booksource)) // { // decCXFOrderHTK = decCXFOrderHTK + (String.IsNullOrEmpty(colvalue) ? 0 : decimal.Parse(colvalue)); // } // else if ("qunar".Equals(booksource)) // { // decCXFOrderQER = decCXFOrderQER + (String.IsNullOrEmpty(colvalue) ? 0 : decimal.Parse(colvalue)); // } // } // } // lbYFOrderAll.Text = (decYFOrderIOS + decYFOrderAND + decYFOrderWAP + decYFOrderWP7 + decYFOrderHTK + decYFOrderQER).ToString("#,##0"); // lbYFOrderIOS.Text = decYFOrderIOS.ToString("#,##0"); // lbYFOrderAND.Text = decYFOrderAND.ToString("#,##0"); // lbYFOrderWAP.Text = decYFOrderWAP.ToString("#,##0"); // lbYFOrderWP7.Text = decYFOrderWP7.ToString("#,##0"); // lbYFOrderHTK.Text = decYFOrderHTK.ToString("#,##0"); // lbYFOrderQER.Text = decYFOrderQER.ToString("#,##0"); // lbXFOrderAll.Text = (decXFOrderIOS + decXFOrderAND + decXFOrderWAP + decXFOrderWP7 + decXFOrderHTK + decXFOrderQER).ToString("#,##0"); // lbXFOrderIOS.Text = decXFOrderIOS.ToString("#,##0"); // lbXFOrderAND.Text = decXFOrderAND.ToString("#,##0"); // lbXFOrderWAP.Text = decXFOrderWAP.ToString("#,##0"); // lbXFOrderWP7.Text = decXFOrderWP7.ToString("#,##0"); // lbXFOrderHTK.Text = decXFOrderHTK.ToString("#,##0"); // lbXFOrderQER.Text = decXFOrderQER.ToString("#,##0"); // lbCXFOrderAll.Text = (decCXFOrderIOS + decCXFOrderAND + decCXFOrderWAP + decCXFOrderWP7 + decCXFOrderHTK + decCXFOrderQER).ToString("#,##0"); // lbCXFOrderIOS.Text = decCXFOrderIOS.ToString("#,##0"); // lbCXFOrderAND.Text = decCXFOrderAND.ToString("#,##0"); // lbCXFOrderWAP.Text = decCXFOrderWAP.ToString("#,##0"); // lbCXFOrderWP7.Text = decCXFOrderWP7.ToString("#,##0"); // lbCXFOrderHTK.Text = decCXFOrderHTK.ToString("#,##0"); // lbCXFOrderQER.Text = decCXFOrderQER.ToString("#,##0"); // } // else // { // lbYFOrderAll.Text = "0"; // lbYFOrderIOS.Text = "0"; // lbYFOrderAND.Text = "0"; // lbYFOrderWAP.Text = "0"; // lbYFOrderWP7.Text = "0"; // lbYFOrderHTK.Text = "0"; // lbYFOrderQER.Text = "0"; // lbXFOrderAll.Text = "0"; // lbXFOrderIOS.Text = "0"; // lbXFOrderAND.Text = "0"; // lbXFOrderWAP.Text = "0"; // lbXFOrderWP7.Text = "0"; // lbXFOrderHTK.Text = "0"; // lbXFOrderQER.Text = "0"; // lbCXFOrderAll.Text = "0"; // lbCXFOrderIOS.Text = "0"; // lbCXFOrderAND.Text = "0"; // lbCXFOrderWAP.Text = "0"; // lbCXFOrderWP7.Text = "0"; // lbCXFOrderHTK.Text = "0"; // lbCXFOrderQER.Text = "0"; // } // #endregion // SetChartPic(); // decOrderAll = decYFOrderIOS + decYFOrderAND + decYFOrderWAP + decYFOrderWP7 + decYFOrderHTK + decYFOrderQER + decXFOrderIOS + decXFOrderAND + decXFOrderWAP + decXFOrderWP7 + decXFOrderHTK + decXFOrderQER + decCXFOrderIOS + decCXFOrderAND + decCXFOrderWAP + decCXFOrderWP7 + decCXFOrderHTK + decCXFOrderQER; // if (decOrderAll == 0) // { // lbOrderAll.Text = "0"; // lbUnvOrderPr.Text = "0"; // } // else // { // lbOrderAll.Text = decOrderAll.ToString("#,##0"); // lbUnvOrderPr.Text = (decOrderSum / decOrderAll).ToString("#,###.##"); // } // #region // if (dsDetailResult.Tables["UserCount"].Rows.Count > 0) // { // if ("0".Equals(strToDay)) // { // lbUserTitle.Text = "昨日用户简报"; // //lbYesterDate2.Text = "昨日()"; // lbYesterDate.Text = "昨日(" + dsDetailResult.Tables["UserCount"].Rows[0]["YESTERDATE"].ToString() + ")"; // } // else // { // lbUserTitle.Text = "今日用户简报"; // //lbYesterDate2.Text = "昨日()"; // lbYesterDate.Text = "今日(" + dsDetailResult.Tables["UserCount"].Rows[0]["YESTERDATE"].ToString() + ")"; // } // decimal decUserAll = 0; // decimal decIOSUR = 0; // decimal decANDUR = 0; // decimal decWAPUR = 0; // decimal decWP7UR = 0; // decimal decOther = 0; // foreach (DataRow drRow in dsDetailResult.Tables["UserCount"].Rows) // { // decUserAll = decUserAll + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString())); // switch (drRow["COLNMS"].ToString().ToLower()) // { // case "ios": // decIOSUR = decIOSUR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString())); // break; // case "lm_ios": // decIOSUR = decIOSUR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString())); // break; // case "lm_android": // decANDUR = decANDUR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString())); // break; // case "android": // decANDUR = decANDUR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString())); // break; // case "wap": // decWAPUR = decWAPUR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString())); // break; // case "wp": // decWP7UR = decWP7UR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString())); // break; // default: // decOther = decOther + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString())); // break; // } // } // lbUserAll.Text = decUserAll.ToString("#,##0"); // lbIOSUR.Text = decIOSUR.ToString("#,##0"); // lbANDUR.Text = decANDUR.ToString("#,##0"); // lbWAPUR.Text = decWAPUR.ToString("#,##0"); // lbWP7.Text = decWP7UR.ToString("#,##0"); // lbOther.Text = decOther.ToString("#,##0"); // } // else // { // if ("0".Equals(strToDay)) // { // lbUserTitle.Text = "昨日用户简报"; // //lbYesterDate2.Text = "昨日()"; // lbYesterDate.Text = "昨日()"; // } // else // { // lbUserTitle.Text = "今日用户简报"; // //lbYesterDate2.Text = "昨日()"; // lbYesterDate.Text = "今日()"; // } // lbUserAll.Text = "0"; // lbIOSUR.Text = "0"; // lbANDUR.Text = "0"; // lbWAPUR.Text = "0"; // lbWP7.Text = "0"; // lbOther.Text = "0"; // } // #endregion // string strPlanDetail = ""; // strPlanDetail = strPlanDetail + "<table width='60%'><tr>"; // if (dsDetailResult.Tables["ProcCount"].Rows.Count > 0) // { // foreach (DataRow drRow in dsDetailResult.Tables["ProcCount"].Rows) // { // strPlanDetail = strPlanDetail + "<td style='width:2%'><font color='blue'>" + drRow["COLNMS"].ToString() + ":</font></td><td style='width:2%'><font color='red'>" + drRow["COLVALUE"].ToString() + "</font><font color='blue'> 条</font></td>"; // } // } // else // { // strPlanDetail = strPlanDetail + "<td style='width:2%'><font color='blue'>酒店上下线计划:</font></td><td style='width:2%'><font color='red'>0 条</font></td><td style='width:2%'><font color='blue'>修改目的地类型:</font></td><td style='width:2%'><font color='red'>0 条</font></td><td style='width:2%'><font color='blue'>修改酒店详情:</font></td><td style='width:2%'><font color='red'>0 条</font></td>"; // } // strPlanDetail = strPlanDetail + "</tr></table>"; // dvPlanDetail.InnerHtml = strPlanDetail; // //lbPlanOnOff.Text = ""; // //lbFtType.Text = ""; // //lbHotelInfo.Text = ""; // decimal decInRoomAll = 0; // decimal decInRoomIOS = 0; // decimal decInRoomAND = 0; // decimal decInRoomWAP = 0; // if (dsDetailResult.Tables["InRoomCount"].Rows.Count > 0) // { // foreach (DataRow drRow in dsDetailResult.Tables["InRoomCount"].Rows) // { // decInRoomAll = decInRoomAll + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString())); // switch (drRow["BOOKSOURCE"].ToString().ToLower()) // { // case "ios": // decInRoomIOS = decInRoomIOS + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString())); // break; // case "lm_ios": // decInRoomIOS = decInRoomIOS + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString())); // break; // case "lm_android": // decInRoomAND = decInRoomAND + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString())); // break; // case "android": // decInRoomAND = decInRoomAND + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString())); // break; // case "wap": // decInRoomWAP = decInRoomWAP + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString())); // break; // default: // break; // } // } // lbInRoomAll.Text = decInRoomAll.ToString("#,##0"); // lbInRoomIOS.Text = decInRoomIOS.ToString("#,##0"); // lbInRoomAND.Text = decInRoomAND.ToString("#,##0"); // lbInRoomWAP.Text = decInRoomWAP.ToString("#,##0"); // } // else // { // lbInRoomAll.Text = "0"; // lbInRoomIOS.Text = "0"; // lbInRoomAND.Text = "0"; // lbInRoomWAP.Text = "0"; // } //} //else //{ // lbOrderAll.Text = "0"; // lbUnvOrderPr.Text = "0"; // lbYFOrderAll.Text = "0"; // lbYFOrderIOS.Text = "0"; // lbYFOrderAND.Text = "0"; // lbYFOrderWAP.Text = "0"; // lbXFOrderAll.Text = "0"; // lbXFOrderIOS.Text = "0"; // lbXFOrderAND.Text = "0"; // lbXFOrderWAP.Text = "0"; // lbCXFOrderAll.Text = "0"; // lbCXFOrderIOS.Text = "0"; // lbCXFOrderAND.Text = "0"; // lbCXFOrderWAP.Text = "0"; // lbUserAll.Text = "0"; // lbIOSUR.Text = "0"; // lbANDUR.Text = "0"; // lbWAPUR.Text = "0"; // lbOther.Text = "0"; // lbInRoomAll.Text = "0"; // lbInRoomIOS.Text = "0"; // lbInRoomAND.Text = "0"; // lbInRoomWAP.Text = "0"; // dvPlanDetail.InnerHtml = "<table width='60%'><tr><td style='width:2%'><font color='blue'>酒店上下线计划:</font></td><td style='width:2%'><font color='red'>0 条</font></td><td style='width:2%'><font color='blue'>修改目的地类型:</font></td><td style='width:2%'><font color='red'>0 条</font></td><td style='width:2%'><font color='blue'>修改酒店详情:</font></td><td style='width:2%'><font color='red'>0 条</font></td></tr></table>"; // //lbPlanOnOff.Text = "0"; // //lbFtType.Text = "0"; // //lbHotelInfo.Text = "0"; //} #endregion }
public void CommonSelectTodayLoginUserNew(string StartDate, string EndDate) { MasterInfoEntity _masterInfoEntity = new MasterInfoEntity(); CommonEntity _commonEntity = new CommonEntity(); _masterInfoEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _masterInfoEntity.LogMessages.Userid = UserSession.Current.UserAccount; _masterInfoEntity.LogMessages.Username = UserSession.Current.UserDspName; _masterInfoEntity.LogMessages.IpAddress = UserSession.Current.UserIP; _masterInfoEntity.MasterInfoDBEntity = new List<MasterInfoDBEntity>(); MasterInfoDBEntity msterInfoDBEntity = new MasterInfoDBEntity(); _masterInfoEntity.MasterInfoDBEntity.Add(msterInfoDBEntity); msterInfoDBEntity.RegistStart = StartDate; msterInfoDBEntity.RegistEnd = EndDate; DataSet dsTodayLoginResult = MasterInfoBP.CommonSelectTodayLoginUserNew(_masterInfoEntity).QueryResult; decimal decLogUserAll = 0; decimal decLogUserAllYK = 0; if (dsTodayLoginResult.Tables["TodayLoginUserDataNew"].Rows.Count > 0) { decLogUserAll = decLogUserAll + ((String.IsNullOrEmpty(dsTodayLoginResult.Tables["TodayLoginUserDataNew"].Rows[0]["OUSER"].ToString())) ? 0 : decimal.Parse(dsTodayLoginResult.Tables["TodayLoginUserDataNew"].Rows[0]["OUSER"].ToString())); decLogUserAllYK = decLogUserAllYK + ((String.IsNullOrEmpty(dsTodayLoginResult.Tables["TodayLoginUserDataNew"].Rows[0]["NUSER"].ToString())) ? 0 : decimal.Parse(dsTodayLoginResult.Tables["TodayLoginUserDataNew"].Rows[0]["NUSER"].ToString())); lbTodayLoginAll.Text = (decLogUserAll + decLogUserAllYK).ToString("#,##0"); lbLgALLYK.Text = decLogUserAllYK.ToString("#,##0"); } else { lbTodayLoginAll.Text = "0"; lbLgALLYK.Text = "0"; } }
//导出Excel文件 protected void btnExport_Click(object sender, EventArgs e) { LmSystemLogEntity _lmSystemLogEntity = new LmSystemLogEntity(); CommonEntity _commonEntity = new CommonEntity(); _lmSystemLogEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _lmSystemLogEntity.LogMessages.Userid = UserSession.Current.UserAccount; _lmSystemLogEntity.LogMessages.Username = UserSession.Current.UserDspName; _lmSystemLogEntity.LogMessages.IpAddress = UserSession.Current.UserIP; _lmSystemLogEntity.FogOrderID = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["OrderID"].ToString())) ? null : ViewState["OrderID"].ToString(); _lmSystemLogEntity.StartDTime = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["StartDTime"].ToString())) ? null : ViewState["StartDTime"].ToString(); ; _lmSystemLogEntity.EndDTime = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["EndDTime"].ToString())) ? null : ViewState["EndDTime"].ToString(); ; _lmSystemLogEntity.HotelID = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["HotelID"].ToString())) ? null : ViewState["HotelID"].ToString(); _lmSystemLogEntity.CityID = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["CityID"].ToString())) ? null : ViewState["CityID"].ToString(); _lmSystemLogEntity.GroupID = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["GroupID"].ToString())) ? null : ViewState["GroupID"].ToString(); _lmSystemLogEntity.PayCode = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["PayCode"].ToString())) ? null : ViewState["PayCode"].ToString(); _lmSystemLogEntity.BookStatus = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["BookStatus"].ToString())) ? null : ViewState["BookStatus"].ToString(); _lmSystemLogEntity.PayStatus = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["PayStatus"].ToString())) ? null : ViewState["PayStatus"].ToString(); _lmSystemLogEntity.Aprove = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["Aprove"].ToString())) ? null : ViewState["Aprove"].ToString(); _lmSystemLogEntity.Ticket = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["Ticket"].ToString())) ? null : ViewState["Ticket"].ToString(); _lmSystemLogEntity.HotelComfirm = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["HotelComfirm"].ToString())) ? null : ViewState["HotelComfirm"].ToString(); _lmSystemLogEntity.Mobile = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["Mobile"].ToString())) ? null : ViewState["Mobile"].ToString(); _lmSystemLogEntity.InStart = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["InStart"].ToString())) ? null : ViewState["InStart"].ToString(); _lmSystemLogEntity.InEnd = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["InEnd"].ToString())) ? null : ViewState["InEnd"].ToString(); _lmSystemLogEntity.OutStart = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["OutStart"].ToString())) ? null : ViewState["OutStart"].ToString(); _lmSystemLogEntity.OutEnd = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["OutEnd"].ToString())) ? null : ViewState["OutEnd"].ToString(); _lmSystemLogEntity.PlatForm = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["PlatForm"].ToString())) ? null : ViewState["PlatForm"].ToString(); _lmSystemLogEntity.Sales = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["Sales"].ToString())) ? null : ViewState["Sales"].ToString(); _lmSystemLogEntity.OutTest = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["OutTest"].ToString())) ? null : ViewState["OutTest"].ToString(); _lmSystemLogEntity.OutCC = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["OutCC"].ToString())) ? null : ViewState["OutCC"].ToString(); _lmSystemLogEntity.OutUC = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["OutUC"].ToString())) ? null : ViewState["OutUC"].ToString(); _lmSystemLogEntity.OutFailOrder = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["OutFailOrder"].ToString())) ? null : ViewState["OutFailOrder"].ToString(); _lmSystemLogEntity.TicketType = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["TicketType"].ToString())) ? null : ViewState["TicketType"].ToString(); _lmSystemLogEntity.TicketData = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["TicketData"].ToString())) ? null : ViewState["TicketData"].ToString(); _lmSystemLogEntity.TicketPayCode = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["TicketPcode"].ToString())) ? null : ViewState["TicketPcode"].ToString(); _lmSystemLogEntity.DashPopStatus = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["DashPopStatus"].ToString())) ? null : ViewState["DashPopStatus"].ToString(); _lmSystemLogEntity.DashInStart = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["DashInStart"].ToString())) ? null : ViewState["DashInStart"].ToString(); _lmSystemLogEntity.DashInEnd = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["DashInEnd"].ToString())) ? null : ViewState["DashInEnd"].ToString(); _lmSystemLogEntity.DashStartDTime = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["DashStartDTime"].ToString())) ? null : ViewState["DashStartDTime"].ToString(); _lmSystemLogEntity.DashEndDTime = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["DashEndDTime"].ToString())) ? null : ViewState["DashEndDTime"].ToString(); _lmSystemLogEntity.PackageName = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["packagename"].ToString())) ? null : ViewState["packagename"].ToString(); _lmSystemLogEntity.AmountFrom = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["amountfrom"].ToString())) ? null : ViewState["amountfrom"].ToString(); _lmSystemLogEntity.AmountTo = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["amountto"].ToString())) ? null : ViewState["amountto"].ToString(); _lmSystemLogEntity.PickfromDate = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["pickfromdate"].ToString())) ? null : ViewState["pickfromdate"].ToString(); _lmSystemLogEntity.PicktoDate = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["picktodate"].ToString())) ? null : ViewState["picktodate"].ToString(); _lmSystemLogEntity.TicketTime = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["tickettime"].ToString())) ? null : ViewState["tickettime"].ToString(); _lmSystemLogEntity.OrderChannel = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["OrderChannel"].ToString())) ? null : ViewState["OrderChannel"].ToString(); _lmSystemLogEntity.OrderTypeStatus = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["OrderTypeStatus"].ToString())) ? null : ViewState["OrderTypeStatus"].ToString(); _lmSystemLogEntity.OrderBookStatus = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["OrderBookStatus"].ToString())) ? null : ViewState["OrderBookStatus"].ToString(); _lmSystemLogEntity.OrderBookStatusOther = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["OrderBookStatusOther"].ToString())) ? null : ViewState["OrderBookStatusOther"].ToString(); _lmSystemLogEntity.RestPriceCode = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["RestPriceCode"].ToString())) ? null : ViewState["RestPriceCode"].ToString(); _lmSystemLogEntity.RestBookStatus = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["RestBookStatus"].ToString())) ? null : ViewState["RestBookStatus"].ToString(); _lmSystemLogEntity.IsReserve = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["IsReserve"].ToString())) ? null : ViewState["IsReserve"].ToString(); _lmSystemLogEntity.GuestName = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["GuestName"].ToString())) ? null : ViewState["GuestName"].ToString(); _lmSystemLogEntity.SortField = gridViewCSReviewLmSystemLogList.Attributes["SortExpression"].ToString(); _lmSystemLogEntity.SortType = gridViewCSReviewLmSystemLogList.Attributes["SortDirection"].ToString(); DataSet dsResult = new DataSet(); //if (orderXPaymentCode != "" && orderXPaymentCode == "QuFen") if (ViewState["orderXPaymentCode"].ToString() != "" && ViewState["orderXPaymentCode"].ToString() == "QuFen") { //dsResult = LmSystemLogBP.order_XPayment_ReviewLmOrderLogSelectCount(_lmSystemLogEntity).QueryResult; dsResult = LmSystemLogBP.order_XPayment_ReviewLmOrderLogExport(_lmSystemLogEntity).QueryResult; } //else if (orderInTheNight != "" && orderInTheNight == "CKIN") else if (ViewState["orderInTheNight"].ToString() != "" && ViewState["orderInTheNight"].ToString() == "CKIN") { //dsResult = LmSystemLogBP.order_InTheNight_ReviewLmOrderLogSelectCount(_lmSystemLogEntity).QueryResult; dsResult = LmSystemLogBP.order_InTheNight_ReviewLmOrderLogExport(_lmSystemLogEntity).QueryResult; } else if (ViewState["Rests"].ToString() != "" && ViewState["Rests"].ToString() == "Rests") { dsResult = LmSystemLogBP.ExportLmOrderSelectByRests(_lmSystemLogEntity).QueryResult;//其他 排除已存在的渠道 } else { dsResult = LmSystemLogBP.ExportLmOrderSelect(_lmSystemLogEntity).QueryResult; } if (dsResult.Tables.Count == 0 && dsResult.Tables[0].Rows.Count == 0) { messageContent.InnerHtml = GetLocalResourceObject("WarningMessage").ToString(); return; } if (dsResult.Tables.Count > 0 && dsResult.Tables[0].Rows.Count > 0) { for (int i = 0; i < dsResult.Tables[0].Rows.Count; i++) { if (dsResult.Tables[0].Rows[i]["LOGINMOBILE"].ToString() == "" && (dsResult.Tables[0].Rows[i]["ORDER_CHANNEL"].ToString() == "HOTELVP" || dsResult.Tables[0].Rows[i]["ORDER_CHANNEL"].ToString() == "HOTELVPPRO" || dsResult.Tables[0].Rows[i]["ORDER_CHANNEL"].ToString() == "GETAROOM")) { dsResult.Tables[0].Rows[i]["LOGINMOBILE"] = "游客"; } else if (dsResult.Tables[0].Rows[i]["LOGINMOBILE"].ToString() == "" && dsResult.Tables[0].Rows[i]["ORDER_CHANNEL"].ToString() == "QUNAR") { dsResult.Tables[0].Rows[i]["LOGINMOBILE"] = "QUNAR"; } } } CommonFunction.ExportExcelForLM(dsResult); }
public static int InsertEventHistory(CommonEntity CommonEntity) { string IsWriteLog = ConfigurationManager.AppSettings["IsWriteLog"].ToString(); if ("0".Equals(IsWriteLog)) { return 1; } if (CommonEntity.CommonDBEntity.Count == 0) { return 0; } DataCommand cmd = DataCommandManager.GetDataCommand("InsertEventHistory"); foreach (CommonDBEntity dbParm in CommonEntity.CommonDBEntity) { cmd.SetParameterValue("@USERID", (CommonEntity.LogMessages != null) ? CommonEntity.LogMessages.Userid : ""); cmd.SetParameterValue("@USERNAME", (CommonEntity.LogMessages != null) ? CommonEntity.LogMessages.Username : ""); cmd.SetParameterValue("@IPADDRESS", (CommonEntity.LogMessages != null) ? CommonEntity.LogMessages.IpAddress : ""); cmd.SetParameterValue("@EVENTTYPE", dbParm.Event_Type); cmd.SetParameterValue("@EVENTID", dbParm.Event_ID); cmd.SetParameterValue("@EVENTCONTENT", dbParm.Event_Content); cmd.SetParameterValue("@EVENTRESULT", dbParm.Event_Result); cmd.ExecuteNonQuery(); } return 1; }
public static string UnlockOrder(string OrderID) { LmSystemLogEntity _lmSystemLogEntity = new LmSystemLogEntity(); _lmSystemLogEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _lmSystemLogEntity.LogMessages.Userid = UserSession.Current.UserAccount; _lmSystemLogEntity.LogMessages.Username = UserSession.Current.UserDspName; _lmSystemLogEntity.LogMessages.IpAddress = UserSession.Current.UserIP; _lmSystemLogEntity.FogOrderID = OrderID; DataSet dsMainResult = LmSystemLogBP.ChkOrderOperationSelect(_lmSystemLogEntity).QueryResult; if (dsMainResult.Tables.Count == 0 || dsMainResult.Tables[0].Rows.Count == 0) { //imgAlert.Src = "../../Styles/images/err.png"; //dvImg.Style.Add("margin-left", "100px"); //dvErrorInfo.InnerHtml = GetLocalResourceObject("WarningMessage").ToString(); //ScriptManager.RegisterStartupScript(this.UpdatePanel6, this.GetType(), "setScript", "invokeOpenList()", true); return "../../Styles/images/err.png" + "|" + "120px" + "|" + "该订单信息不存在,请确认!" + "|"; } string strMsg = LmSystemLogBP.UnlockOrderConfirmControl(_lmSystemLogEntity).ErrorMSG; if (!String.IsNullOrEmpty(strMsg)) { //dvErrorInfo.InnerHtml = strMsg; //imgAlert.Src = "../../Styles/images/err.png"; //dvImg.Style.Add("margin-left", "100px"); return "../../Styles/images/err.png" + "|" + "120px" + "|" + strMsg + "|"; } else { CommonEntity _commonEntity = new CommonEntity(); _commonEntity.LogMessages = _lmSystemLogEntity.LogMessages; _commonEntity.CommonDBEntity = new List<CommonDBEntity>(); CommonDBEntity commonDBEntity = new CommonDBEntity(); commonDBEntity.Event_Type = "订单确认-强制锁定"; commonDBEntity.Event_ID = _lmSystemLogEntity.FogOrderID; string conTent = "订单确认强制锁定 - 订单ID:{0} 操作人:{1}";// GetLocalResourceObject("EventUnLockMessage").ToString(); conTent = string.Format(conTent, _lmSystemLogEntity.FogOrderID, _lmSystemLogEntity.LogMessages.Username); commonDBEntity.Event_Content = conTent; commonDBEntity.Event_Result = " 订单确认锁定成功! ";// GetLocalResourceObject("UpdateUnLockSuccess").ToString(); //dvErrorInfo.InnerHtml = GetLocalResourceObject("UpdateUnLockSuccess").ToString(); //imgAlert.Src = "../../Styles/images/suc.png"; //dvImg.Style.Add("margin-left", "100px"); _commonEntity.CommonDBEntity.Add(commonDBEntity); CommonBP.InsertEventHistory(_commonEntity); return "../../Styles/images/suc.png" + "|" + "120px" + "|" + "订单确认锁定成功!" + "|" + UserSession.Current.UserAccount; //lbActionUser.Text = UserSession.Current.UserAccount; } //return json; }
public static string SaveOrderList(string OrderList, string OrderID) { string strResult = string.Empty; string[] ODList = OrderList.Split(','); if (ODList.Length == 0) { strResult = "../../Styles/images/err.png" + "|" + "120px" + "|" + "未填写订单确认信息,请修改!"; return strResult; } string[] ODDetail; string strRemarkTp = string.Empty; foreach (string tempOD in ODList) { if (!String.IsNullOrEmpty(tempOD)) { ODDetail = tempOD.Split('_'); if (ODDetail[0].Trim() == OrderID) { if ("2".Equals(ODDetail[1].Trim()))//备注 { strRemarkTp = ODDetail[2].Trim(); } else { strRemarkTp = ODDetail[3].Trim();//确认可入住 Or 取消订单 } if (String.IsNullOrEmpty(strRemarkTp))//判断操作备注 { strResult = "../../Styles/images/err.png" + "|" + "120px" + "|" + "操作备注不能为空,请修改!"; return strResult; } if ((StringUtility.Text_Length(strRemarkTp) > 250))//判断操作备注 { strResult = "../../Styles/images/err.png" + "|" + "70px" + "|" + "操作备注长度不能超过85位中文字符,请修改!"; return strResult; } } else { if ("1".Equals(ODDetail[1].Trim())) { //if (String.IsNullOrEmpty(ODDetail[2].Trim())) //{ // strResult = "../../Styles/images/err.png" + "|" + "70px" + "|" + "本酒店其他订单中存在确认号为空,请修改!"; // return strResult; //} if (!String.IsNullOrEmpty(ODDetail[2].Trim()) && (StringUtility.Text_Length(ODDetail[2].Trim()) > 30)) { strResult = "../../Styles/images/err.png" + "|" + "10px" + "|" + "本酒店其他订单中存在确认号超过30位字符,请修改!"; return strResult; } } else if ("2".Equals(ODDetail[1].Trim())) { if (String.IsNullOrEmpty(ODDetail[2].Trim())) { strResult = "../../Styles/images/err.png" + "|" + "10px" + "|" + "本酒店其他订单中存在操作备注为空,请修改!"; return strResult; } if ((StringUtility.Text_Length(ODDetail[2].Trim()) > 250)) { strResult = "../../Styles/images/err.png" + "|" + "10px" + "|" + "本酒店其他订单中存在操作备注超过85位中文字符,请修改!"; return strResult; } } } } } LmSystemLogEntity _lmSystemLogEntity = new LmSystemLogEntity(); _lmSystemLogEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _lmSystemLogEntity.LogMessages.Userid = UserSession.Current.UserAccount; _lmSystemLogEntity.LogMessages.Username = UserSession.Current.UserDspName; _lmSystemLogEntity.LogMessages.IpAddress = UserSession.Current.UserIP; _lmSystemLogEntity.FogOrderID = OrderID; _lmSystemLogEntity.OrderList = OrderList; _lmSystemLogEntity = LmSystemLogBP.SaveConfirmOrderList(_lmSystemLogEntity); int iResult = _lmSystemLogEntity.Result; string errorMSG = _lmSystemLogEntity.ErrorMSG; CommonEntity _commonEntity = new CommonEntity(); _commonEntity.LogMessages = _lmSystemLogEntity.LogMessages; _commonEntity.CommonDBEntity = new List<CommonDBEntity>(); CommonDBEntity commonDBEntity = new CommonDBEntity(); commonDBEntity.Event_Type = "订单确认-保存"; commonDBEntity.Event_ID = OrderID; string conTent = "订单确认保存 - 订单ID:{0} 同酒店订单列表:{1} "; conTent = string.Format(conTent, OrderID, OrderList); commonDBEntity.Event_Content = conTent; if (iResult == 1) { commonDBEntity.Event_Result = OrderList.TrimEnd(',').Split(',').Length.ToString() + "张订单确认保存成功!"; strResult = "../../Styles/images/suc.png" + "|" + "120px" + "|" + OrderList.TrimEnd(',').Split(',').Length.ToString() + "张订单确认保存成功!"; } else if (iResult == 2) { commonDBEntity.Event_Result = errorMSG; strResult = "../../Styles/images/err.png" + "|" + "120px" + "|" + errorMSG; } else if (iResult == 3) { commonDBEntity.Event_Result = errorMSG; strResult = "../../Styles/images/err.png" + "|" + "1px" + "|" + errorMSG; } else { commonDBEntity.Event_Result = "订单确认保存失败,请稍微再试!"; strResult = "../../Styles/images/err.png" + "|" + "120px" + "|" + "订单确认保存失败,请稍微再试!"; } _commonEntity.CommonDBEntity.Add(commonDBEntity); CommonBP.InsertEventHistory(_commonEntity); return strResult; }
public static string ReSendFaxOrder(string OrderID, string HotelID) { string strResult = string.Empty; LmSystemLogEntity _lmSystemLogEntity = new LmSystemLogEntity(); _lmSystemLogEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _lmSystemLogEntity.LogMessages.Userid = UserSession.Current.UserAccount; _lmSystemLogEntity.LogMessages.Username = UserSession.Current.UserDspName; _lmSystemLogEntity.LogMessages.IpAddress = UserSession.Current.UserIP; _lmSystemLogEntity.FogOrderID = OrderID; _lmSystemLogEntity.HotelID = HotelID; _lmSystemLogEntity.SendFaxType = "1"; _lmSystemLogEntity.ObjectID = OrderID; _lmSystemLogEntity = LmSystemLogBP.SendFaxService(_lmSystemLogEntity); int iResult = _lmSystemLogEntity.Result; CommonEntity _commonEntity = new CommonEntity(); _commonEntity.LogMessages = _lmSystemLogEntity.LogMessages; _commonEntity.CommonDBEntity = new List<CommonDBEntity>(); CommonDBEntity commonDBEntity = new CommonDBEntity(); commonDBEntity.Event_Type = "订单确认-发送传真"; commonDBEntity.Event_ID = OrderID; string conTent = "单确认重发传真 - 酒店ID:{0} 订单ID:{1}"; conTent = string.Format(conTent, HotelID, OrderID); commonDBEntity.Event_Content = conTent; if (iResult == 1) { commonDBEntity.Event_Result = "订单确认重发传真提交成功,发送中!"; strResult = "../../Styles/images/suc.png" + "|" + "70px" + "|" + "订单确认重发传真提交成功,发送中!"; } else { commonDBEntity.Event_Result = _lmSystemLogEntity.ErrorMSG; strResult = "../../Styles/images/err.png" + "|" + "70px" + "|" + "订单确认重发传真失败,请稍微再试!"; } _commonEntity.CommonDBEntity.Add(commonDBEntity); CommonBP.InsertEventHistory(_commonEntity); return strResult; }
public static string ModifyRemark(string HotelID, string Remark, string OrderID) { string strResult = string.Empty; LmSystemLogEntity _lmSystemLogEntity = new LmSystemLogEntity(); if (!String.IsNullOrEmpty(Remark.Trim()) && (StringUtility.Text_Length(Remark.ToString().Trim()) > 600)) { strResult = "../../Styles/images/err.png" + "|" + "10px" + "|" + "操作备注长度不能超过85位中文字符,请修改!"; return strResult; } _lmSystemLogEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _lmSystemLogEntity.LogMessages.Userid = UserSession.Current.UserAccount; _lmSystemLogEntity.LogMessages.Username = UserSession.Current.UserDspName; _lmSystemLogEntity.LogMessages.IpAddress = UserSession.Current.UserIP; _lmSystemLogEntity.HotelID = HotelID; _lmSystemLogEntity.BookRemark = Remark.Trim(); int iResult = LmSystemLogBP.SaveHotelExRemark(_lmSystemLogEntity); CommonEntity _commonEntity = new CommonEntity(); _commonEntity.LogMessages = _lmSystemLogEntity.LogMessages; _commonEntity.CommonDBEntity = new List<CommonDBEntity>(); CommonDBEntity commonDBEntity = new CommonDBEntity(); commonDBEntity.Event_Type = "订单确认-酒店备注保存"; commonDBEntity.Event_ID = HotelID + "-" + OrderID; string conTent = "订单确认保存 - 酒店ID:{0} 备注:{1} "; conTent = string.Format(conTent, _lmSystemLogEntity.HotelID, _lmSystemLogEntity.BookRemark); commonDBEntity.Event_Content = conTent; if (iResult == 1) { commonDBEntity.Event_Result = "订单确认-酒店备注保存成功!"; strResult = "../../Styles/images/suc.png" + "|" + "100px" + "|" + "订单确认-酒店备注保存成功!"; } else if (iResult == 2) { commonDBEntity.Event_Result = "该酒店执行信息不存在,请至酒店基础信息维护!"; strResult = "../../Styles/images/err.png" + "|" + "10px" + "|" + "该酒店执行信息不存在,请至酒店基础信息维护!"; } else { commonDBEntity.Event_Result = "订单确认-酒店备注保存失败,请稍微再试!"; strResult = "../../Styles/images/err.png" + "|" + "10px" + "|" + "订单确认-酒店备注保存失败,请稍微再试!"; } _commonEntity.CommonDBEntity.Add(commonDBEntity); CommonBP.InsertEventHistory(_commonEntity); return strResult; }
private void BindOrderIssue(string orderID) { CommonEntity _commonEntity = new CommonEntity(); IssueInfoEntity _issueinfoEntity = new IssueInfoEntity(); _issueinfoEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _issueinfoEntity.LogMessages.Userid = UserSession.Current.UserAccount; _issueinfoEntity.LogMessages.Username = UserSession.Current.UserDspName; _issueinfoEntity.LogMessages.IpAddress = UserSession.Current.UserIP; _issueinfoEntity.IssueInfoDBEntity = new List<IssueInfoDBEntity>(); IssueInfoDBEntity issueinfoDBEntity = new IssueInfoDBEntity(); issueinfoDBEntity.IssueID = ""; issueinfoDBEntity.ActionType = "0"; DataSet dsOrderInfo = GetOrderInfoData(orderID); if (dsOrderInfo.Tables.Count == 0 || dsOrderInfo.Tables[0].Rows.Count == 0) { return; } txtTitle.Text = "[" + dsOrderInfo.Tables[0].Rows[0]["HOTELNM"].ToString() + "]订单审核问题"; ddpPriority.SelectedValue = "2"; string strIssue = (String.IsNullOrEmpty(dsOrderInfo.Tables[0].Rows[0]["SALESMG"].ToString())) ? ConfigurationManager.AppSettings["DefaultIssue"].ToString() : "["+ dsOrderInfo.Tables[0].Rows[0]["SALESMG"].ToString() +"]"+ dsOrderInfo.Tables[0].Rows[0]["SALESNM"].ToString(); ddpStatusList.SelectedValue = "0"; chkIssueType.SelectedValue = "8"; //ScriptManager.RegisterStartupScript(this.UpdatePanel8, this.GetType(), "setScript", "SetUserControl('" + strIssue + "','0')", true); this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "key", "SetUserControl('" + strIssue + "','0')", true); //UpdatePanel8.Update(); }
/// <summary> /// 计划关房(批量操作 关闭计划) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> public static string btnPlanCloseRoom(string hotelID, string hotelNM, string cityID, string remark, string status, bool isRenew, string StartDate, string EndDate, string dateSE, string Lmbar2RoomCode, string LmbarRoomCode) { try { #region APPContentEntity _appcontentEntity = new APPContentEntity(); _appcontentEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _appcontentEntity.LogMessages.Userid = UserSession.Current.UserAccount; _appcontentEntity.LogMessages.Username = UserSession.Current.UserDspName; _appcontentEntity.LogMessages.IpAddress = UserSession.Current.UserIP; CommonEntity _commonEntity = new CommonEntity(); _commonEntity.CommonDBEntity = new List<CommonDBEntity>(); _commonEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _commonEntity.LogMessages.IpAddress = UserSession.Current.UserIP; _commonEntity.LogMessages.Username = UserSession.Current.UserDspName; _commonEntity.LogMessages.Userid = UserSession.Current.UserAccount; CommonDBEntity commonDBEntity = new CommonDBEntity(); _appcontentEntity.APPContentDBEntity = new List<APPContentDBEntity>(); APPContentDBEntity appcontentDBEntity = new APPContentDBEntity(); #endregion bool IsFlag = false; if (!string.IsNullOrEmpty(dateSE)) { DataTable dtPlanLMBAR2 = GetBindLmbarPlanList(StartDate, EndDate, hotelID, "LMBAR2").Tables[0];//LMBAR2计划 DataTable dtPlanLMBAR = GetBindLmbarPlanList(StartDate, EndDate, hotelID, "LMBAR").Tables[0];//LMBAR计划 string[] datas = dateSE.Split(','); for (int i = 0; i < datas.Length; i++) { if (!string.IsNullOrEmpty(datas[i].ToString())) { //if (DateTime.Parse(datas[i].ToString()).ToShortDateString() == System.DateTime.Now.ToShortDateString()) //{ // IsFlag = true; //} string effDate = datas[i].ToString().Replace("/", "-"); #region for (int l = 0; l < Lmbar2RoomCode.Split('|').Length; l++) { DataRow[] rowsLmbar2 = dtPlanLMBAR2.Select("EFFECTDATESTRING='" + DateTime.Parse(effDate).ToString("yyyy-MM-dd") + "' and ROOMTYPECODE='" + Lmbar2RoomCode.Split('|')[l].ToString() + "'"); for (int j = 0; j < rowsLmbar2.Length; j++) { if (!string.IsNullOrEmpty(rowsLmbar2[j]["RoomNum"].ToString()) && rowsLmbar2[j]["RoomNum"].ToString().ToLower() != "null") { //城市ID appcontentDBEntity.CityID = cityID; //酒店ID appcontentDBEntity.HotelID = hotelID; //酒店名称 appcontentDBEntity.HotelNM = hotelNM; //PlanDate appcontentDBEntity.PlanTime = DateTime.Parse(effDate).ToShortDateString(); //价格代码 appcontentDBEntity.PriceCode = rowsLmbar2[j]["RATECODE"].ToString(); //价格 appcontentDBEntity.TwoPrice = rowsLmbar2[j]["TWOPRICE"].ToString(); //状态 开启 关闭 appcontentDBEntity.PlanStatus = status == "" ? rowsLmbar2[j]["STATUS"].ToString() : status; appcontentDBEntity.RoomCount = rowsLmbar2[j]["ROOMNUM"].ToString(); appcontentDBEntity.IsReserve = rowsLmbar2[j]["ISRESERVE"].ToString(); //房型名称 appcontentDBEntity.RoomName = rowsLmbar2[j]["ROOMTYPENAME"].ToString(); //房型Code appcontentDBEntity.RoomCode = rowsLmbar2[j]["ROOMTYPECODE"].ToString(); appcontentDBEntity.WeekList = "1,2,3,4,5,6,7"; //备注 appcontentDBEntity.Remark = remark; //操作人 appcontentDBEntity.CreateUser = UserSession.Current.UserAccount; _appcontentEntity.APPContentDBEntity.Add(appcontentDBEntity); CommonBP.InsertConsultRoomHistory(_appcontentEntity); _appcontentEntity.APPContentDBEntity.Clear(); } } } #endregion #region for (int l = 0; l < LmbarRoomCode.Split('|').Length; l++) { DataRow[] rowsLmbar = dtPlanLMBAR.Select("EFFECTDATESTRING='" + DateTime.Parse(effDate).ToString("yyyy-MM-dd") + "' and ROOMTYPECODE='" + LmbarRoomCode.Split('|')[l].ToString() + "'"); for (int j = 0; j < rowsLmbar.Length; j++) { if (!string.IsNullOrEmpty(rowsLmbar[j]["ROOMNUM"].ToString()) && rowsLmbar[j]["RoomNum"].ToString().ToLower() != "null") { //城市ID appcontentDBEntity.CityID = cityID; //酒店ID appcontentDBEntity.HotelID = hotelID; //酒店名称 appcontentDBEntity.HotelNM = hotelNM; //PlanDate appcontentDBEntity.PlanTime = DateTime.Parse(effDate).ToShortDateString(); //价格代码 appcontentDBEntity.PriceCode = rowsLmbar[j]["RATECODE"].ToString(); //价格 appcontentDBEntity.TwoPrice = rowsLmbar[j]["TWOPRICE"].ToString(); //状态 开启 关闭 appcontentDBEntity.PlanStatus = status == "" ? rowsLmbar[j]["STATUS"].ToString() : status; appcontentDBEntity.RoomCount = rowsLmbar[j]["ROOMNUM"].ToString(); appcontentDBEntity.IsReserve = rowsLmbar[j]["ISRESERVE"].ToString(); //房型名称 appcontentDBEntity.RoomName = rowsLmbar[j]["ROOMTYPENAME"].ToString(); //房型Code appcontentDBEntity.RoomCode = rowsLmbar[j]["ROOMTYPECODE"].ToString(); appcontentDBEntity.WeekList = "1,2,3,4,5,6,7"; //备注 appcontentDBEntity.Remark = remark; //操作人 appcontentDBEntity.CreateUser = UserSession.Current.UserAccount; _appcontentEntity.APPContentDBEntity.Add(appcontentDBEntity); CommonBP.InsertConsultRoomHistory(_appcontentEntity); _appcontentEntity.APPContentDBEntity.Clear(); } } } #endregion if (isRenew) { appcontentDBEntity.HotelID = hotelID; appcontentDBEntity.StartDTime = effDate; appcontentDBEntity.EndDTime = effDate; appcontentDBEntity.Lmbar2RoomCode = Lmbar2RoomCode.Replace("|", ","); appcontentDBEntity.LmbarRoomCode = LmbarRoomCode.Replace("|", ","); appcontentDBEntity.TypeID = status == "true" ? "3" : "2";// "2";//type:1 满房、2 关房、3 开房 appcontentDBEntity.UpdateUser = UserSession.Current.UserAccount; _appcontentEntity.APPContentDBEntity.Add(appcontentDBEntity); _appcontentEntity = HotelInfoBP.BatchUpdatePlan(_appcontentEntity); if (_appcontentEntity.Result == 2) { return "{\"message\":\"Fail\",\"code\":-1}"; } _appcontentEntity.APPContentDBEntity.Clear(); } } } } return "{\"message\":\"success\",\"code\":200}"; } catch (Exception ex) { return "{\"message\":\"fail\",\"code\":-1}"; } }
private DataSet GetOrderInfoData(string orderID) { LmSystemLogEntity _lmSystemLogEntity = new LmSystemLogEntity(); CommonEntity _commonEntity = new CommonEntity(); _lmSystemLogEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _lmSystemLogEntity.LogMessages.Userid = UserSession.Current.UserAccount; _lmSystemLogEntity.LogMessages.Username = UserSession.Current.UserDspName; _lmSystemLogEntity.LogMessages.IpAddress = UserSession.Current.UserIP; _lmSystemLogEntity.FogOrderID = orderID; return LmSystemLogBP.GetOrderInfoData(_lmSystemLogEntity).QueryResult; }
public static string RenewPlanBySingleHotel(string hotelID, string CityID, string HotelNM, string PriceCode, string TwoPrice, string Status, string RoomCount, string IsReserve, string RoomName, string RoomCode, string StartDTime, string EndDTime, string Remark) { APPContentEntity _appcontentEntity = new APPContentEntity(); _appcontentEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _appcontentEntity.LogMessages.Userid = UserSession.Current.UserAccount; _appcontentEntity.LogMessages.Username = UserSession.Current.UserDspName; _appcontentEntity.LogMessages.IpAddress = UserSession.Current.UserIP; CommonEntity _commonEntity = new CommonEntity(); _commonEntity.CommonDBEntity = new List<CommonDBEntity>(); _commonEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _commonEntity.LogMessages.IpAddress = UserSession.Current.UserIP; _commonEntity.LogMessages.Username = UserSession.Current.UserDspName; _commonEntity.LogMessages.Userid = UserSession.Current.UserAccount; CommonDBEntity commonDBEntity = new CommonDBEntity(); _appcontentEntity.APPContentDBEntity = new List<APPContentDBEntity>(); APPContentDBEntity appcontentDBEntity = new APPContentDBEntity(); #region //城市ID appcontentDBEntity.CityID = CityID; //酒店ID appcontentDBEntity.HotelID = hotelID; //酒店名称 appcontentDBEntity.HotelNM = HotelNM; //价格代码 appcontentDBEntity.PriceCode = PriceCode; //价格 appcontentDBEntity.TwoPrice = TwoPrice; //状态 开启 关闭 appcontentDBEntity.RoomStatus = Status; appcontentDBEntity.PlanStatus = Status; //房量 appcontentDBEntity.RoomCount = RoomCount; //是否是保留房 appcontentDBEntity.IsReserve = IsReserve; //房型名称 appcontentDBEntity.RoomName = RoomName; //房型Code appcontentDBEntity.RoomCode = RoomCode; //批量更新日期 开始 结束 appcontentDBEntity.StartDTime = StartDTime; appcontentDBEntity.EndDTime = EndDTime; //备注 appcontentDBEntity.Remark = Remark; //操作人 appcontentDBEntity.CreateUser = UserSession.Current.UserAccount; appcontentDBEntity.UpdateUser = UserSession.Current.UserAccount; appcontentDBEntity.WeekList = "1,2,3,4,5,6,7"; #endregion #region int DateDiff = calculateDateDiff(appcontentDBEntity.StartDTime, appcontentDBEntity.EndDTime); for (int j = 0; j <= DateDiff; j++) { appcontentDBEntity.PlanTime = DateTime.Parse(appcontentDBEntity.StartDTime).AddDays(j).ToShortDateString(); _appcontentEntity.APPContentDBEntity.Add(appcontentDBEntity); CommonBP.InsertConsultRoomHistory(_appcontentEntity); _appcontentEntity.APPContentDBEntity.Clear(); } _appcontentEntity.APPContentDBEntity.Add(appcontentDBEntity); _appcontentEntity = HotelInfoBP.RenewPlanFullRoomByUpdatePlan(_appcontentEntity); #endregion return "{\"d\":{\"message\":\"" + _appcontentEntity.ErrorMSG + "\",\"code\":" + _appcontentEntity.Result + "}}"; }
public void BingTodayLoginUser(string StartDate, string EndDate) { MasterInfoEntity _masterInfoEntity = new MasterInfoEntity(); CommonEntity _commonEntity = new CommonEntity(); _masterInfoEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _masterInfoEntity.LogMessages.Userid = UserSession.Current.UserAccount; _masterInfoEntity.LogMessages.Username = UserSession.Current.UserDspName; _masterInfoEntity.LogMessages.IpAddress = UserSession.Current.UserIP; _masterInfoEntity.MasterInfoDBEntity = new List<MasterInfoDBEntity>(); MasterInfoDBEntity msterInfoDBEntity = new MasterInfoDBEntity(); _masterInfoEntity.MasterInfoDBEntity.Add(msterInfoDBEntity); msterInfoDBEntity.RegistStart = StartDate; msterInfoDBEntity.RegistEnd = EndDate; DataSet dsTodayLoginResult = MasterInfoBP.CommonSelectTodayLoginUser(_masterInfoEntity).QueryResult; if (dsTodayLoginResult.Tables["TodayLoginUserData"].Rows.Count > 0) { lbYesterDate.Text = "(" + dsTodayLoginResult.Tables["TodayLoginUserData"].Rows[0]["StartDate"].ToString() + "--" + dsTodayLoginResult.Tables["TodayLoginUserData"].Rows[0]["EndDate"].ToString() + ")"; decimal decLogUserAll = 0; decimal decLogIOSUR = 0; decimal decLogANDUR = 0; decimal decLogWAPUR = 0; decimal decLogWP7UR = 0; decimal decLogW8UR = 0; decimal decLogOther = 0; foreach (DataRow drRow in dsTodayLoginResult.Tables["TodayLoginUserData"].Rows) { decLogUserAll = decLogUserAll + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString())); switch (drRow["use_code"].ToString().ToLower()) { case "ios": decLogIOSUR = decLogIOSUR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString())); break; case "lm_ios": decLogIOSUR = decLogIOSUR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString())); break; case "lm_android": decLogANDUR = decLogANDUR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString())); break; case "android": decLogANDUR = decLogANDUR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString())); break; case "wap": decLogWAPUR = decLogWAPUR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString())); break; case "wp": decLogWP7UR = decLogWP7UR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString())); break; case "w8": decLogW8UR = decLogW8UR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString())); break; default: decLogOther = decLogOther + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString())); break; } } lbTodayLoginAll.Text = decLogUserAll.ToString("#,##0"); lblLogIOSUR.Text = decLogIOSUR.ToString("#,##0"); lbLogANDUR.Text = decLogANDUR.ToString("#,##0"); lbLogWAPUR.Text = decLogWAPUR.ToString("#,##0"); lbLogWP7.Text = decLogWP7UR.ToString("#,##0"); lbLogW8.Text = decLogW8UR.ToString("#,##0"); lbLogOther.Text = decLogOther.ToString("#,##0"); } else { lbTodayLoginAll.Text = "0"; lblLogIOSUR.Text = "0"; lbLogANDUR.Text = "0"; lbLogWAPUR.Text = "0"; lbLogWP7.Text = "0"; lbLogW8.Text = "0"; lbLogOther.Text = "0"; } CommonSelectTodayLoginUserNew(StartDate, EndDate); }
private string GetCityByHotelID(string hotelId) { APPContentEntity _appcontentEntity = new APPContentEntity(); CommonEntity _commonEntity = new CommonEntity(); _appcontentEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _appcontentEntity.LogMessages.Userid = UserSession.Current.UserAccount; _appcontentEntity.LogMessages.Username = UserSession.Current.UserDspName; _appcontentEntity.LogMessages.IpAddress = UserSession.Current.UserIP; _appcontentEntity.APPContentDBEntity = new List<APPContentDBEntity>(); APPContentDBEntity appcontentDBEntity = new APPContentDBEntity(); appcontentDBEntity.HotelID = hotelId; _appcontentEntity.APPContentDBEntity.Add(appcontentDBEntity); DataSet dsResult = APPContentBP.SelectPropByPic(_appcontentEntity).QueryResult; return dsResult.Tables[0].Rows[0]["CITYID"].ToString(); }
public void GetResultData(string StartDate, string EndDate) { try { dsResult.Clear(); MasterInfoEntity _masterInfoEntity = new MasterInfoEntity(); CommonEntity _commonEntity = new CommonEntity(); _masterInfoEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _masterInfoEntity.LogMessages.Userid = UserSession.Current.UserAccount; _masterInfoEntity.LogMessages.Username = UserSession.Current.UserDspName; _masterInfoEntity.LogMessages.IpAddress = UserSession.Current.UserIP; _masterInfoEntity.MasterInfoDBEntity = new List<MasterInfoDBEntity>(); MasterInfoDBEntity msterInfoDBEntity = new MasterInfoDBEntity(); _masterInfoEntity.MasterInfoDBEntity.Add(msterInfoDBEntity); msterInfoDBEntity.RegistStart = StartDate; msterInfoDBEntity.RegistEnd = EndDate; dsResult = MasterInfoBP.CommonSelectOrderChannelData(_masterInfoEntity).QueryResult; } catch (Exception ex) { System.IO.File.AppendAllText("C:\\ConsultLog\\" + UserSession.Current.UserAccount + "-Default-Order-GetResultData.txt", "Default-Order异常信息:" + ex.Message.ToString(), System.Text.Encoding.GetEncoding("GB2312")); } }
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]; }
public void BindUser(string StartDate, string EndDate) { #region MasterInfoEntity _masterInfoEntity = new MasterInfoEntity(); CommonEntity _commonEntity = new CommonEntity(); _masterInfoEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _masterInfoEntity.LogMessages.Userid = UserSession.Current.UserAccount; _masterInfoEntity.LogMessages.Username = UserSession.Current.UserDspName; _masterInfoEntity.LogMessages.IpAddress = UserSession.Current.UserIP; _masterInfoEntity.MasterInfoDBEntity = new List<MasterInfoDBEntity>(); MasterInfoDBEntity msterInfoDBEntity = new MasterInfoDBEntity(); _masterInfoEntity.MasterInfoDBEntity.Add(msterInfoDBEntity); msterInfoDBEntity.RegistStart = StartDate; msterInfoDBEntity.RegistEnd = EndDate; DataSet dsDetailResult = MasterInfoBP.CommonSelectUser(_masterInfoEntity).QueryResult; if (dsDetailResult.Tables["UserCount"].Rows.Count > 0) { //if ("0".Equals(strToDay)) //{ // lbUserTitle.Text = "昨日用户简报"; // lbYesterDate.Text = "昨日(" + dsDetailResult.Tables["UserCount"].Rows[0]["YESTERDATE"].ToString() + ")"; //} //else //{ // lbUserTitle.Text = "今日用户简报"; // lbYesterDate.Text = "今日(" + dsDetailResult.Tables["UserCount"].Rows[0]["YESTERDATE"].ToString() + ")"; //} lbUserTitle.Text = "用户简报"; lbYesterDate.Text = dsDetailResult.Tables["UserCount"].Rows[0]["StartDate"].ToString() + "--" + dsDetailResult.Tables["UserCount"].Rows[0]["EndDate"].ToString(); decimal decUserAll = 0; decimal decIOSUR = 0; decimal decANDUR = 0; decimal decWAPUR = 0; decimal decWP7UR = 0; decimal decW8UR = 0; decimal decOther = 0; foreach (DataRow drRow in dsDetailResult.Tables["UserCount"].Rows) { decUserAll = decUserAll + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString())); switch (drRow["COLNMS"].ToString().ToLower()) { case "ios": decIOSUR = decIOSUR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString())); break; case "lm_ios": decIOSUR = decIOSUR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString())); break; case "lm_android": decANDUR = decANDUR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString())); break; case "android": decANDUR = decANDUR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString())); break; case "wap": decWAPUR = decWAPUR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString())); break; case "wp": decWP7UR = decWP7UR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString())); break; case "w8": decW8UR = decW8UR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString())); break; default: decOther = decOther + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString())); break; } } lbUserAll.Text = decUserAll.ToString("#,##0"); lbIOSUR.Text = decIOSUR.ToString("#,##0"); lbANDUR.Text = decANDUR.ToString("#,##0"); lbWAPUR.Text = decWAPUR.ToString("#,##0"); lbWP7.Text = decWP7UR.ToString("#,##0"); lbW8.Text = decW8UR.ToString("#,##0"); lbOther.Text = decOther.ToString("#,##0"); } else { //if ("0".Equals(strToDay)) //{ // lbUserTitle.Text = "昨日用户简报"; // lbYesterDate.Text = "昨日()"; //} //else //{ // lbUserTitle.Text = "今日用户简报"; // lbYesterDate.Text = "今日()"; //} lbUserTitle.Text = "用户简报"; lbYesterDate.Text = ""; lbUserAll.Text = "0"; lbIOSUR.Text = "0"; lbANDUR.Text = "0"; lbWAPUR.Text = "0"; lbWP7.Text = "0"; lbW8.Text = "0"; lbOther.Text = "0"; } #endregion BindUserNew(StartDate, EndDate); }
public static CruiseInfoEntity SaveCruisePlanList(CruiseInfoEntity cruiseInfoEntity) { CruiseInfoDBEntity dbParm = (cruiseInfoEntity.CruiseInfoDBEntity.Count > 0) ? cruiseInfoEntity.CruiseInfoDBEntity[0] : new CruiseInfoDBEntity(); if ("0".Equals(dbParm.Action)) { DataCommand cmd = DataCommandManager.GetDataCommand("CShipPlanInfo"); cmd.SetParameterValue("@BoatID", dbParm.BoatID); cmd.SetParameterValue("@PlanDT", dbParm.CreateStart); cmd.SetParameterValue("@PlanNum", dbParm.PlanNumer.TrimEnd(',')); cmd.SetParameterValue("@CUser", cruiseInfoEntity.LogMessages.Username); cmd.ExecuteNonQuery(); cruiseInfoEntity.CruiseInfoDBEntity[0].PlanID = cmd.GetParameterValue("@PlanID").ToString(); string[] strRooms = dbParm.PlanNumer.TrimEnd(',').Split(','); for (int i =0;i < strRooms.Count(); i++) { CommonEntity _commonEntity = new CommonEntity(); _commonEntity.LogMessages = cruiseInfoEntity.LogMessages; _commonEntity.CommonDBEntity = new List<CommonDBEntity>(); CommonDBEntity commonDBEntity = new CommonDBEntity(); commonDBEntity.Event_Type = "游轮库存-保存"; commonDBEntity.Event_ID = cruiseInfoEntity.CruiseInfoDBEntity[0].PlanID + "-" + i.ToString(); string conTent = "库存保存 - 初始化库存:{0}"; conTent = string.Format(conTent, strRooms[i].ToString()); commonDBEntity.Event_Content = conTent; _commonEntity.CommonDBEntity.Add(commonDBEntity); CommonDA.InsertEventHistory(_commonEntity); } } else { //DataCommand cmd = DataCommandManager.GetDataCommand("UCruisePlanInfo"); //cmd.SetParameterValue("@PlanID", dbParm.PlanID); //cmd.SetParameterValue("@PlanNumer", dbParm.PlanNumer); //cmd.SetParameterValue("@UUser", cruiseInfoEntity.LogMessages.Username); //cmd.ExecuteNonQuery(); } cruiseInfoEntity.Result = 1; return cruiseInfoEntity; }
/// <summary> /// 计划关房(批量操作 关闭计划) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> public void btnPlanCloseRoom(string remark, string status, bool isRenew) { DataTable dtPlanLMBAR2 = new DataTable(); DataTable dtPlanLMBAR = new DataTable(); string hotelId = this.HidPid.Value;//酒店ID string dateSE = this.HidMarkFullRoom.Value;//起止日期 #region APPContentEntity _appcontentEntity = new APPContentEntity(); _appcontentEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _appcontentEntity.LogMessages.Userid = UserSession.Current.UserAccount; _appcontentEntity.LogMessages.Username = UserSession.Current.UserDspName; _appcontentEntity.LogMessages.IpAddress = UserSession.Current.UserIP; CommonEntity _commonEntity = new CommonEntity(); _commonEntity.CommonDBEntity = new List<CommonDBEntity>(); _commonEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _commonEntity.LogMessages.IpAddress = UserSession.Current.UserIP; _commonEntity.LogMessages.Username = UserSession.Current.UserDspName; _commonEntity.LogMessages.Userid = UserSession.Current.UserAccount; CommonDBEntity commonDBEntity = new CommonDBEntity(); _appcontentEntity.APPContentDBEntity = new List<APPContentDBEntity>(); APPContentDBEntity appcontentDBEntity = new APPContentDBEntity(); bool IsFlag = false; if (!string.IsNullOrEmpty(dateSE)) { DataTable dtPlan = GetBindLmbarPlanList(this.planStartDate.Value, this.planEndDate.Value, this.HidPid.Value).Tables[0];//总计划 dtPlanLMBAR2 = dtPlan.Clone(); dtPlanLMBAR = dtPlan.Clone(); DataRow[] drPlanLMBAR2 = dtPlan.Select("RATECODE='LMBAR2'"); //LMBAR2计划 for (int i = 0; i < drPlanLMBAR2.Length; i++) { dtPlanLMBAR2.ImportRow(drPlanLMBAR2[i]); } DataRow[] drPlanLMBAR = dtPlan.Select("RATECODE='LMBAR'"); //LMBAR计划 for (int i = 0; i < drPlanLMBAR.Length; i++) { dtPlanLMBAR.ImportRow(drPlanLMBAR[i]); } string[] datas = dateSE.Split(','); for (int i = 0; i < datas.Length; i++) { if (!string.IsNullOrEmpty(datas[i].ToString())) { if (DateTime.Parse(datas[i].ToString()).ToShortDateString() == System.DateTime.Now.ToShortDateString()) { IsFlag = true; } string effDate = datas[i].ToString().Replace("/", "-"); #region for (int l = 0; l < this.HidLastHotelRoomListLMBAR2.Value.Split(',').Length; l++) { DataRow[] rowsLmbar2 = dtPlanLMBAR2.Select("EFFECTDATESTRING='" + DateTime.Parse(effDate).ToString("yyyy-MM-dd") + "' and ROOMTYPECODE='" + this.HidLastHotelRoomListLMBAR2.Value.Split(',')[l].ToString() + "'"); for (int j = 0; j < rowsLmbar2.Length; j++) { if (!string.IsNullOrEmpty(rowsLmbar2[j]["RoomNum"].ToString()) && rowsLmbar2[j]["RoomNum"].ToString().ToLower() != "null") { //城市ID appcontentDBEntity.CityID = this.HidCityID.Value; //酒店ID appcontentDBEntity.HotelID = hotelId; //酒店名称 appcontentDBEntity.HotelNM = this.HidPcode.Value; //PlanDate appcontentDBEntity.PlanTime = DateTime.Parse(effDate).ToShortDateString(); //价格代码 appcontentDBEntity.PriceCode = rowsLmbar2[j]["RATECODE"].ToString(); //价格 appcontentDBEntity.TwoPrice = rowsLmbar2[j]["TWOPRICE"].ToString(); //状态 开启 关闭 //appcontentDBEntity.PlanStatus = rowsLmbar2[j]["STATUS"].ToString(); appcontentDBEntity.PlanStatus = status == "" ? rowsLmbar2[j]["STATUS"].ToString() : status; appcontentDBEntity.RoomCount = rowsLmbar2[j]["ROOMNUM"].ToString(); appcontentDBEntity.IsReserve = rowsLmbar2[j]["ISRESERVE"].ToString(); //房型名称 appcontentDBEntity.RoomName = rowsLmbar2[j]["ROOMTYPENAME"].ToString(); //房型Code appcontentDBEntity.RoomCode = rowsLmbar2[j]["ROOMTYPECODE"].ToString(); appcontentDBEntity.WeekList = "1,2,3,4,5,6,7"; //备注 appcontentDBEntity.Remark = remark; //操作人 appcontentDBEntity.CreateUser = UserSession.Current.UserAccount; _appcontentEntity.APPContentDBEntity.Add(appcontentDBEntity); CommonBP.InsertConsultRoomHistory(_appcontentEntity); _appcontentEntity.APPContentDBEntity.Clear(); } } } #endregion #region for (int l = 0; l < this.HidLastHotelRoomListLMBAR.Value.Split(',').Length; l++) { DataRow[] rowsLmbar = dtPlanLMBAR.Select("EFFECTDATESTRING='" + DateTime.Parse(effDate).ToString("yyyy-MM-dd") + "' and ROOMTYPECODE='" + this.HidLastHotelRoomListLMBAR.Value.Split(',')[l].ToString() + "'"); for (int j = 0; j < rowsLmbar.Length; j++) { if (!string.IsNullOrEmpty(rowsLmbar[j]["ROOMNUM"].ToString()) && rowsLmbar[j]["RoomNum"].ToString().ToLower() != "null") { //城市ID appcontentDBEntity.CityID = this.HidCityID.Value; //酒店ID appcontentDBEntity.HotelID = hotelId; //酒店名称 appcontentDBEntity.HotelNM = this.HidPcode.Value; //PlanDate appcontentDBEntity.PlanTime = DateTime.Parse(effDate).ToShortDateString(); //价格代码 appcontentDBEntity.PriceCode = rowsLmbar[j]["RATECODE"].ToString(); //价格 appcontentDBEntity.TwoPrice = rowsLmbar[j]["TWOPRICE"].ToString(); //状态 开启 关闭 //appcontentDBEntity.PlanStatus = rowsLmbar[j]["STATUS"].ToString(); appcontentDBEntity.PlanStatus = status == "" ? rowsLmbar[j]["STATUS"].ToString() : status; appcontentDBEntity.RoomCount = rowsLmbar[j]["ROOMNUM"].ToString(); appcontentDBEntity.IsReserve = rowsLmbar[j]["ISRESERVE"].ToString(); //房型名称 appcontentDBEntity.RoomName = rowsLmbar[j]["ROOMTYPENAME"].ToString(); //房型Code appcontentDBEntity.RoomCode = rowsLmbar[j]["ROOMTYPECODE"].ToString(); appcontentDBEntity.WeekList = "1,2,3,4,5,6,7"; //备注 appcontentDBEntity.Remark = remark; //操作人 appcontentDBEntity.CreateUser = UserSession.Current.UserAccount; _appcontentEntity.APPContentDBEntity.Add(appcontentDBEntity); CommonBP.InsertConsultRoomHistory(_appcontentEntity); _appcontentEntity.APPContentDBEntity.Clear(); } } } #endregion if (isRenew) { appcontentDBEntity.HotelID = hotelId; appcontentDBEntity.StartDTime = effDate; appcontentDBEntity.EndDTime = effDate; appcontentDBEntity.Lmbar2RoomCode = this.HidLastHotelRoomListLMBAR2.Value; appcontentDBEntity.LmbarRoomCode = this.HidLastHotelRoomListLMBAR.Value; appcontentDBEntity.TypeID = status == "true" ? "3" : "2";// "2";//type:1 满房、2 关房、3 开房 appcontentDBEntity.UpdateUser = UserSession.Current.UserAccount; _appcontentEntity.APPContentDBEntity.Add(appcontentDBEntity); _appcontentEntity = HotelInfoBP.BatchUpdatePlan(_appcontentEntity); _appcontentEntity.APPContentDBEntity.Clear(); } } } } #endregion int SelectedIndex = int.Parse(this.HidSelIndex.Value); //ScriptManager.RegisterStartupScript(this.UpdatePanel4, this.GetType(), "keyclosebtn", "BtnCompleteStyle();", true); //ScriptManager.RegisterStartupScript(this.UpdatePanel4, this.GetType(), "clickbtnSingle", "ClickEvent('" + this.HidPcode.Value + "','" + this.HidPid.Value + "','" + SelectedIndex + "','" + this.HidCityID.Value + "','" + this.HidHotelEXLinkMan.Value + "','" + this.HidHotelEXLinkTel.Value + "','" + this.HidHotelEXLinkRemark.Value + "','false','true','false');", true); //ScriptManager.RegisterStartupScript(this.UpdatePanel4, this.GetType(), "scrollReset", "GetResultFromServer();", true); //ScriptManager.RegisterStartupScript(this.UpdatePanel11, this.GetType(), "keyclosebtn", "BtnCompleteStyle();", true); //btnSelect_Click(null, null); btnSingleHotel_Click(null, null); if (IsFlag) { if (DateTime.Now.Hour >= 18) { if (gridHotelList.Rows[SelectedIndex].BackColor != System.Drawing.ColorTranslator.FromHtml("#FF6666")) { gridHotelList.Rows[SelectedIndex].Cells[6].Text = "#FF6666"; gridHotelList.Rows[SelectedIndex].Cells[7].Text = "#CD5C5C"; this.operandNum.InnerText = (int.Parse(this.operandNum.InnerText) + 1).ToString(); gridHotelList.Rows[SelectedIndex].BackColor = System.Drawing.ColorTranslator.FromHtml("#FF6666"); ((System.Web.UI.WebControls.WebControl)((Label)gridHotelList.Rows[int.Parse(this.HidSelIndex.Value)].FindControl("Label1"))).BackColor = System.Drawing.ColorTranslator.FromHtml("#CD5C5C"); } } else { if (gridHotelList.Rows[SelectedIndex].BackColor != System.Drawing.ColorTranslator.FromHtml("#80c0a0")) { gridHotelList.Rows[SelectedIndex].Cells[6].Text = "#80c0a0"; gridHotelList.Rows[SelectedIndex].Cells[7].Text = "#70A88C"; this.operandNum.InnerText = (int.Parse(this.operandNum.InnerText) + 1).ToString(); gridHotelList.Rows[SelectedIndex].BackColor = System.Drawing.ColorTranslator.FromHtml("#80c0a0"); ((System.Web.UI.WebControls.WebControl)((Label)gridHotelList.Rows[int.Parse(this.HidSelIndex.Value)].FindControl("Label1"))).BackColor = System.Drawing.ColorTranslator.FromHtml("#70A88C"); } } } }
protected void btnGrantTicket_Click(object sender, EventArgs e) { try { if (!chkTicketPageDate()) { this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "key", "alert('该优惠券已过最迟领用日期,无法领用,请确认!');", true); return; } string strPackageCode = this.txtPackageCode.Value; string strRemainCount = this.lblRestCount.Text;//剩余可以生成的张数 int intRemainCount = 0; string fileExt = System.IO.Path.GetExtension(PhoneFlUpload.FileName); if (!String.IsNullOrEmpty(fileExt)) { string allowexts = (ConfigurationManager.AppSettings["AllowUploadFileType"] != null) ? ConfigurationManager.AppSettings["AllowUploadFileType"].ToString() : ""; //定义允许上传文件类型 if (allowexts == "") { allowexts = ".*xls|.*xlsx|.*txt"; } Regex allowext = new Regex(allowexts); if (!allowext.IsMatch(fileExt)) //检查文件大小及扩展名 { this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "key", "alert('选择文件类型不正确,请确认!');", true); return; } } string strPhoneNumber = this.txtPhoneNumber.Text.Replace(" ", "");//电话号码 strPhoneNumber = strPhoneNumber.Trim(','); strPhoneNumber = (strPhoneNumber.Length > 0) ? getFileData() + "," + strPhoneNumber : getFileData(); strPhoneNumber = CommonFunction.StringFilter(strPhoneNumber); strPhoneNumber = strPhoneNumber.Trim(','); string[] arrPhone = strPhoneNumber.Split(',');//用逗号进行分隔。 if (String.IsNullOrEmpty(strPhoneNumber) || arrPhone.Length == 0) { this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "key", "alert('请添加发送手机号码!');", true); return; } if (!string.IsNullOrEmpty(strRemainCount)) { intRemainCount = Convert.ToInt32(strRemainCount); } if (intRemainCount <= 0) { this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "key", "alert('" + PromptPackageHaveFinish + "');", true); return;//后面就不执行了 } if (intRemainCount < arrPhone.Length) { this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "key", "alert('" + PromptLeaveCount + "" + intRemainCount.ToString() + "" + PromptActualCreate + "" + arrPhone.Length.ToString() + "" + Count + "');", true); return;//后面就不执行了 } bool bCanUse = CanUse(strPackageCode); if (bCanUse == false) { this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "key", "alert('" + PromptTicketNotUse + "');", true); return;//后面就不执行了 } if (getTicketCount(strPackageCode) == false) { this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "key", "alert('" + PromptTicketCountMustOne + "');", true); return; } //string repeatPhone = string.Empty; CommonFunction comFun = new CommonFunction(); //bool bollMobileNum = true; //string strTempPhone = string.Empty; //for (int j = 0; j < arrPhone.Length; j++) //{ // strTempPhone = arrPhone[j]; // //bollMobileNum = comFun.IsMobileNumber(strTempPhone); // //if (bollMobileNum == false) // //{ // // break; // //} // int intFlag = 0; // for (int k = 0; k < arrPhone.Length; k++) // { // if (strTempPhone == arrPhone[k]) // { // intFlag += 1; // } // } // if (intFlag > 1) // { // repeatPhone = repeatPhone + strTempPhone + ","; // } //} //repeatPhone = repeatPhone.Trim(',').Trim(); ////判断有没有不合法的手机号 //if (bollMobileNum == false) //{ // this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "key", "alert('" + PromptPhoneFormatError + "" + strTempPhone + "!');", true); // return; //} ////判断有没有相同的号码 //if (!string.IsNullOrEmpty(repeatPhone)) //{ // this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "key", "alert('" + PromptHaveSamePhone + "" + repeatPhone + "!');", true); // return; //} //根据PackageCode查询ticketcode和该ticketcode的amount. string sqlTicket = "select * from T_LM_TICKET where PACKAGECODE=:PACKAGECODE"; OracleParameter[] parmPack = { new OracleParameter("PACKAGECODE", OracleType.VarChar) }; parmPack[0].Value = strPackageCode; DataTable dt = DbHelperOra.Query(sqlTicket, false, parmPack).Tables[0]; string ticketCode = dt.Rows[0]["TICKETCODE"].ToString(); string ticketAmt = dt.Rows[0]["TICKETAMT"].ToString(); List<CommandInfo> sqlList = new List<CommandInfo>(); StringBuilder sqlInsert = new StringBuilder(); //Oracle sql 语法 sqlInsert.AppendLine("INSERT INTO T_LM_TICKET_USER(ID,TICKETCODE,TICKETUSERCODE,STATUS,TICKETAMT,PACKAGECODE,FLAG,USERID,CREATETIME,UPDATETIME) VALUES ( "); sqlInsert.AppendLine("T_LM_TICKET_USER_SEQ.nextval,:TICKETCODE,:TICKETUSERCODE,:STATUS,:TICKETAMT,:PACKAGECODE,:FLAG,:USERID,sysdate,sysdate) "); int iCount = 0; int MaxLength = (String.IsNullOrEmpty(ConfigurationManager.AppSettings["MaxTicketLength"].ToString())) ? 1000 : int.Parse(ConfigurationManager.AppSettings["MaxTicketLength"].ToString()); for (int i = 0; i < arrPhone.Length; i++) { string strPhone = arrPhone[i]; //OracleParameter[] parm ={ // new OracleParameter("ID",OracleType.Int32), // new OracleParameter("TICKETCODE",OracleType.VarChar), // new OracleParameter("TICKETUSERCODE",OracleType.VarChar), // new OracleParameter("STATUS",OracleType.VarChar), // new OracleParameter("TICKETAMT",OracleType.Double), // new OracleParameter("PACKAGECODE",OracleType.VarChar), // new OracleParameter("FLAG",OracleType.Int32), // new OracleParameter("USERID",OracleType.VarChar) // }; ////ComFun comFun = new ComFun(); //parm[0].Value = comFun.getMaxIDfromSeq("T_LM_TICKET_USER_SEQ");//ID值 OracleParameter[] parm ={ new OracleParameter("TICKETCODE",OracleType.VarChar), new OracleParameter("TICKETUSERCODE",OracleType.VarChar), new OracleParameter("STATUS",OracleType.VarChar), new OracleParameter("TICKETAMT",OracleType.Double), new OracleParameter("PACKAGECODE",OracleType.VarChar), new OracleParameter("FLAG",OracleType.Int32), new OracleParameter("USERID",OracleType.VarChar) }; parm[0].Value = ticketCode; string strTicketUserCode = getTicketCode_New(13);// getTicketCode(13); if (strTicketUserCode == "") { this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "key", "alert('" + PromptCodeHaveFinish + "');", true); return; } parm[1].Value = strTicketUserCode; parm[2].Value = "0"; parm[3].Value = Convert.ToDouble(ticketAmt); parm[4].Value = strPackageCode; parm[5].Value = 2;//表示手动送券 parm[6].Value = strPhone;//表示手动送券 iCount = iCount + 1; CommandInfo cminfo = new CommandInfo(); cminfo.CommandText = sqlInsert.ToString(); cminfo.Parameters = parm; sqlList.Add(cminfo); try { if (iCount == MaxLength) { DbHelperOra.ExecuteSqlTran(sqlList); sqlList = new List<CommandInfo>(); iCount = 0; } //DbHelperOra.ExecuteSql(sqlInsert.ToString(), parm); //this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "key", "alert('" + PromptTicketSuccess + "');", true); //this.txtPhoneNumber.Text = ""; } catch { this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "key", "alert('" + PromptTicketFaild + "');", true); } } try { if (iCount > 0) { DbHelperOra.ExecuteSqlTran(sqlList); } //DbHelperOra.ExecuteSql(sqlInsert.ToString(), parm); this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "key", "alert('" + PromptTicketSuccess + "');", true); this.txtPhoneNumber.Text = ""; CommonEntity _commonEntity = new CommonEntity(); _commonEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _commonEntity.LogMessages.Userid = UserSession.Current.UserAccount; _commonEntity.LogMessages.Username = UserSession.Current.UserDspName; _commonEntity.LogMessages.IpAddress = UserSession.Current.UserIP; _commonEntity.CommonDBEntity = new List<CommonDBEntity>(); CommonDBEntity commonDBEntity = new CommonDBEntity(); commonDBEntity.Event_Type = "发券给指定的用户-保存"; commonDBEntity.Event_ID = strPackageCode; commonDBEntity.Event_Content = String.Format("发券给指定的用户-保存:优惠券包:{0},发送总数:{1},操作人:{2}", strPackageCode, arrPhone.Length, _commonEntity.LogMessages.Userid); commonDBEntity.Event_Result = PromptTicketSuccess; _commonEntity.CommonDBEntity.Add(commonDBEntity); CommonBP.InsertEventHistory(_commonEntity); } catch { this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "key", "alert('" + PromptTicketFaild + "');", true); } } catch { this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "key", "alert('" + PromptTicketFaild + "');", true); } //执行后需要修改页面中的剩余可以生产券的张数 btnSearchRest_Click(null, null); }
//导出Excel文件 protected void btnExport_Click(object sender, EventArgs e) { if (gridViewCSReviewLmSystemLogList.Rows.Count == 0) { messageContent.InnerHtml = GetLocalResourceObject("RowsEmptyMessage").ToString(); return; } LmSystemLogEntity _lmSystemLogEntity = new LmSystemLogEntity(); CommonEntity _commonEntity = new CommonEntity(); _lmSystemLogEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _lmSystemLogEntity.LogMessages.Userid = UserSession.Current.UserAccount; _lmSystemLogEntity.LogMessages.Username = UserSession.Current.UserDspName; _lmSystemLogEntity.LogMessages.IpAddress = UserSession.Current.UserIP; chartData = "["; chartName = "["; DateTime dateTemp; for (int i = 0; i < gridViewCSReviewLmSystemLogList.Rows.Count; i++) { _lmSystemLogEntity.FogOrderID = gridViewCSReviewLmSystemLogList.Rows[i].Cells[2].Text.ToString().Trim().Replace("amp;", "").Replace(" ", ""); _lmSystemLogEntity.Mobile = gridViewCSReviewLmSystemLogList.Rows[i].Cells[3].Text.ToString().Trim().Replace("amp;", "").Replace(" ", ""); _lmSystemLogEntity.CityID = gridViewCSReviewLmSystemLogList.Rows[i].Cells[4].Text.ToString().Trim().Replace("amp;", "").Replace(" ", ""); _lmSystemLogEntity.HotelID = gridViewCSReviewLmSystemLogList.Rows[i].Cells[5].Text.ToString().Trim().Replace("amp;", "").Replace(" ", ""); _lmSystemLogEntity.StartDTime = gridViewCSReviewLmSystemLogList.Rows[i].Cells[6].Text.ToString().Trim().Replace("amp;", "").Replace(" ", ""); _lmSystemLogEntity.EndDTime = gridViewCSReviewLmSystemLogList.Rows[i].Cells[7].Text.ToString().Trim().Replace("amp;", "").Replace(" ", ""); _lmSystemLogEntity.InStart = gridViewCSReviewLmSystemLogList.Rows[i].Cells[8].Text.ToString().Trim().Replace("amp;", "").Replace(" ", ""); _lmSystemLogEntity.InEnd = gridViewCSReviewLmSystemLogList.Rows[i].Cells[9].Text.ToString().Trim().Replace("amp;", "").Replace(" ", ""); _lmSystemLogEntity.PayCode = gridViewCSReviewLmSystemLogList.Rows[i].Cells[10].Text.ToString().Trim().Replace("amp;", "").Replace(" ", ""); _lmSystemLogEntity.BookStatus = gridViewCSReviewLmSystemLogList.Rows[i].Cells[11].Text.ToString().Trim().Replace("amp;", "").Replace(" ", ""); _lmSystemLogEntity.HotelComfirm = gridViewCSReviewLmSystemLogList.Rows[i].Cells[12].Text.ToString().Trim().Replace("amp;", "").Replace(" ", ""); _lmSystemLogEntity.PayStatus = gridViewCSReviewLmSystemLogList.Rows[i].Cells[13].Text.ToString().Trim().Replace("amp;", "").Replace(" ", ""); _lmSystemLogEntity.Aprove = gridViewCSReviewLmSystemLogList.Rows[i].Cells[14].Text.ToString().Trim().Replace("amp;", "").Replace(" ", ""); _lmSystemLogEntity.Ticket = gridViewCSReviewLmSystemLogList.Rows[i].Cells[15].Text.ToString().Trim().Replace("amp;", "").Replace(" ", ""); _lmSystemLogEntity.PlatForm = gridViewCSReviewLmSystemLogList.Rows[i].Cells[16].Text.ToString().Trim().Replace("amp;", "").Replace(" ", ""); _lmSystemLogEntity.ShowType = ddpTimeSpace.SelectedValue.Trim(); chartName = chartName + "'" + gridViewCSReviewLmSystemLogList.Rows[i].Cells[1].Text.ToString().Trim().Replace("amp;", "").Replace(" ", "") + "',"; StringBuilder sb = new StringBuilder(); string temp = string.Empty; DataSet dsResult = LmSystemLogBP.ChartExportLmOrderSelect(_lmSystemLogEntity).QueryResult; if (dsResult.Tables.Count == 0 || dsResult.Tables[0].Rows.Count == 0) { dateTemp = DateTime.Parse(_lmSystemLogEntity.StartDTime); if (double.Parse(_lmSystemLogEntity.ShowType) > 1) { chartData = chartData + "[['" + dateTemp.ToShortDateString() + "', 0]],"; } else { chartData = chartData + "[['" + dateTemp.ToString() + "', 0]],"; } continue; } foreach (DataRow drRow in dsResult.Tables[0].Rows) { temp = "['" + drRow["Date"].ToString() + "'," + drRow["Volume"].ToString() + "]"; sb.Append(temp); sb.Append(','); } chartData = chartData + "["+ sb.ToString().Trim(',') + "],"; } chartData = chartData.Trim(',') + "]"; chartName = chartName.Trim(',') + "]"; if (double.Parse(_lmSystemLogEntity.ShowType) > 1) { hidFormatString.Value = "%#m/%#d/%y"; } else { hidFormatString.Value = "%Y/%#m/%#d %H:%M:%S"; } //dvBtnUpdate.Style.Add("display", "none"); this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "key", "DrawingLines();", true); }
protected void btnDivRenewPlan_Click(object sender, EventArgs e) { string EffectDate = this.HiddenEffectDate.Value; APPContentEntity _appcontentEntity = new APPContentEntity(); _appcontentEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _appcontentEntity.LogMessages.Userid = UserSession.Current.UserAccount; _appcontentEntity.LogMessages.Username = UserSession.Current.UserDspName; _appcontentEntity.LogMessages.IpAddress = UserSession.Current.UserIP; CommonEntity _commonEntity = new CommonEntity(); _commonEntity.CommonDBEntity = new List<CommonDBEntity>(); _commonEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _commonEntity.LogMessages.IpAddress = UserSession.Current.UserIP; _commonEntity.LogMessages.Username = UserSession.Current.UserDspName; _commonEntity.LogMessages.Userid = UserSession.Current.UserAccount; CommonDBEntity commonDBEntity = new CommonDBEntity(); commonDBEntity.Event_Type = "酒店管理-房控计划单个维护"; commonDBEntity.Event_ID = ViewState["hotelID"].ToString(); commonDBEntity.IpAddress = UserSession.Current.UserIP; commonDBEntity.UserID = UserSession.Current.UserAccount; commonDBEntity.UserName = UserSession.Current.UserDspName; _appcontentEntity.APPContentDBEntity = new List<APPContentDBEntity>(); APPContentDBEntity appcontentDBEntity = new APPContentDBEntity(); appcontentDBEntity.HotelID = ViewState["hotelID"].ToString(); appcontentDBEntity.PriceCode = this.HiddenPriceCode.Value;//价格代码 appcontentDBEntity.RoomName = this.HiddenRoomType.Value;//房型名称 appcontentDBEntity.RoomCode = this.HiddenRoomCode.Value; appcontentDBEntity.RoomStatus = this.dropDivStatusOpen.Checked == true ? "true" : "false";//this.dropDivStatus.SelectedValue; if (this.dropDivStatusOpen.Checked) { appcontentDBEntity.RoomCount = this.txtDivRoomCount.Text; appcontentDBEntity.IsReserve = this.ckDivReserve.Checked == true ? "0" : "1"; } appcontentDBEntity.WeekList = "1,2,3,4,5,6,7"; appcontentDBEntity.StartDTime = this.HiddenEffectDate.Value; appcontentDBEntity.EndDTime = this.HiddenEffectDate.Value; appcontentDBEntity.UpdateUser = UserSession.Current.UserDspName; commonDBEntity.Event_Content = "房控计划单个更新 - 酒店ID:" + ViewState["hotelID"].ToString() + " 价格代码:" + appcontentDBEntity.PriceCode + " 房型Code:" + appcontentDBEntity.RoomCode + " 计划开始生效时间:" + appcontentDBEntity.StartDTime + " 计划结束生效时间:" + appcontentDBEntity.EndDTime + " 计划状态:" + appcontentDBEntity.RoomStatus; commonDBEntity.Event_Result = "已提交"; _commonEntity.CommonDBEntity.Add(commonDBEntity); CommonBP.InsertEventHistory(_commonEntity); _appcontentEntity.APPContentDBEntity.Add(appcontentDBEntity); _appcontentEntity = HotelInfoBP.RenewPlanFullRoom(_appcontentEntity); BindData(); }