Пример #1
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>";
                }
            }
        }
Пример #2
0
        public void ShowInfo(int roomid)
        {
            Model.wx_hotel_room room = roomBll.GetModel(roomid);
            if (room != null)
            {
                this.lblRoomCode.Text          = room.RoomCode;
                this.roomType.Text             = room.roomType;
                this.indroduce.InnerText       = room.indroduce;
                this.roomPrice.Text            = room.roomPrice.ToString();
                this.salePrice.Text            = room.salePrice.ToString();
                this.facilities.Value          = room.facilities;
                this.txtUsueIntroduction.Value = room.UseInstruction;
                this.txtRefundRule.Value       = room.RefundRule;

                //this.txtExpiryDate_Begin.Text = room.ExpiryDate_Begin.HasValue ? room.ExpiryDate_Begin.Value.ToString("yyyy-MM-dd") : "";
                //this.txtExpiryDate_End.Text = room.ExpiryDate_End.HasValue ? room.ExpiryDate_End.Value.ToString("yyyy-MM-dd") : "";
                if (room.Status != Model.RoomStatus.Submit)
                {
                    //获取审核意见
                    var manageBll = new BLL.wx_hotel_room_manage();
                    txtComment.Text = manageBll.GetComment(roomid);
                }
            }

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

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


                Model.wx_hotel_roompic itemEntity = new Model.wx_hotel_roompic();
                for (int i = 1; i <= count; i++)
                {
                    itemEntity = itemlist[(i - 1)];
                    title      = this.FindControl("title" + i) as TextBox;
                    sortpicid  = this.FindControl("sortpicid" + i) as TextBox;
                    roomPic    = this.FindControl("roomPic" + i) as TextBox;
                    roomPictz  = this.FindControl("roomPictz" + i) as TextBox;

                    title.Text     = itemEntity.title;
                    sortpicid.Text = itemEntity.sortpicid.ToString();
                    roomPic.Text   = itemEntity.roomPic.ToString();
                    roomPictz.Text = itemEntity.roomPictz.ToString();
                }
            }
        }
Пример #3
0
        public void list(int roomid)
        {
            room = roomBll.GetModel(roomid);
            if (room != 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.roomType.Text       = room.roomType;
                this.indroduce.InnerText = room.indroduce;
                this.roomPrice.Text      = room.roomPrice.ToString();
                this.salePrice.Text      = room.salePrice.ToString();
                this.sortid.Text         = room.sortid.ToString();
                this.facilities.Value    = room.facilities;
            }

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

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


                Model.wx_hotel_roompic itemEntity = new Model.wx_hotel_roompic();
                for (int i = 1; i <= count; i++)
                {
                    itemEntity = itemlist[(i - 1)];
                    title      = this.FindControl("title" + i) as TextBox;
                    sortpicid  = this.FindControl("sortpicid" + i) as TextBox;
                    roomPic    = this.FindControl("roomPic" + i) as TextBox;
                    roomPictz  = this.FindControl("roomPictz" + i) as TextBox;

                    title.Text     = itemEntity.title;
                    sortpicid.Text = itemEntity.sortpicid.ToString();
                    roomPic.Text   = itemEntity.roomPic.ToString();
                    roomPictz.Text = itemEntity.roomPictz.ToString();
                }
            }
        }
Пример #4
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>";
                    }
                }
            }
        }
Пример #5
0
        public void getdingdan(string dingdanid)
        {
            int id = Convert.ToInt32(dingdanid);

            dingdan = dingdanbll.GetModel(id);
            if (dingdan != null)
            {
                if (dingdan.roomid != null)
                {
                    room = roombll.GetModel(dingdan.roomid.Value);
                    if (room != null)
                    {
                        UseInstruction = room.UseInstruction;
                        RefundRule     = room.RefundRule;
                    }
                }
                createtime = dingdan.orderTime.ToString();

                if (dingdan.orderStatus != null)
                {
                    var orderStatus = dingdan.orderStatus.Value;
                    var status      = HotelStatusManager.OrderStatus.GetStatusDict(orderStatus);
                    zhuangtai = "<em class=\"" + status.CssClass + "\">" + status.StatusName + "</em></span>";

                    //判断按钮
                    ShowBtnStatus(orderStatus);
                    ShowQRCode(orderStatus);
                    ShowAlertMsg(orderStatus);
                    ShowContent(orderStatus);

                    GetVerificationCode(dingdan);
                }

//
//                if (dingdan.orderStatus == 0)
//                {
//                    zhuangtai = "<em class=\"no\">待确认</em>";
//
//                }
//                else if (dingdan.orderStatus == 1)
//                {
//                    zhuangtai = "<em class=\"ok\">已确认</em>";
//                }
//                else if (dingdan.orderStatus == 2)
//                {
//                    zhuangtai = "<em class=\"fail\">已拒绝</em>";
//                }
//                else if (dingdan.orderStatus == 3)
//                {
//                    zhuangtai = "<em class=\"fail\">已付款</em>";
//                }
//                else
//                {
//                    return;
//                }

                truename = dingdan.oderName;
                tel      = dingdan.tel;
                if (dingdan.arriveTime != null)
                {
                    rztime = dingdan.arriveTime.Value.ToString("yyyy/MM/dd");
                }
                roomtype = dingdan.roomType;
                if (dingdan.leaveTime != null)
                {
                    ldtime = dingdan.leaveTime.Value.ToString("yyyy/MM/dd");
                }
                num      = dingdan.orderNum.ToString();
                yuanjia  = Convert.ToDecimal(dingdan.yuanjia);
                price    = Convert.ToDecimal(dingdan.price);
                jiesheng = (yuanjia - price) * Convert.ToDecimal(dingdan.orderNum);

                beizhu = dingdan.remark;

                OrderNumber    = dingdan.OrderNumber;
                IdentityNumber = dingdan.IdentityNumber;
                if (dingdan.price != null)
                {
                    PayAmount = dingdan.price.Value;
                }


                //总花费
                var dateSpan = dingdan.leaveTime.Value - dingdan.arriveTime.Value;
                this.totalPrice    = dingdan.price.Value * dingdan.orderNum.Value * dateSpan.Days;
                this.totalyuanjia  = dingdan.yuanjia.Value * dingdan.orderNum.Value * dateSpan.Days;
                this.totaljiesheng = totalyuanjia - totalPrice;
            }
        }
Пример #6
0
        /// <summary>
        /// 审核通过
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnAgree_Click(object sender, EventArgs e)
        {
            int sucCount   = 0;
            int errorCount = 0;
            var manager    = GetAdminInfo();

            for (int i = 0; i < rptList.Items.Count; i++)
            {
                int      id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
                CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
                if (cb.Checked)
                {
                    //Model.wx_hotel_room model = roomBll.GetModel(id);
                    //model.Status = Model.RoomStatus.Agree;

                    try
                    {
                        manageBll.ManageRoom(id, Model.RoomStatus.Agree, manager.id, "审核通过", "");
                        //using (TransactionScope scope = new TransactionScope())
                        //{
                        //    roomBll.Update(model);

                        //    Model.wx_hotel_room_manage manageInfo = new Model.wx_hotel_room_manage();
                        //    manageInfo.RoomId = model.id;
                        //    manageInfo.Operator = GetAdminInfo().id;
                        //    manageInfo.OperateName = "审核通过";
                        //    manageInfo.OperateTime = DateTime.Now;
                        //    manageInfo.Comment = "通过啊啊啊啊啊啊啊";
                        //    manageBll.Add(manageInfo);

                        //scope.Complete();
                        sucCount += 1;



                        //发送消息:审核后发送消息
                        Model.wx_hotel_room  room       = roomBll.GetModel(id);
                        BLL.wx_hotel_admin   dBll       = new BLL.wx_hotel_admin();
                        Model.wx_hotel_admin hotelAdmin = null;
                        var users = dBll.GetModelList(String.Format(" HotelId={0}", hotelid));
                        hotelAdmin = users.FirstOrDefault();
                        if (hotelAdmin != null)
                        {
                            var wxUserweixin = GetWeiXinCode();
//                            var role = new BLL.manager_role().GetModel(manager.role_id);
                            //                            var hotelsInfo = new BLL.wx_hotels_info().GetModel(hotelid);
                            var msg = new ShortMsgDto()
                            {
                                Title   = wxUserweixin.wxName,
                                Content = String.Format("编号为[{0}]的商品[{1}]已审核通过,可以发布啦!",
                                                        room.RoomCode, room.roomType),
                                Type         = "HotelRoom",
                                DetailType   = "Agree",
                                MenuType     = "hotel_room",
                                IsShowButton = true,
                                ButtonText   = "马上去发布",
                                ButtonUrl    = String.Format(
                                    "/admin/hotel/hotel_room_info.aspx?action=View&hotelid={0}&roomid={1}",
                                    hotelid, id),
                                ButtonMutipleUrl = "/admin/hotel/hotel_room.aspx?action=Edit",
                                FromUserId       = manager.id.ToString(),
                                ToUserId         = hotelAdmin.ManagerId.ToString(),
                                MsgToUserType    = MsgUserType.Hotel,
                                MsgFromUserType  = MsgUserType.Scenic
                            };
                            _shortMsgService.SendMsg(msg);
                        }
                        //}
                    }
                    catch (Exception ex)
                    {
                        errorCount += 1;
                    }
                }
            }

            //            if (sucCount > 0)
            //            {
            //                int id = Convert.ToInt32(((HiddenField)rptList.Items[0].FindControl("hidId")).Value);
            //                Model.wx_hotel_room room = roomBll.GetModel(id);
            //                //发送消息:审核后发送消息
            //
            //                BLL.wx_hotel_admin dBll = new BLL.wx_hotel_admin();
            //                Model.wx_hotel_admin hotelAdmin = null;
            //                var users = dBll.GetModelList(String.Format(" HotelId={0}", hotelid));
            //                hotelAdmin = users.FirstOrDefault();
            //                if (hotelAdmin != null)
            //                {
            //                    var hotelsInfo = new BLL.wx_hotels_info().GetModel(hotelid);
            //                    var msg = new ShortMsgDto()
            //                    {
            //                        Title = hotelsInfo.hotelName,
            //                        Content = String.Format("编号为[{0}]的[{1}]等{2}件商品已审核通过,可以发布啦!",
            //                        room.RoomCode, room.roomType, sucCount),
            //                        Type = "hotel",
            //                        IsShowButton = true,
            //                        ButtonText = "马上去发布",
            //                        ButtonUrl = "/admin/hotel/hotel_room.aspx?action=Edit",
            //                        FromUserId = manager.id,
            //                        ToUserId = hotelAdmin.ManagerId,
            //                        MsgToUserType = MsgUserType.Hotel,
            //                        MsgFromUserType = MsgUserType.Scenic
            //                    };
            //                    _shortMsgService.SendMsg(msg);
            //                }
            //            }


            AddAdminLog(MXEnums.ActionEnum.Audit.ToString(), "信息" + sucCount + "条,失败" + errorCount + "条"); //记录日志

            JscriptMsg("审核通过,成功" + sucCount + "条,失败" + errorCount + "条!", Utils.CombUrlTxt("hotel_room.aspx", "action={0}&hotelid={1}&keywords={2}", action, hotelid.ToString(), this.keywords), "Success");
        }