protected void Page_Load(object sender, EventArgs e) { hotelid = MyCommFun.RequestInt("hotelid"); openid = MyCommFun.QueryString("openid"); dingdanid = MyCommFun.QueryString("dingdanid"); roomid = MyCommFun.RequestInt("roomid"); if (!IsPostBack) { BLL.wx_hotels_info infobll = new BLL.wx_hotels_info(); Model.wx_hotels_info info = new Model.wx_hotels_info(); info = infobll.GetModel(hotelid); image = info.topPic; BLL.wx_hotel_dingdan dingdanbll = new BLL.wx_hotel_dingdan(); DataSet dr = dingdanbll.GetList(openid, hotelid); if (dr.Tables[0].Rows.Count > 0) { numdingdan = dr.Tables[0].Rows.Count; } else { numdingdan = 0; } this.dingdanidnum.Value = dingdanid; getdingdan(dingdanid); } }
protected void Page_Load(object sender, EventArgs e) { hotelid = MyCommFun.RequestInt("hotelid"); openid = MyCommFun.QueryString("openid"); if (!Page.IsPostBack) { BLL.wx_hotel_dingdan dingdanbll = new BLL.wx_hotel_dingdan(); DataSet dr = dingdanbll.GetList(openid, hotelid); if (dr.Tables[0].Rows.Count > 0) { dingdannum = dr.Tables[0].Rows.Count; numdingdan = " <ul class=\"round\">"; numdingdan += "<li><a href=\"hotel_order.aspx?openid=" + openid + "&hotelid=" + hotelid + "\"> "; numdingdan += "<span>我的订单<em class=\"ok\">" + dr.Tables[0].Rows.Count + "</em></span></a></li>"; numdingdan += " </ul>"; } else { numdingdan = ""; } if (hotelid != 0) { hoteList(hotelid); } } }
private void RptBind(string _strWhere, string _orderby) { Model.wx_userweixin weixin = GetWeiXinCode(); //判断是否已经设置了微留言基本信息 BLL.wx_hotel_dingdan sbll = new BLL.wx_hotel_dingdan(); _strWhere = " hotelid=" + hotelid + " " + _strWhere; this.page = MXRequest.GetQueryInt("page", 1); txtKeywords.Text = this.keywords; DataSet ds = gbll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount); // DataSet ds = gbll.GetList( _strWhere); if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { DataRow dr; int count = ds.Tables[0].Rows.Count; for (int i = 0; i < count; i++) { dr = ds.Tables[0].Rows[i]; if (dr["orderStatus"].ToString() == "0") { dr["payStatusStr"] = "未处理"; } else if (dr["orderStatus"].ToString() == "1") { dr["payStatusStr"] = "已确认"; } else { dr["payStatusStr"] = "已拒绝"; } } ds.AcceptChanges(); } this.rptList.DataSource = ds; this.rptList.DataBind(); //绑定页码 txtPageNum.Text = this.pageSize.ToString(); string pageUrl = Utils.CombUrlTxt("hotel_list.aspx", "keywords={0}&page={1}", this.keywords, "__id__"); PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8); }
protected void Page_Load(object sender, EventArgs e) { hotelid = MyCommFun.RequestInt("hotelid"); openid = MyCommFun.QueryString("openid"); if (!this.Page.IsPostBack) { BLL.wx_hotel_dingdan dingdanbll = new BLL.wx_hotel_dingdan(); DataSet dr = dingdanbll.GetList(openid, hotelid); if (dr.Tables[0].Rows.Count > 0) { numdingdan = dr.Tables[0].Rows.Count; } else { numdingdan = 0; } List(hotelid); } }
public void List(string openid, int hotelid) { DataSet dr = dingdanbll.GetList(openid, hotelid); if (dr.Tables[0].Rows.Count > 0) { order += " <ul class=\"round\"> "; for (int i = 0; i < dr.Tables[0].Rows.Count; i++) { if (dr.Tables[0].Rows[i]["orderStatus"].ToString() == "0") { order += "<li class=\"title\"><a href=\"hotel_order_edite.aspx?dingdanid=" + dr.Tables[0].Rows[i]["id"].ToString() + "&hotelid=" + hotelid + "&roomid=" + roomid + "&openid=" + openid + "\"><span>" + dr.Tables[0].Rows[i]["createDate"].ToString() + "订单详情";//05月29日 9时39分 } else { order += "<li class=\"title\"><a href=\"hotel_order_xianshi.aspx?dingdanid=" + dr.Tables[0].Rows[i]["id"].ToString() + "&hotelid=" + hotelid + "&roomid=" + roomid + "&openid=" + openid + "\"><span>" + dr.Tables[0].Rows[i]["createDate"].ToString() + "订单详情";//05月29日 9时39分 } if (dr.Tables[0].Rows[i]["orderStatus"].ToString() == "1") { order += "<em class=\"ok\">成功</em></span>"; } else if (dr.Tables[0].Rows[i]["orderStatus"].ToString() == "0") { order += "<em class=\"no\">未处理</em></span>"; } else if (dr.Tables[0].Rows[i]["orderStatus"].ToString() == "2") { order += "<em class=\"error\">失败</em></span>"; } order += "</a></li><li><div class=\"text\"><p>预约商家:" + dr.Tables[0].Rows[i]["hotelName"].ToString() + "</p>"; order += "<p>类型:" + dr.Tables[0].Rows[i]["roomType"].ToString() + "</p><p>预订数量:" + dr.Tables[0].Rows[i]["orderNum"].ToString() + "间</p>"; order += "<p>预定日期:" + dr.Tables[0].Rows[i]["orderTime"].ToString() + "</p></div></li>"; } order += " </ul> "; } }
protected void Page_Load(object sender, EventArgs e) { hotelid = MyCommFun.RequestInt("hotelid"); openid = MyCommFun.QueryString("openid"); roomid = MyCommFun.RequestInt("roomid"); if (!Page.IsPostBack) { SetUserLastInfo(openid); DataSet dr = dingdanbll.GetList(openid, hotelid); if (dr.Tables[0].Rows.Count > 0) { numdingdan = dr.Tables[0].Rows.Count; } else { numdingdan = 0; } list(roomid, hotelid); } }
protected void Page_Load(object sender, EventArgs e) { hotelid = MyCommFun.RequestInt("hotelid"); wid = MyCommFun.RequestInt("wid"); openid = MyCommFun.QueryString("openid"); string thisUrl = MyCommFun.getWebSite() + "/weixin/KNSHotel/index.aspx" + Request.Url.Query; var bll = new BLL.wx_userweixin(); this.wid = MyCommFun.RequestWid(); Model.wx_userweixin uWeiXinModel = bll.GetModel(wid); OAuth2BaseProc(uWeiXinModel, "index", thisUrl); if (!Page.IsPostBack) { BLL.wx_hotel_dingdan dingdanbll = new BLL.wx_hotel_dingdan(); DataSet dr = dingdanbll.GetList(openid, hotelid); if (dr.Tables[0].Rows.Count > 0) { dingdannum = dr.Tables[0].Rows.Count; numdingdan = " <ul class=\"round\">"; numdingdan += "<li><a href=\"hotel_order.aspx?openid=" + openid + "&hotelid=" + hotelid + "\"> "; numdingdan += "<span>我的订单<em class=\"ok\">" + dr.Tables[0].Rows.Count + "</em></span></a></li>"; numdingdan += " </ul>"; } else { numdingdan = ""; } if (hotelid != 0) { hoteList(hotelid); } } }
protected void Page_Load(object sender, EventArgs e) { hotelid = MyCommFun.RequestInt("hotelid"); openid = MyCommFun.QueryString("openid"); this.title = this.GetTitle(); string thisUrl = MyCommFun.getWebSite() + "/weixin/KNSHotel/index.aspx" + Request.Url.Query; var bll = new BLL.wx_userweixin(); this.wid = MyCommFun.RequestWid(); Model.wx_userweixin uWeiXinModel = bll.GetModel(wid); OAuth2BaseProc(uWeiXinModel, "index", thisUrl); if (!Page.IsPostBack) { if (!string.IsNullOrEmpty(this.openid) && this.hotelid > 0) { var dingdanbll = new BLL.wx_hotel_dingdan(); var hotelInfo = new BLL.wx_hotels_info().GetModel(this.hotelid); if (hotelInfo != null) { this.wid = hotelInfo.wid.Value; } DataSet dr = dingdanbll.GetList(this.openid, this.hotelid); if (dr.Tables[0].Rows.Count > 0) { this.dingdannum = dr.Tables[0].Rows.Count; } else { this.dingdannum = 0; } } } }
/// <summary> /// 获取查询结果 /// </summary> /// <param name="hotelid"></param> /// <param name="_strWhere"></param> /// <param name="_orderby"></param> /// <returns></returns> private DataSet GetQueryData() { var hotelService = new HotelService(); var bllhotel = new BLL.wx_hotels_info(); var hotel = bllhotel.GetModel(hotelid); this.page = MXRequest.GetQueryInt("page", 1); // txtKeywords.Text = this.keywords; DataSet ds = gbll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount); if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { ds.Tables[0].Columns.Add("isRefund", typeof(System.String)); ds.Tables[0].Columns.Add("hotelName", typeof(System.String)); ds.Tables[0].Columns.Add("totalPrice", typeof(System.Decimal)); ds.Tables[0].Columns.Add("statusName", typeof(System.String)); ds.Tables[0].Columns.Add("strisRefund", typeof(System.String)); DataRow dr; int count = ds.Tables[0].Rows.Count; for (int i = 0; i < count; i++) { dr = ds.Tables[0].Rows[i]; int id = dr.Field <int>("id"); int hotelId = dr.Field <int>("hotelId"); var status = HotelStatusManager.OrderStatus.GetStatusDict( MyCommFun.Obj2Int(dr["orderStatus"])); dr["payStatusStr"] = "<em style='width:70px;' class='status " + status.CssClass + "'>" + status.StatusName + "</em>"; dr["statusName"] = status.StatusName; if (status.StatusId == HotelStatusManager.OrderStatus.Refunding.StatusId || status.StatusId == HotelStatusManager.OrderStatus.Refunded.StatusId) { dr["isRefund"] = "<em style='width:70px;' class='status ok'>是</em>"; dr["strisRefund"] = "是"; } else if (status.StatusId == HotelStatusManager.OrderStatus.Completed.StatusId) { var tuidanDto = hotelService.GetModel(id, hotelId); if (tuidanDto != null) { dr["isRefund"] = "<em style='width:70px;' class='status ok'>是</em>"; dr["strisRefund"] = "是"; } else { dr["isRefund"] = "<em style='width:70px;' class='status no'>否</em>"; dr["strisRefund"] = "否"; } } else { dr["isRefund"] = "<em style='width:70px;' class='status no'>否</em>"; dr["strisRefund"] = "否"; } dr["hotelName"] = hotel.hotelName; //总花费 var dateSpan = dr.Field <DateTime>("leaveTime") - dr.Field <DateTime>("arriveTime"); var totalPrice = MyCommFun.Str2Decimal(dr["price"].ToString()) * dr.Field <int>("orderNum") * dateSpan.Days; dr["totalPrice"] = totalPrice; } ds.AcceptChanges(); } return(ds); }
public void List(string openid, int hotelid) { DataSet dr = dingdanbll.GetList(openid, hotelid); if (dr.Tables[0].Rows.Count > 0) { order += " <ul class=\"round\"> "; for (int i = 0; i < dr.Tables[0].Rows.Count; i++) { var time = DateTime.Parse(dr.Tables[0].Rows[i]["orderTime"].ToString()); var orderTime = string.Format("{0:yyyy/MM/dd HH:mm}", time); var arriveTime = string.Format("{0:yyyy/MM/dd HH:mm}", DateTime.Parse(dr.Tables[0].Rows[i]["arriveTime"].ToString())); var alink = string.Empty; order += "<li class=\"title\">"; if (dr.Tables[0].Rows[i]["orderStatus"].ToString() == "0") { alink = "<a href=\"hotel_order_edite.aspx?dingdanid=" + dr.Tables[0].Rows[i]["id"].ToString() + "&hotelid=" + hotelid + "&roomid=" + roomid + "&openid=" + openid + "\">"; } else { alink = "<a href=\"hotel_order_xianshi.aspx?dingdanid=" + dr.Tables[0].Rows[i]["id"].ToString() + "&hotelid=" + hotelid + "&roomid=" + roomid + "&openid=" + openid + "\">"; } order += alink; order += "<span><b>" + orderTime + "</b>" + "<b style='margin-left:0.5rem'>" + dr.Tables[0].Rows[i]["hotelName"].ToString() + "</b>";//05月29日 9时39分 var orderStatus = dr.Tables[0].Rows[i].Field <int>("orderStatus"); var status = HotelStatusManager.OrderStatus.GetStatusDict(orderStatus); order += "<em class=\"" + status.CssClass + "\">" + status.StatusName + "</em></span>"; // if (dr.Tables[0].Rows[i]["orderStatus"].ToString() == "0") // { // order += "<li class=\"title\"><a href=\"hotel_order_edite.aspx?dingdanid=" + dr.Tables[0].Rows[i]["id"].ToString() + "&hotelid=" + hotelid + "&roomid=" + roomid + "&openid=" + openid + "\"><span>" + dr.Tables[0].Rows[i]["createDate"].ToString() + "订单详情";//05月29日 9时39分 // } // else // { // order += "<li class=\"title\"><a href=\"hotel_order_xianshi.aspx?dingdanid=" + dr.Tables[0].Rows[i]["id"].ToString() + "&hotelid=" + hotelid + "&roomid=" + roomid + "&openid=" + openid + "\"><span>" + dr.Tables[0].Rows[i]["createDate"].ToString() + "订单详情";//05月29日 9时39分 // } // // // if(dr.Tables[0].Rows[i]["orderStatus"].ToString()=="1") // { // order += "<em class=\"ok\">成功</em></span>"; // // } // else if (dr.Tables[0].Rows[i]["orderStatus"].ToString() == "0") // { // order += "<em class=\"no\">未处理</em></span>"; // } // else if (dr.Tables[0].Rows[i]["orderStatus"].ToString() == "2") // { // order += "<em class=\"error\">失败</em></span>"; // } // order += "</a></li><li><div class=\"text\"><p>预约商家:" + dr.Tables[0].Rows[i]["hotelName"].ToString() + "</p>"; // order += "<p>类型:" + dr.Tables[0].Rows[i]["roomType"].ToString() + "</p><p>预订数量:" + dr.Tables[0].Rows[i]["orderNum"].ToString() + "间</p>"; // order += "<p>预定日期:" + dr.Tables[0].Rows[i]["orderTime"].ToString() + "</p></div></li>"; order += "</a></li>"; order += "<li>" + alink + "<div class=\"text\">"; order += "<p>订单编号:" + dr.Tables[0].Rows[i]["OrderNumber"].ToString() + "</p>"; order += "<p>预约商家:" + dr.Tables[0].Rows[i]["hotelName"].ToString() + "</p>"; order += "<p>类型:" + dr.Tables[0].Rows[i]["roomType"].ToString() + "</p>"; order += "<p>数量:" + dr.Tables[0].Rows[i]["orderNum"].ToString() + "间</p>"; order += "<p>付款:" + GetPrice(dr.Tables[0].Rows[i]) + "元</p>"; order += "<p>到店日期:" + arriveTime + "</p>"; order += "</div></a></li>"; } order += " </ul> "; } }