Exemplo n.º 1
0
        private void ShowInfo(int id)
        {
            Model.wx_hotels_info model = bll.GetModel(id);

            lblHotelCode.Text           = model.HotelCode;
            txtHotelName.Text           = model.hotelName;
            ddlHotelLevel.SelectedValue = model.HotelLevel;
            txtOperator.Text            = model.Operator;
            txtTel.Text   = model.hotelPhone;
            txtEmail.Text = model.noticeEmail;

            rblRecommend.SelectedValue = model.Recommend.HasValue && model.Recommend.Value ? "1" : "0";
        }
Exemplo n.º 2
0
        /// <summary>
        /// 取得当前微信帐号信息
        /// </summary>
        public Model.wx_userweixin GetWeiXinCode()
        {
            if (IsWeiXinCode())
            {
                Model.wx_userweixin model = Session["nowweixin"] as Model.wx_userweixin;
                if (model != null)
                {
                    return(model);
                }
            }
            else
            {
                int shopid = GetShopId();
                if (shopid != 0)
                {
                    BLL.wx_diancai_shopinfo   shopBll = new BLL.wx_diancai_shopinfo();
                    Model.wx_diancai_shopinfo shop    = shopBll.GetModel(shopid);

                    return(new BLL.wx_userweixin().GetModel(shop.wid.Value));
                }

                int hotelid = GetHotelId();
                if (hotelid != 0)
                {
                    BLL.wx_hotels_info   hotelBll = new BLL.wx_hotels_info();
                    Model.wx_hotels_info hotel    = hotelBll.GetModel(hotelid);

                    return(new BLL.wx_userweixin().GetModel(hotel.wid.Value));
                }
                Response.Write("<script>parent.location.href='http://" + HttpContext.Current.Request.Url.Authority + "/admin/weixin/myweixinlist.aspx'</script>");
                Response.End();
            }
            return(null);
        }
Exemplo n.º 3
0
        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);
            }
        }
Exemplo n.º 4
0
        public void List(int hotelid)
        {
            hotel = hotelbll.GetModel(hotelid);
            if (hotel != null)
            {
                address = hotel.hotelAddress;
                xplace  = hotel.xplace.ToString();
                yplace  = hotel.yplace.ToString();
                tel     = hotel.hotelPhone;
                jieshao = hotel.hotelIntroduct;

                DataSet dr = picbll.GetList(hotelid);
                if (dr.Tables[0].Rows.Count > 0)
                {
                    int j = 0;
                    for (int i = 0; i < dr.Tables[0].Rows.Count; i++)
                    {
                        tupian += "<li><p>" + dr.Tables[0].Rows[i]["title"].ToString() + "</p>  ";
                        if (dr.Tables[0].Rows[i]["picTiaozhuan"].ToString() != "")
                        {
                            tupian += " <a href=\"" + dr.Tables[0].Rows[i]["picTiaozhuan"].ToString() + "\">";
                        }
                        else
                        {
                            tupian += " <a href=\"#\">";
                        }
                        tupian += "  <img class='header-img' src=\"" + dr.Tables[0].Rows[i]["picUrl"].ToString() + "\"></a></li>";

                        j     += 1;
                        tabid += "<li   >" + j.ToString() + "</li>";
                    }
                }
            }
        }
Exemplo n.º 5
0
        public void list(int roomid, int hotelid)
        {
            room  = roombll.GetModel(roomid);
            hotel = hotelbll.GetModel(hotelid);
            if (hotel != null)
            {
                tel = hotel.hotelPhone;
            }
            if (room != null)
            {
                roomtype = room.roomType;
                this.roomtypenum.Value = roomtype;
                yuanjia = room.roomPrice.ToString();
                xianjia = room.salePrice.ToString();
                price3  = Convert.ToDecimal(yuanjia) - Convert.ToDecimal(xianjia);
                peitao  = room.facilities;
                this.yuanjianum.Value = yuanjia;
                this.pricenum.Value   = xianjia;
                this.price3num.Value  = price3.ToString();
            }
            DataSet dr = picbll.GetList(roomid);

            if (dr.Tables[0].Rows.Count > 0)
            {
                int j = 0;
                for (int i = 0; i < dr.Tables[0].Rows.Count; i++)
                {
                    tupian += "  <li><p>" + dr.Tables[0].Rows[i]["title"].ToString() + "</p><a href=\"" + dr.Tables[0].Rows[i]["roomPictz"].ToString() + "\"><img src=\"" + dr.Tables[0].Rows[i]["roomPic"].ToString() + "\"></a></li>";
                    j      += 1;
                    tabid  += "<li >" + j.ToString() + "</li>";
                }
            }
        }
Exemplo n.º 6
0
        public void ShowInfo(int hotelid)
        {
            Model.wx_hotels_info hotel = hotelBll.GetModel(hotelid);
            if (hotel != null)
            {
                this.lblHotelCode.Text    = hotel.HotelCode;
                this.lblHotelName.Text    = hotel.hotelName;
                this.lblOperator.Text     = hotel.Operator;
                this.hotelAddress.Text    = hotel.hotelAddress;
                this.lblHotelPhone.Text   = hotel.hotelPhone;
                this.mobilPhone.Text      = hotel.mobilPhone;
                this.coverPic.Text        = hotel.coverPic;
                this.topPic.Text          = hotel.topPic;
                this.hotelIntroduct.Value = hotel.hotelIntroduct;
                this.txtLatXPoint.Text    = hotel.xplace.ToString();
                this.txtLngYPoint.Text    = hotel.yplace.ToString();
                if (hotel.xplace.HasValue && hotel.yplace.HasValue)
                {
                    ClientScript.RegisterStartupScript(GetType(), "message",
                                                       "<script language='javascript'> $(\"#baiduframe\").attr(\"src\", \"../../weixin/map/qqmap/qqmap_getLocation.html?lng=" + hotel.yplace.Value.ToString() + "&lat=" + hotel.xplace.Value.ToString() + "\");</script>");
                }
            }

            IList <Model.wx_hotel_pic> itemlist = iBll.GetModelList("hotelid=" + hotelid + " order by id asc");

            if (itemlist != null && itemlist.Count > 0)
            {
                int count = itemlist.Count;


                Model.wx_hotel_pic itemEntity = new Model.wx_hotel_pic();
                for (int i = 1; i <= count; i++)
                {
                    itemEntity   = itemlist[(i - 1)];
                    title        = this.FindControl("title" + i) as TextBox;
                    sortid       = this.FindControl("sortid" + i) as TextBox;
                    picUrl       = this.FindControl("picUrl" + i) as TextBox;
                    picTiaozhuan = this.FindControl("picTiaozhuan" + i) as TextBox;

                    title.Text        = itemEntity.title;
                    sortid.Text       = itemEntity.sortid.ToString();
                    picUrl.Text       = itemEntity.picUrl.ToString();
                    picTiaozhuan.Text = itemEntity.picTiaozhuan.ToString();
                }
            }
        }
Exemplo n.º 7
0
        public void list(int hotelid)
        {
            hotel = hotelBll.GetModel(hotelid);
            if (hotel != null)
            {
                this.hotelName.Text    = hotel.hotelName;
                this.hotelAddress.Text = hotel.hotelAddress;
                this.hotelPhone.Text   = hotel.hotelPhone;
                this.mobilPhone.Text   = hotel.mobilPhone;
                this.noticeEmail.Text  = hotel.noticeEmail;
                //this.emailPws.Text = hotel.emailPws;
                this.coverPic.Text               = hotel.coverPic;
                this.topPic.Text                 = hotel.topPic;
                this.orderLimit.Text             = hotel.orderLimit.ToString();
                this.listMode.SelectedValue      = hotel.listMode.ToString();
                this.messageNotice.SelectedValue = hotel.messageNotice.ToString();
                this.pwd.Text             = hotel.pwd;
                this.hotelIntroduct.Value = hotel.hotelIntroduct;
                this.orderRemark.Value    = hotel.orderRemark;
                this.txtLatXPoint.Text    = hotel.xplace.ToString();
                this.txtLngYPoint.Text    = hotel.yplace.ToString();
                ClientScript.RegisterStartupScript(GetType(), "message", "<script language='javascript'> $(\"#baiduframe\").attr(\"src\", \"../lbs/MapSelectPoint.aspx?yjindu=" + hotel.yplace.Value.ToString() + "&xweidu=" + hotel.xplace.Value.ToString() + "\");</script>");
            }

            IList <Model.wx_hotel_pic> itemlist = iBll.GetModelList("hotelid=" + hotelid + " order by id asc");

            if (itemlist != null && itemlist.Count > 0)
            {
                int count = itemlist.Count;


                Model.wx_hotel_pic itemEntity = new Model.wx_hotel_pic();
                for (int i = 1; i <= count; i++)
                {
                    itemEntity   = itemlist[(i - 1)];
                    title        = this.FindControl("title" + i) as TextBox;
                    sortid       = this.FindControl("sortid" + i) as TextBox;
                    picUrl       = this.FindControl("picUrl" + i) as TextBox;
                    picTiaozhuan = this.FindControl("picTiaozhuan" + i) as TextBox;

                    title.Text        = itemEntity.title;
                    sortid.Text       = itemEntity.sortid.ToString();
                    picUrl.Text       = itemEntity.picUrl.ToString();
                    picTiaozhuan.Text = itemEntity.picTiaozhuan.ToString();
                }
            }
        }
Exemplo n.º 8
0
        public void list(int roomid, int hotelid)
        {
            room  = roombll.GetModel(roomid);
            hotel = hotelbll.GetModel(hotelid);
            if (hotel != null)
            {
                hoteltel = hotel.hotelPhone;
                jieshao  = hotel.hotelIntroduct;
            }
            if (room != null)
            {
                roomtype = room.roomType;
                yuanjia  = room.roomPrice.ToString();
                xianjia  = room.salePrice.ToString();
                price3   = Convert.ToDecimal(yuanjia) - Convert.ToDecimal(xianjia);
                peitao   = room.facilities;

                UseInstruction = room.UseInstruction;
                RefundRule     = room.RefundRule;
            }
            DataSet dr = picbll.GetList(roomid);

            if (dr.Tables[0].Rows.Count > 0)
            {
                int j = 0;
                for (int i = 0; i < dr.Tables[0].Rows.Count; i++)
                {
                    tupian += "  <li><p>" + dr.Tables[0].Rows[i]["title"].ToString() + "</p><a href=\"" + dr.Tables[0].Rows[i]["roomPictz"].ToString() + "\"><img class='header-img' src=\"" + dr.Tables[0].Rows[i]["roomPic"].ToString() + "\"></a></li>";
                    j      += 1;
                    if (i == 0)
                    {
                        tabid += "<li class='active'>" + j.ToString() + "</li>";
                    }
                    else
                    {
                        tabid += "<li>" + j.ToString() + "</li>";
                    }
                }
            }
        }
Exemplo n.º 9
0
        public void hoteList(int hotelid)
        {
            hotel = hotelbll.GetModel(hotelid);
            if (hotel != null)
            {
                //listMode
                shuoming = hotel.orderRemark;
                dizhi    = hotel.hotelAddress;
                xplace   = hotel.xplace.ToString();
                yplace   = hotel.yplace.ToString();
                image    = hotel.coverPic;
                tel      = hotel.hotelPhone;

                yuding += " <li class=\"title\"><span class=\"none\">" + hotel.hotelName.ToString() + "</span></li>";
                yuding += "<li class=\"biaotou\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
                yuding += "<tr><td>类型</td><td class=\"yuanjia\">原价</td><td class=\"youhuijia\">优惠价</td></tr></table></li>";

                DataSet dr = roombll.GetList(hotelid);
                if (dr.Tables[0].Rows.Count > 0)
                {
                    if (hotel.listMode == false)
                    {
                        for (int i = 0; i < dr.Tables[0].Rows.Count; i++)
                        {
                            yuding += "<li class=\"dandanb\"><a href=\"hotel_form.aspx?roomid=" + dr.Tables[0].Rows[i]["id"].ToString() + "&hotelid=" + hotel.id.ToString() + "&openid=" + openid + "\"><span>";
                            yuding += "<table class=\"jiagebiao\" width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
                            yuding += "<tr><td>" + dr.Tables[0].Rows[i]["roomType"].ToString() + "";
                            yuding += " <p>" + dr.Tables[0].Rows[i]["indroduce"].ToString() + "</b></td>";
                            yuding += " <td class=\"yuanjia\">¥" + dr.Tables[0].Rows[i]["roomPrice"].ToString() + "</td><td class=\"youhuijia\">¥" + dr.Tables[0].Rows[i]["salePrice"].ToString() + "</td>";
                            yuding += "</tr></table></span></a></li>";
                        }
                    }

                    else
                    {
                        for (int i = 0; i < dr.Tables[0].Rows.Count; i++)
                        {
                            yuding += "   <li class=\"dandanb\"><a href=\"hotel_form.aspx?roomid=" + dr.Tables[0].Rows[i]["id"].ToString() + "&hotelid=" + hotel.id.ToString() + "&openid=" + openid + "\"><span>";
                            yuding += " <table class=\"jiagebiao\" width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
                            yuding += " <tr>";
                            yuding += " <td><div>" + dr.Tables[0].Rows[i]["roomType"].ToString() + "</div>";

                            BLL.wx_hotel_roompic roompic = new BLL.wx_hotel_roompic();
                            DataSet pic = roompic.GetList(Convert.ToInt32(dr.Tables[0].Rows[i]["id"].ToString()));
                            if (pic.Tables[0].Rows.Count > 0)
                            {
                                yuding += " <div><img src=\"" + pic.Tables[0].Rows[0]["roompic"] + "\" class=\"showimg\">";
                            }
                            else
                            {
                                yuding += " <div><img src=\"\" class=\"showimg\">";
                            }


                            yuding += " <p>" + dr.Tables[0].Rows[i]["indroduce"].ToString() + "</p>";
                            yuding += " <p>原价:<a class=\"yuanjia\">¥" + dr.Tables[0].Rows[i]["roomPrice"].ToString() + "</a></p>";
                            yuding += " <p>优惠价:<a class=\"youhuijia\">¥" + dr.Tables[0].Rows[i]["salePrice"].ToString() + "</a></p></td>";
                            yuding += " </tr>";
                            yuding += " </table>";
                            yuding += " </span></a>";
                            yuding += " </li>";
                        }
                    }
                }
            }
        }
Exemplo n.º 10
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);
        }