Ejemplo n.º 1
0
        private bool DoAdd()
        {
            Model.wx_userweixin weixin = GetWeiXinCode();
            Model.wx_wq_yuyue   model  = new Model.wx_wq_yuyue();
            bool result = false;

            model.address    = this.txtAddress.Text;
            model.coverpic   = this.txtNewscover.Text;
            model.headpic    = this.txtHeadpic.Text;
            model.latY       = MyCommFun.Str2Decimal(this.txtLngYPoint.Text);
            model.lngX       = MyCommFun.Str2Decimal(this.txtLatXPoint.Text);
            model.Name       = this.txtName.Text;
            model.remark     = this.txtSummary.InnerText;
            model.sort_id    = 99;
            model.telephone  = this.txtTelephone.Text;
            model.wid        = weixin.id;
            model.type       = type;
            model.createdate = DateTime.Now;
            if (bll.Add(model) > 0)
            {
                AddAdminLog(MXEnums.ActionEnum.Add.ToString(), "添加预约:" + model.Name); //记录日志
                result = true;
            }
            return(result);
        }
Ejemplo n.º 2
0
        private bool DoAdd()
        {
            Model.wx_userweixin   weixin = GetWeiXinCode();
            Model.wx_fc_houseType model  = new Model.wx_fc_houseType();
            bool result = false;

            model.createDate = DateTime.Now;
            string ht = this.ddlFang.SelectedItem.Value + "房" + this.ddlDing.SelectedItem.Value + "厅";

            model.houseType = ht;
            model.htimgA    = this.slideAUrl.Text;
            model.htImgB    = this.slideBUrl.Text;
            model.htimgC    = this.slideCUrl.Text;
            model.htimgD    = this.slideDUrl.Text;
            model.Jieshao   = this.txtJieshao.Text;
            model.jzmj      = MyCommFun.Str2Decimal(this.txtJzmj.Text);
            model.Name      = this.txtName.Text;
            model.sid       = MyCommFun.Str2Int(this.ddlSonfloor.Text);
            model.pid       = MyCommFun.Str2Int(this.ddlPanorama.Text);
            model.sort_id   = MyCommFun.Str2Int(this.txtSort_id.Text);
            model.storey    = this.txtStorey.Text;
            model.wid       = weixin.id;
            model.fid       = fid;

            if (bll.Add(model) > 0)
            {
                AddAdminLog(MXEnums.ActionEnum.Add.ToString(), "添加户型信息:" + model.Name); //记录日志
                result = true;
            }
            return(result);
        }
Ejemplo n.º 3
0
        private bool DoAdd()
        {
            Model.wx_userweixin weixin = GetWeiXinCode();
            Model.wx_fc_aboutWe model  = new Model.wx_fc_aboutWe();
            bool result = false;

            model.address     = this.txtAddress.Text;
            model.createDate  = DateTime.Now;
            model.latY        = MyCommFun.Str2Decimal(this.txtLngYPoint.Text);
            model.lngX        = MyCommFun.Str2Decimal(this.txtLatXPoint.Text);
            model.logoAddress = this.txtLogo.Text;
            model.mobilephone = this.txtMobilephone.Text;
            model.name        = this.txtName.Text;
            model.newsDetail  = this.txtDetail.InnerText;
            model.sort_id     = MyCommFun.Str2Int(this.txtSort_id.Text);
            model.telephone   = this.txtTelephone.Text;
            model.fid         = fid;
            model.wid         = weixin.id;

            if (bll.Add(model) > 0)
            {
                AddAdminLog(MXEnums.ActionEnum.Add.ToString(), "添加关于我们:" + model.name); //记录日志
                result = true;
            }
            return(result);
        }
Ejemplo n.º 4
0
        private bool DoEdit(int _id)
        {
            Model.wx_userweixin   weixin = GetWeiXinCode();
            Model.wx_fc_houseType model  = bll.GetModel(_id);
            bool   result = false;
            string ht     = this.ddlFang.SelectedItem.Value + "房" + this.ddlDing.SelectedItem.Value + "厅";

            model.houseType = ht;
            model.htimgA    = this.slideAUrl.Text;
            model.htImgB    = this.slideBUrl.Text;
            model.htimgC    = this.slideCUrl.Text;
            model.htimgD    = this.slideDUrl.Text;
            model.Jieshao   = this.txtJieshao.Text;
            model.jzmj      = MyCommFun.Str2Decimal(this.txtJzmj.Text);
            model.Name      = this.txtName.Text;
            model.sid       = MyCommFun.Str2Int(this.ddlSonfloor.Text);
            model.pid       = MyCommFun.Str2Int(this.ddlPanorama.Text);
            model.sort_id   = MyCommFun.Str2Int(this.txtSort_id.Text);
            model.storey    = this.txtStorey.Text;

            if (bll.Update(model))
            {
                AddAdminLog(MXEnums.ActionEnum.Edit.ToString(), "修改户型内容id:" + model.Id); //记录日志
                result = true;
            }
            return(result);
        }
Ejemplo n.º 5
0
        private bool DoEdit(int _id)
        {
            Model.wx_userweixin weixin = GetWeiXinCode();
            Model.wx_wq_chezhu  model  = bll.GetModel(_id);
            bool result = false;

            model.cpNum         = this.txtCpNum.Text;
            model.cxid          = MyCommFun.Str2Int(this.ddlChexi.SelectedItem.Value);
            model.cxingid       = MyCommFun.Str2Int(this.ddlChexing.SelectedItem.Value);
            model.gcdate        = MyCommFun.Obj2DateTime(this.txtGcTime.Text);
            model.Name          = this.txtName.Text;
            model.ppid          = MyCommFun.Str2Int(this.ddlPinpai.SelectedItem.Value);
            model.prevBxdate    = MyCommFun.Obj2DateTime(this.txtPrevBxdate.Text);
            model.prevBxmoney   = MyCommFun.Str2Decimal(this.txtPrevBxMoney.Text);
            model.prevBydate    = MyCommFun.Obj2DateTime(this.txtPrevByDate.Text);
            model.prevBylicheng = MyCommFun.Str2Decimal(this.txtPrevByLicheng.Text);
            model.prevBymoney   = MyCommFun.Str2Decimal(this.txtPrevByMoney.Text);
            model.prevNjdate    = MyCommFun.Obj2DateTime(this.txtPrevNjtime.Text);
            model.spdate        = MyCommFun.Obj2DateTime(this.txtSpTime.Text);
            model.teltephone    = this.txtTel.Text;
            model.sort_id       = MyCommFun.Str2Int(this.txtSort_id.Text);


            if (bll.Update(model))
            {
                AddAdminLog(MXEnums.ActionEnum.Edit.ToString(), "修改车主id:" + model.Id); //记录日志
                result = true;
            }
            return(result);
        }
Ejemplo n.º 6
0
        private Model.wx_hotel_dingdan CreateOrder()
        {
            var dingdan = new Model.wx_hotel_dingdan
            {
                hotelid        = Convert.ToInt32(MyCommFun.QueryString("hotelid")),
                roomid         = Convert.ToInt32(MyCommFun.QueryString("roomid")),
                createDate     = DateTime.Now,
                openid         = MyCommFun.QueryString("openid"),
                oderName       = MyCommFun.QueryString("oderName"),
                tel            = MyCommFun.QueryString("tel"),
                orderStatus    = 0,
                IdentityNumber = MyCommFun.QueryString("identityNumber"),
                arriveTime     =
                    Convert.ToDateTime(MyCommFun.QueryString("arriveTime")),
                leaveTime =
                    Convert.ToDateTime(MyCommFun.QueryString("leaveTime")),
                roomType    = MyCommFun.QueryString("roomType"),
                orderTime   = DateTime.Now,
                orderNum    = MyCommFun.RequestInt("orderNum"),
                isDelete    = 0,
                price       = MyCommFun.Str2Decimal(MyCommFun.QueryString("price")),
                yuanjia     = MyCommFun.Str2Decimal(MyCommFun.QueryString("yuanjia")),
                remark      = MyCommFun.QueryString("remark"),
                OrderNumber =
                    "H" + DateTime.Now.ToString("yyyyMMddHHmmssffff") + Utils.Number(5)
            };

            dingdan.id = new BLL.wx_hotel_dingdan().Add(dingdan);

            return(dingdan);
        }
Ejemplo n.º 7
0
        private bool DoAdd()
        {
            bool result = false;

            Model.wx_my_tijian  model  = new Model.wx_my_tijian();
            Model.manager       mModel = GetAdminInfo();
            Model.wx_userweixin uModel = GetWeiXinCode();
            model.adminname = mModel.user_name;
            model.wid       = uModel.id;
            DateTime tjDate = MyCommFun.Obj2DateTime(this.txtDate.Text);

            model.tijianluru    = DateTime.Now;
            model.tijiandate    = tjDate;
            model.tijianmonth   = MyCommFun.Str2Int(tjDate.ToString("MM"));
            model.tijiandetails = this.txtDetail.Text;
            model.tijianfu      = MyCommFun.Str2Decimal(this.txtFu.Text);
            model.tijiangao     = MyCommFun.Str2Decimal(this.txtGao.Text);
            model.tijianzhong   = MyCommFun.Str2Decimal(this.txtZhong.Text);
            model.tijianxiong   = MyCommFun.Str2Decimal(this.txtXiong.Text);
            model.tijiantou     = MyCommFun.Str2Decimal(this.txtTou.Text);
            model.userid        = uid;
            if (bll.Add(model) > 0)
            {
                result = true;
            }
            return(result);
        }
Ejemplo n.º 8
0
        //保存
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            Model.wx_userweixin weixin = GetWeiXinCode();
            int id = MyCommFun.Str2Int(hidid.Value);

            #region  //先判断
            string strErr = "";
            if (this.txtarea.Text.Trim().Length == 0)
            {
                strErr += "区域不能为空!";
            }

            if (strErr != "")
            {
                JscriptMsg(strErr, "back", "Error");
                return;
            }

            #endregion
            Model.wx_ucard_store_fendian fendian = new Model.wx_ucard_store_fendian();

            if (id > 0)
            {
                fendian = fdBll.GetModel(id);
            }

            fendian.area    = txtarea.Text.Trim();
            fendian.addr    = txtaddr.Text.Trim();
            fendian.xPoint  = MyCommFun.Str2Decimal(txtLatXPoint.Text);
            fendian.yPoint  = MyCommFun.Str2Decimal(txtLngYPoint.Text);
            fendian.sort_id = MyCommFun.Obj2Int(txtSortId.Text.Trim());
            fendian.tel     = txttel.Text.Trim();
            fendian.sId     = sid;
            if (id <= 0)
            {
                ChkAdminLevel("ucard_fd", MXEnums.ActionEnum.Add.ToString()); //检查权限

                //新增

                fendian.createDate = DateTime.Now;
                //1新增主表
                id = fdBll.Add(fendian);
                AddAdminLog(MXEnums.ActionEnum.Add.ToString(), "添加会员卡分店,主键为" + id); //记录日志
                JscriptMsg("添加会员卡分店成功!", "store_fendian.aspx?id=" + sid, "Success");
            }
            else
            {
                ChkAdminLevel("ucard_fd", MXEnums.ActionEnum.Edit.ToString()); //检查权限

                //修改
                //1修改主表
                fdBll.Update(fendian);
                AddAdminLog(MXEnums.ActionEnum.Edit.ToString(), "修改会员卡分店,主键为" + id); //记录日志
                JscriptMsg("修改会员卡分店成功!", "store_fendian.aspx?id=" + sid, "Success");
            }
        }
Ejemplo n.º 9
0
        //保存
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            int id = MyCommFun.Str2Int(hidid.Value);

            #region  //先判断
            string strErr = "";
            if (this.txtrealName.Text.Trim().Length == 0)
            {
                strErr += "姓名不能为空!";
            }

            if (strErr != "")
            {
                JscriptMsg(strErr, "back", "Error");
                return;
            }

            #endregion
            Model.wx_ucard_users user = new Model.wx_ucard_users();

            if (id > 0)
            {
                user = uBll.GetModel(id);
            }

            user.realName     = txtrealName.Text.Trim();
            user.sex          = MyCommFun.Str2Int(rblSex.SelectedItem.Value);
            user.wxName       = txtwxName.Text;
            user.age          = MyCommFun.Str2Int(txtage.Text);
            user.ttScore      = MyCommFun.Str2Int(txtttScore.Text);
            user.qdScore      = MyCommFun.Str2Int(txtqdScore.Text);
            user.consumeScore = MyCommFun.Str2Int(txtconsumeScore.Text);
            user.consumeMoney = MyCommFun.Str2Decimal(txtconsumeMoney.Text);
            user.regTime      = MyCommFun.Obj2DateTime(txtregTime.Text);
            user.endDate      = MyCommFun.Obj2DateTime(txtendDate.Text);
            user.mobile       = txtmobile.Text;
            user.addr         = txtaddr.Text;

            if (id <= 0)
            {  //新增
                ////1新增主表
                //id = uBll.Add(user);
                //AddAdminLog(MXEnums.ActionEnum.Add.ToString(), "添加会员,主键为" + id); //记录日志
                //JscriptMsg("添加会员成功!", "gift_list.aspx?id=" + sid, "Success");
            }
            else
            {   //修改
                //1修改主表
                uBll.Update(user);
                AddAdminLog(MXEnums.ActionEnum.Edit.ToString(), "修改会员卡--会员信息,主键为" + id); //记录日志
                JscriptMsg("修改会员卡--会员信息成功!", "user_list.aspx?id=" + sid, "Success");
            }
        }
Ejemplo n.º 10
0
 /// <summary>
 /// 单位 元*100
 /// </summary>
 /// <param name="news"></param>
 /// <returns></returns>
 private object ComputeMoney(object[] news)
 {
     if (news.Length > 0 && news[0] != null)
     {
         decimal yuan = MyCommFun.Str2Decimal(news[0].ToString());
         yuan *= 100;
         return(yuan);
     }
     else
     {
         return(string.Empty);
     }
 }
Ejemplo n.º 11
0
        //保存
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            #region 判断
            string strErr = "";
            if (this.txtsearchRadius.Text.Trim().Length == 0)
            {
                strErr += "默认查询范围不能为空!";
            }
            if (strErr != "")
            {
                JscriptMsg(strErr, "back", "Error");

                return;
            }
            #endregion

            int     id                   = MyCommFun.Str2Int(hidid.Value);
            decimal searchRadius         = MyCommFun.Str2Decimal(txtsearchRadius.Text);
            string  imgpic               = txtImgUrl.Text;
            Model.wx_lbs_setting setting = new Model.wx_lbs_setting();
            if (id > 0) //修改
            {
                setting = sBll.GetModel(id);
                setting.searchRadius = searchRadius;
                setting.bannerPicUrl = imgpic;
                bool ret = sBll.Update(setting);

                if (!ret)
                {
                    AddAdminLog(MXEnums.ActionEnum.Edit.ToString(), "修改lbs配置,主键为:" + setting.id); //记录日志
                    JscriptMsg("保存过程中发生错误!", "", "Error");
                    return;
                }
                JscriptMsg("修改lbs基本配置成功!", "lbslist.aspx", "Success");
            }
            else //添加
            {
                Model.wx_userweixin weixin = GetWeiXinCode();
                setting.wid          = weixin.id;
                setting.searchRadius = searchRadius;
                setting.bannerPicUrl = imgpic;
                int lengint = sBll.Add(setting);
                if (lengint <= 0)
                {
                    JscriptMsg("保存过程中发生错误!", "", "Error");
                    return;
                }
                AddAdminLog(MXEnums.ActionEnum.Add.ToString(), "添加lbs基本配置成功,主键为:" + lengint); //记录日志
                JscriptMsg("添加lbs基本配置成功!", "lbslist.aspx", "Success");
            }
        }
Ejemplo n.º 12
0
        protected void save_hotel_Click(object sender, EventArgs e)
        {
            Model.wx_hotels_info hotel = hotelBll.GetModel(hotelid);

            //hotel.hotelName = this.hotelName.Text;
            hotel.hotelAddress = this.hotelAddress.Text;
            //hotel.hotelPhone = this.hotelPhone.Text;
            hotel.mobilPhone = this.mobilPhone.Text;
            //hotel.noticeEmail = this.noticeEmail.Text;
            hotel.coverPic = this.coverPic.Text;
            hotel.topPic   = this.topPic.Text;
            //hotel.orderLimit = MyCommFun.Str2Int(this.orderLimit.Text);
            //hotel.listMode = Convert.ToBoolean(this.listMode.SelectedValue);
            //hotel.messageNotice = MyCommFun.Str2Int(this.messageNotice.Text);
            //hotel.pwd = this.pwd.Text;
            hotel.hotelIntroduct = this.hotelIntroduct.Value;
            //hotel.orderRemark = this.orderRemark.Value;
            hotel.xplace = MyCommFun.Str2Decimal(this.txtLatXPoint.Text);
            hotel.yplace = MyCommFun.Str2Decimal(this.txtLngYPoint.Text);


            hotelBll.Update(hotel);

            picBll.Deletepic(hotelid);

            for (int i = 1; i <= 6; i++)
            {
                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;

                if (title.Text.Trim() != "" && sortid.Text.Trim() != "")
                {
                    pic.hotelid      = hotelid;
                    pic.title        = title.Text.ToString();
                    pic.sortid       = MyCommFun.Str2Int(sortid.Text.ToString());
                    pic.picUrl       = picUrl.Text.ToString();
                    pic.picTiaozhuan = picTiaozhuan.Text.ToString();
                    pic.createDate   = DateTime.Now;
                    picBll.Add(pic);
                }
            }
            AddAdminLog(MXEnums.ActionEnum.Edit.ToString(), "修改商家设置,主键为" + hotelid); //记录日志
            // JscriptMsg("修改成功!", "hotel_list.aspx", "Success");
        }
Ejemplo n.º 13
0
        private bool DoEdit(int _id)
        {
            Model.wx_userweixin weixin = GetWeiXinCode();
            Model.wx_fc_floor   model  = bll.GetModel(_id);
            bool result = false;
            IList <Model.wx_requestRule> rList = rBll.GetModelList("modelFunctionName='微房产' and modelFunctionId=" + _id);

            if (rList != null && rList.Count > 0)
            {
                Model.wx_requestRule rModel = rList[0];
                rModel.reqKeywords = this.txtKW.Text;
                rBll.Update(rModel);
            }
            else
            {
                AddRule(weixin.id, _id);
            }
            model.yid       = MyCommFun.Str2Int(this.ddlYybm.SelectedItem.Value);
            model.videoUrl  = this.txtVideo.Text;
            model.sort_id   = MyCommFun.Str2Int(this.txtSort_id.Text);
            model.Address   = this.txtAddress.Text;
            model.fheadImg  = this.txtFheadImg.Text;
            model.fSummary  = this.txtfSummary.InnerText;
            model.htheadImg = this.txtHtheadImg.Text;
            model.jtpt      = this.txtjtpt.InnerText;
            model.latY      = MyCommFun.Str2Decimal(this.txtLatXPoint.Text);
            model.lngX      = MyCommFun.Str2Decimal(this.txtLngYPoint.Text);
            model.newsCover = this.txtNewsCover.Text;
            model.newsTitle = this.txtNewsTitle.Text;
            model.pSummary  = this.txtpSummary.InnerText;
            model.slideA    = this.slideAUrl.Text;
            model.sildeB    = this.slideBUrl.Text;
            model.slideC    = this.slideCUrl.Text;
            model.slideD    = this.slideDUrl.Text;
            model.slideE    = this.slideEUrl.Text;
            model.qid       = MyCommFun.Str2Int(this.ddlQjt.SelectedItem.Value);
            if (bll.Update(model))
            {
                AddAdminLog(MXEnums.ActionEnum.Edit.ToString(), "修改产品库内容id:" + model.Id); //记录日志
                result = true;
            }
            return(result);
        }
Ejemplo n.º 14
0
        private bool DoEdit(int _id)
        {
            Model.wx_userweixin  weixin = GetWeiXinCode();
            Model.wx_fc_yySysset model  = bll.GetModel(_id);
            bool result = false;

            model.address   = this.txtAddress.Text;
            model.headImg   = this.txtddHeadimg.Text;
            model.latY      = MyCommFun.Str2Decimal(this.txtLngYPoint.Text);
            model.lngX      = MyCommFun.Str2Decimal(this.txtLatXPoint.Text);
            model.telephone = this.txtTelephone.Text;
            model.sort_id   = MyCommFun.Str2Int(this.txtSort_id.Text);
            model.detail    = this.txtDetail.Text;
            if (bll.Update(model))
            {
                AddAdminLog(MXEnums.ActionEnum.Edit.ToString(), "修改预约系统设置,id:" + model.Id); //记录日志
                result = true;
            }
            return(result);
        }
Ejemplo n.º 15
0
        private bool DoEdit(int _id)
        {
            Model.wx_userweixin weixin = GetWeiXinCode();
            Model.wx_wq_yuyue   model  = bll.GetModel(_id);
            bool result = false;

            model.address   = this.txtAddress.Text;
            model.coverpic  = this.txtNewscover.Text;
            model.headpic   = this.txtHeadpic.Text;
            model.latY      = MyCommFun.Str2Decimal(this.txtLngYPoint.Text);
            model.lngX      = MyCommFun.Str2Decimal(this.txtLatXPoint.Text);
            model.Name      = this.txtName.Text;
            model.remark    = this.txtSummary.InnerText;
            model.sort_id   = 99;
            model.telephone = this.txtTelephone.Text;
            if (bll.Update(model))
            {
                AddAdminLog(MXEnums.ActionEnum.Edit.ToString(), "修改预约id:" + model.Id); //记录日志
                result = true;
            }
            return(result);
        }
Ejemplo n.º 16
0
        private bool DoAdd()
        {
            Model.wx_userweixin  weixin = GetWeiXinCode();
            Model.wx_fc_yySysset model  = new Model.wx_fc_yySysset();
            bool result = false;

            model.headImg    = this.txtddHeadimg.Text;
            model.latY       = MyCommFun.Str2Decimal(this.txtLngYPoint.Text);
            model.lngX       = MyCommFun.Str2Decimal(this.txtLatXPoint.Text);
            model.telephone  = this.txtTelephone.Text;
            model.wid        = weixin.id;
            model.address    = this.txtAddress.Text;
            model.createdate = DateTime.Now;
            model.sort_id    = MyCommFun.Str2Int(this.txtSort_id.Text);
            model.detail     = this.txtDetail.Text;
            if (bll.Add(model) > 0)
            {
                AddAdminLog(MXEnums.ActionEnum.Add.ToString(), "添加预约系统设置:" + model.address); //记录日志
                result = true;
            }
            return(result);
        }
Ejemplo n.º 17
0
        private bool DoEdit(int _id)
        {
            bool result = false;

            Model.wx_my_tijian model  = bll.GetModel(_id);
            DateTime           tjDate = MyCommFun.Obj2DateTime(this.txtDate.Text);

            model.tijiandate    = tjDate;
            model.tijianmonth   = MyCommFun.Str2Int(tjDate.ToString("MM"));
            model.tijiandetails = this.txtDetail.Text;
            model.tijianfu      = MyCommFun.Str2Decimal(this.txtFu.Text);
            model.tijiangao     = MyCommFun.Str2Decimal(this.txtGao.Text);
            model.tijianzhong   = MyCommFun.Str2Decimal(this.txtZhong.Text);
            model.tijianxiong   = MyCommFun.Str2Decimal(this.txtXiong.Text);
            model.tijiantou     = MyCommFun.Str2Decimal(this.txtTou.Text);

            if (bll.Update(model))
            {
                result = true;
            }
            return(result);
        }
Ejemplo n.º 18
0
        private bool DoAdd()
        {
            Model.wx_userweixin weixin = GetWeiXinCode();
            Model.wx_fc_floor   model  = new Model.wx_fc_floor();
            bool result = false;

            model.yid        = MyCommFun.Str2Int(this.ddlYybm.SelectedItem.Value);
            model.videoUrl   = this.txtVideo.Text;
            model.sort_id    = MyCommFun.Str2Int(this.txtSort_id.Text);
            model.Address    = this.txtAddress.Text;
            model.createdate = DateTime.Now;
            model.fheadImg   = this.txtFheadImg.Text;
            model.fSummary   = this.txtfSummary.InnerText;
            model.htheadImg  = this.txtHtheadImg.Text;
            model.jtpt       = this.txtjtpt.InnerText;
            model.latY       = MyCommFun.Str2Decimal(this.txtLatXPoint.Text);
            model.lngX       = MyCommFun.Str2Decimal(this.txtLngYPoint.Text);
            model.newsCover  = this.txtNewsCover.Text;
            model.newsTitle  = this.txtNewsTitle.Text;
            model.pSummary   = this.txtpSummary.InnerText;
            model.slideA     = this.slideAUrl.Text;
            model.sildeB     = this.slideBUrl.Text;
            model.slideC     = this.slideCUrl.Text;
            model.slideD     = this.slideDUrl.Text;
            model.slideE     = this.slideEUrl.Text;
            model.wid        = weixin.id;
            model.qid        = MyCommFun.Str2Int(this.ddlQjt.SelectedItem.Value);
            int res = bll.Add(model);

            if (res > 0)
            {
                AddRule(weixin.id, res);
                AddAdminLog(MXEnums.ActionEnum.Add.ToString(), "添加楼盘信息:" + model.newsTitle); //记录日志
                result = true;
            }

            return(result);
        }
Ejemplo n.º 19
0
        private bool DoEdit(int _id)
        {
            Model.wx_userweixin weixin = GetWeiXinCode();
            Model.wx_fc_aboutWe model  = bll.GetModel(_id);
            bool result = false;

            model.address     = this.txtAddress.Text;
            model.latY        = MyCommFun.Str2Decimal(this.txtLngYPoint.Text);
            model.lngX        = MyCommFun.Str2Decimal(this.txtLatXPoint.Text);
            model.logoAddress = this.txtLogo.Text;
            model.mobilephone = this.txtMobilephone.Text;
            model.name        = this.txtName.Text;
            model.newsDetail  = this.txtDetail.InnerText;
            model.sort_id     = MyCommFun.Str2Int(this.txtSort_id.Text);
            model.telephone   = this.txtTelephone.Text;

            if (bll.Update(model))
            {
                AddAdminLog(MXEnums.ActionEnum.Edit.ToString(), "修改产品库内容id:" + model.Id); //记录日志
                result = true;
            }
            return(result);
        }
Ejemplo n.º 20
0
        /// <summary>
        /// 取购物车里的商品信息
        /// </summary>
        /// <param name="openid"></param>
        /// <param name="wid"></param>
        /// <returns></returns>
        public List <Model.cartProduct> GetCartList(string openid, int wid)
        {
            DataSet ds = dal.GetCartList(openid, wid);
            List <Model.cartProduct> cartlist = new List <cartProduct>();

            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                int count = ds.Tables[0].Rows.Count;
                Model.cartProduct cproduct = new cartProduct();
                DataRow           dr;
                for (int i = 0; i < count; i++)
                {
                    dr                   = ds.Tables[0].Rows[i];
                    cproduct             = new cartProduct();
                    cproduct.id          = MyCommFun.Obj2Int(dr["id"]);
                    cproduct.openid      = MyCommFun.ObjToStr(dr["openid"]);
                    cproduct.productId   = MyCommFun.Obj2Int(dr["productId"]);
                    cproduct.productName = MyCommFun.ObjToStr(dr["productName"]);
                    cproduct.productNum  = MyCommFun.Obj2Int(dr["productNum"]);
                    cproduct.productPic  = MyCommFun.ObjToStr(dr["pic"]);
                    cproduct.skuId       = MyCommFun.Obj2Int(dr["skuId"]);
                    cproduct.skuInfo     = MyCommFun.ObjToStr(dr["skuInfo"]);
                    cproduct.totPrice    = MyCommFun.Str2Decimal(dr["totPrice"].ToString());
                    cproduct.totPrice100 = cproduct.totPrice * 100;
                    cproduct.avgPrice    = MyCommFun.decimalF2(cproduct.totPrice / (cproduct.productNum == 0?1:cproduct.productNum));
                    cproduct.avgPrice100 = cproduct.avgPrice * 100;
                    cproduct.createDate  = MyCommFun.Obj2DateTime(dr["createDate"]);
                    cproduct.wid         = MyCommFun.Obj2Int(dr["wid"]);
                    cproduct.stock       = MyCommFun.Obj2Int(dr["stock"]);
                    cproduct.productUrl  = "/shop/detail.aspx?wid=" + cproduct.wid + "&pid=" + cproduct.productId + "&openid=" + cproduct.openid;
                    cproduct.seq         = i;
                    cartlist.Add(cproduct);
                }
            }

            return(cartlist);
        }
Ejemplo n.º 21
0
        public void ProcessRequest(HttpContext context)
        {
            Dictionary <string, string> jsonDict = new Dictionary <string, string>();

            context.Response.ContentType = "text/json";
            string _action = MyCommFun.QueryString("myact");

            BLL.wx_hotel_dingdan   dingdanbll = new BLL.wx_hotel_dingdan();
            Model.wx_hotel_dingdan dingdan    = new Model.wx_hotel_dingdan();
            string hotelid  = MyCommFun.QueryString("hotelid");
            string roomid   = MyCommFun.QueryString("roomid");
            string openid   = MyCommFun.QueryString("openid");
            string oderName = MyCommFun.QueryString("oderName");
            string tel      = MyCommFun.QueryString("tel");


            if (_action == "dingdan")
            {
                dingdan.hotelid     = Convert.ToInt32(hotelid);
                dingdan.roomid      = Convert.ToInt32(roomid);
                dingdan.openid      = openid;
                dingdan.oderName    = oderName;
                dingdan.tel         = tel;
                dingdan.orderStatus = 0;


                if (Convert.ToDateTime(MyCommFun.QueryString("arriveTime")) < DateTime.Now.AddDays(-1))
                {
                    jsonDict.Add("ret", "faile");
                    jsonDict.Add("content", "入住时间不能小于今天时间!");
                    context.Response.Write(MyCommFun.getJsonStr(jsonDict));
                    return;
                }

                if (Convert.ToDateTime(MyCommFun.QueryString("arriveTime")) > Convert.ToDateTime(MyCommFun.QueryString("leaveTime")))
                {
                    jsonDict.Add("ret", "faile");
                    jsonDict.Add("content", "入住时间必须小于离店时间!");
                    context.Response.Write(MyCommFun.getJsonStr(jsonDict));
                    return;
                }

                if (MyCommFun.QueryString("arriveTime") != "")
                {
                    dingdan.arriveTime = Convert.ToDateTime(MyCommFun.QueryString("arriveTime"));
                }
                if (MyCommFun.QueryString("leaveTime") != "")
                {
                    dingdan.leaveTime = Convert.ToDateTime(MyCommFun.QueryString("leaveTime"));
                }
                dingdan.roomType  = MyCommFun.QueryString("roomType");
                dingdan.orderTime = DateTime.Now;
                dingdan.orderNum  = MyCommFun.RequestInt("orderNum");
                dingdan.isDelete  = 0;
                dingdan.price     = MyCommFun.Str2Decimal(MyCommFun.QueryString("price"));
                dingdan.yuanjia   = MyCommFun.Str2Decimal(MyCommFun.QueryString("yuanjia"));
                dingdan.remark    = MyCommFun.QueryString("remark");
                dingdanbll.Add(dingdan);

                jsonDict.Add("ret", "ok");
                jsonDict.Add("content", "提交成功!");
                context.Response.Write(MyCommFun.getJsonStr(jsonDict));
                return;
            }

            if (_action == "dingdanedite")
            {
                dingdan.id       = MyCommFun.RequestInt("dingdanidnum");
                dingdan.oderName = MyCommFun.QueryString("truename");
                dingdan.tel      = MyCommFun.QueryString("tel");

                if (Convert.ToDateTime(MyCommFun.QueryString("dateline")) < DateTime.Now.AddDays(-1))
                {
                    jsonDict.Add("ret", "faile");
                    jsonDict.Add("content", "入住时间不能小于今天时间!");
                    context.Response.Write(MyCommFun.getJsonStr(jsonDict));
                    return;
                }

                if (MyCommFun.QueryString("dateline") != "")
                {
                    dingdan.arriveTime = Convert.ToDateTime(MyCommFun.QueryString("dateline"));
                }



                dingdan.orderNum = MyCommFun.RequestInt("nums");
                dingdan.price    = Convert.ToDecimal(MyCommFun.QueryString("xianjianum"));
                dingdan.yuanjia  = Convert.ToDecimal(MyCommFun.QueryString("yuanjianum"));
                dingdan.remark   = MyCommFun.QueryString("info");
                dingdanbll.Updatehotel(dingdan);

                jsonDict.Add("ret", "ok");
                jsonDict.Add("content", "修改成功!");
                context.Response.Write(MyCommFun.getJsonStr(jsonDict));
                return;
            }

            if (_action == "dingdandelete")
            {
                int ddid = MyCommFun.RequestInt("dingdanidnum");
                dingdanbll.Update(ddid);
                jsonDict.Add("ret", "ok");
                jsonDict.Add("content", "删除成功!");
                context.Response.Write(MyCommFun.getJsonStr(jsonDict));
                return;
            }
        }
Ejemplo n.º 22
0
        protected void save_hotel_Click(object sender, EventArgs e)
        {
            editetype = MyCommFun.QueryString("type");
            Model.wx_userweixin weixin = GetWeiXinCode();
            int wid = weixin.id;

            if (editetype == "add")
            {
                hotel.wid          = wid;
                hotel.hotelName    = this.hotelName.Text;
                hotel.hotelAddress = this.hotelAddress.Text;
                hotel.hotelPhone   = this.hotelPhone.Text;
                hotel.mobilPhone   = this.mobilPhone.Text;
                hotel.noticeEmail  = this.noticeEmail.Text;
                //hotel.emailPws = this.emailPws.Text;
                hotel.coverPic       = this.coverPic.Text;
                hotel.topPic         = this.topPic.Text;
                hotel.orderLimit     = MyCommFun.Str2Int(this.orderLimit.Text);
                hotel.listMode       = Convert.ToBoolean(this.listMode.SelectedValue);
                hotel.messageNotice  = MyCommFun.Str2Int(this.messageNotice.Text);
                hotel.pwd            = this.pwd.Text;
                hotel.hotelIntroduct = this.hotelIntroduct.Value;
                hotel.orderRemark    = this.orderRemark.Value;
                hotel.createDate     = DateTime.Now;
                hotel.xplace         = MyCommFun.Str2Decimal(this.txtLatXPoint.Text);
                hotel.yplace         = MyCommFun.Str2Decimal(this.txtLngYPoint.Text);


                int id = hotelBll.Add(hotel);


                for (int i = 1; i <= 6; i++)
                {
                    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;

                    if (title.Text.Trim() != "" && sortid.Text.Trim() != "")
                    {
                        pic.hotelid      = id;
                        pic.title        = title.Text.ToString();
                        pic.sortid       = MyCommFun.Str2Int(sortid.Text.ToString());
                        pic.picUrl       = picUrl.Text.ToString();
                        pic.picTiaozhuan = picTiaozhuan.Text.ToString();
                        pic.createDate   = DateTime.Now;
                        picBll.Add(pic);
                    }
                }
                AddAdminLog(MXEnums.ActionEnum.Add.ToString(), "添加商家设置,主键为" + id); //记录日志
                JscriptMsg("添加成功!", "hotel_list.aspx", "Success");
            }

            else if (editetype == "edite")
            {
                if (hotelid == 0)
                {
                    return;
                    //操作失败!
                }

                hotel.id           = hotelid;
                hotel.wid          = wid;
                hotel.hotelName    = this.hotelName.Text;
                hotel.hotelAddress = this.hotelAddress.Text;
                hotel.hotelPhone   = this.hotelPhone.Text;
                hotel.mobilPhone   = this.mobilPhone.Text;
                hotel.noticeEmail  = this.noticeEmail.Text;
                // hotel.emailPws = this.emailPws.Text;
                hotel.coverPic       = this.coverPic.Text;
                hotel.topPic         = this.topPic.Text;
                hotel.orderLimit     = MyCommFun.Str2Int(this.orderLimit.Text);
                hotel.listMode       = Convert.ToBoolean(this.listMode.SelectedValue);
                hotel.messageNotice  = MyCommFun.Str2Int(this.messageNotice.Text);
                hotel.pwd            = this.pwd.Text;
                hotel.hotelIntroduct = this.hotelIntroduct.Value;
                hotel.orderRemark    = this.orderRemark.Value;
                // hotel.createDate = DateTime.Now;
                hotel.xplace = MyCommFun.Str2Decimal(this.txtLatXPoint.Text);
                hotel.yplace = MyCommFun.Str2Decimal(this.txtLngYPoint.Text);


                hotelBll.Update(hotel);

                picBll.Deletepic(hotelid);

                for (int i = 1; i <= 6; i++)
                {
                    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;

                    if (title.Text.Trim() != "" && sortid.Text.Trim() != "")
                    {
                        pic.hotelid      = hotelid;
                        pic.title        = title.Text.ToString();
                        pic.sortid       = MyCommFun.Str2Int(sortid.Text.ToString());
                        pic.picUrl       = picUrl.Text.ToString();
                        pic.picTiaozhuan = picTiaozhuan.Text.ToString();
                        pic.createDate   = DateTime.Now;
                        picBll.Add(pic);
                    }
                }
                AddAdminLog(MXEnums.ActionEnum.Edit.ToString(), "修改商家设置,主键为" + hotelid); //记录日志
                JscriptMsg("修改成功!", "hotel_list.aspx", "Success");
            }
        }
Ejemplo n.º 23
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/json";
            string action = MXRequest.GetQueryString("myact");

            #region 根据品牌得到车系
            if (action == "chexi")
            {
                BLL.wx_wq_chexi          cxBll  = new BLL.wx_wq_chexi();
                int                      pid    = MyCommFun.RequestInt("pid");
                int                      wid    = MyCommFun.RequestInt("wid");
                List <Model.wx_wq_chexi> cxList = cxBll.GetModelList(string.Format(" wid={0} and pid={1}", wid, pid));
                context.Response.Write(MyCommFun.SwitchToJson <Model.wx_wq_chexi>(cxList));
                return;
            }
            #endregion

            #region 根据车系得到车型
            if (action == "chexing")
            {
                BLL.wx_wq_chexing cxBll = new BLL.wx_wq_chexing();
                int xid = MyCommFun.RequestInt("xid");
                int wid = MyCommFun.RequestInt("wid");
                List <Model.wx_wq_chexing> cxList = cxBll.GetModelList(string.Format(" wid={0} and xid={1}", wid, xid));
                context.Response.Write(MyCommFun.SwitchToJson <Model.wx_wq_chexing>(cxList));
                return;
            }
            #endregion


            #region 添加预约订单
            if (action == "addorder")
            {
                Dictionary <string, string> jsondict = new Dictionary <string, string>();
                BLL.wx_wq_yyOrder           yoBll    = new BLL.wx_wq_yyOrder();
                Model.wx_wq_yyOrder         yoModel  = new Model.wx_wq_yyOrder();
                try
                {
                    int    wid    = MyCommFun.RequestInt("wid");
                    string name   = MyCommFun.QueryString("truename");
                    string openid = MyCommFun.QueryString("openid");
                    string tel    = MyCommFun.QueryString("tel");
                    string date   = MyCommFun.QueryString("dateline");
                    string part   = MyCommFun.QueryString("timepart");
                    string xid    = MyCommFun.QueryString("xid");
                    string pid    = MyCommFun.QueryString("pid");
                    int    type   = MyCommFun.RequestInt("type");
                    string carnum = MyCommFun.QueryString("carnum");
                    string km     = MyCommFun.QueryString("km");
                    string remark = MyCommFun.QueryString("info");
                    yoModel.Name       = name;
                    yoModel.remark     = remark;
                    yoModel.sort_id    = 99;
                    yoModel.telephone  = tel;
                    yoModel.xid        = MyCommFun.Str2Int(xid);
                    yoModel.pid        = MyCommFun.Str2Int(pid);
                    yoModel.wid        = wid;
                    yoModel.yid        = type;
                    yoModel.km         = MyCommFun.Str2Decimal(km);
                    yoModel.carnum     = carnum;
                    yoModel.yydate     = MyCommFun.Obj2DateTime(date);
                    yoModel.yytime     = part;
                    yoModel.openid     = openid;
                    yoModel.ddstatus   = "待回复";
                    yoModel.createdate = DateTime.Now;
                    int res = yoBll.Add(yoModel);
                    if (res < 1)
                    {
                        jsondict.Add("errno", "1");
                        context.Response.Write(MyCommFun.getJsonStr(jsondict));
                        return;
                    }
                    jsondict.Add("errno", "0");
                    context.Response.Write(MyCommFun.getJsonStr(jsondict));
                    return;
                }
                catch (Exception)
                {
                    jsondict.Add("errno", "1");
                    context.Response.Write(MyCommFun.getJsonStr(jsondict));
                    return;
                }
            }
            #endregion

            #region  除订单
            if (action == "delorder")
            {
                Dictionary <string, string> jsondict = new Dictionary <string, string>();
                int id  = MyCommFun.RequestInt("id");
                int wid = MyCommFun.RequestInt("wid");
                BLL.wx_wq_yyOrder yoBll = new BLL.wx_wq_yyOrder();
                yoBll.Delete(id);

                return;
            }
            #endregion

            if (action == "addChezhu")
            {
                Dictionary <string, string> jsondict = new Dictionary <string, string>();
                BLL.wx_wq_chezhu            czBll    = new BLL.wx_wq_chezhu();
                try
                {
                    int    pid           = MyCommFun.RequestInt("car_model");
                    int    wid           = MyCommFun.RequestInt("wid");
                    int    xid           = MyCommFun.RequestInt("car_type");
                    int    xingid        = MyCommFun.RequestInt("car_xing");
                    string car_no        = MyCommFun.QueryString("car_no");
                    string tel           = MyCommFun.QueryString("tel");
                    string car_userName  = MyCommFun.QueryString("car_userName");
                    string car_startTime = MyCommFun.QueryString("car_startTime");
                    string car_buyTime   = MyCommFun.QueryString("car_buyTime");
                    string openid        = MyCommFun.QueryString("openid");
                    int    res           = czBll.GetRecordCount(" openid='" + openid + "' and wid=" + wid);

                    Model.wx_wq_chezhu czModel = new Model.wx_wq_chezhu();
                    if (res > 0)
                    {
                        czModel = czBll.GetModelList(" openid='" + openid + "' and wid=" + wid)[0];
                    }
                    czModel.cpNum      = car_no;
                    czModel.cxingid    = xingid;
                    czModel.gcdate     = MyCommFun.Obj2DateTime(car_buyTime);
                    czModel.Name       = car_userName;
                    czModel.ppid       = pid;
                    czModel.cxid       = xid;
                    czModel.cxingid    = xingid;
                    czModel.spdate     = MyCommFun.Obj2DateTime(car_startTime);
                    czModel.teltephone = tel;
                    czModel.sort_id    = 99;
                    czModel.wid        = wid;
                    czModel.createdate = DateTime.Now;
                    czModel.openid     = openid;
                    if (res > 0)
                    {
                        czBll.Update(czModel);
                        jsondict.Add("content", "修改车主信息成功");
                        context.Response.Write(MyCommFun.getJsonStr(jsondict));
                        return;
                    }
                    else
                    {
                        czBll.Add(czModel);
                        jsondict.Add("content", "添加车主信息成功");
                        context.Response.Write(MyCommFun.getJsonStr(jsondict));
                        return;
                    }
                }
                catch (Exception)
                {
                    jsondict.Add("content", "操作失败!");
                    context.Response.Write(MyCommFun.getJsonStr(jsondict));
                    return;
                }
            }
        }
Ejemplo n.º 24
0
        //保存
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            Model.wx_userweixin weixin = GetWeiXinCode();
            int id = MyCommFun.Str2Int(hidid.Value);

            #region  //先判断
            string strErr = "";

            if (this.txtact_name.Text.Trim().Length == 0)
            {
                strErr += "活动名称不能为空!";
            }
            if (ddlhbType.SelectedItem.Value == "")
            {
                strErr += "活动类型不能为空!";
            }
            if (ddlhbType.SelectedItem.Value == "1")
            {
                if (this.txtKW.Text.Trim().Length == 0)
                {
                    strErr += "关键词不能为空!";
                }
            }

            if (this.txtbeginDate.Text.Trim().Length == 0 || !MyCommFun.isDateTime(txtbeginDate.Text))
            {
                strErr += "开始时间不能为空!";
            }
            if (this.txtendDate.Text.Trim().Length == 0 || !MyCommFun.isDateTime(txtendDate.Text))
            {
                strErr += "结束时间不能为空!";
            }

            if (this.txtwishing.Text.Trim().Length == 0)
            {
                strErr += "祝福语不能为空!";
            }

            if (this.txtnick_name.Text.Trim().Length == 0)
            {
                strErr += "提供方名称不能为空!";
            }

            if (this.txtsend_name.Text.Trim().Length == 0)
            {
                strErr += "商户名称不能为空!";
            }

            if (this.txtclient_ip.Text.Trim().Length == 0)
            {
                strErr += "调用接口的机器 Ip 地址不能为空!";
            }

            if (this.txttotalMoney.Text.Trim().Length == 0)
            {
                strErr += "红包总金额不能为空!";
            }

            if (strErr != "")
            {
                JscriptMsg(strErr, "back", "Error");
                return;
            }
            DateTime begin = DateTime.Parse(txtbeginDate.Text.Trim());
            DateTime end   = DateTime.Parse(txtendDate.Text.Trim());
            if (begin >= end)
            {
                JscriptMsg("开始时间必须小于结束时间", "back", "Error");
                return;
            }
            if (ddlhbType.SelectedItem.Value == "0")
            {
                //如果是关注红包,则要判断该微账号同一时间段是否已经包含了关注红包
                IList <Model.wx_xjhongbao_action> actlist = xjactBll.GetModelList("wid=" + weixin.id + " and id!=" + id + " and hbType=0 and  endDate>='" + begin.ToString() + "' and beginDate<='" + end.ToString() + "' ");

                if (actlist != null && actlist.Count > 0)
                {
                    JscriptMsg("该时间段内不能有2个关注红包", "back", "Error");
                    return;
                }
            }

            #endregion

            #region 赋值
            Model.wx_xjhongbao_action xjActionModel = new Model.wx_xjhongbao_action();
            if (id > 0)
            {   //修改
                xjActionModel = xjactBll.GetModel(id);
            }

            xjActionModel.act_name = txtact_name.Text.Trim();

            xjActionModel.actPic     = txtactPic.Text.Trim();
            xjActionModel.beginDate  = MyCommFun.Obj2DateTime(txtbeginDate.Text);
            xjActionModel.endDate    = MyCommFun.Obj2DateTime(txtendDate.Text);
            xjActionModel.lqType     = MyCommFun.Str2Int(radlqType.Text);
            xjActionModel.totalMoney = (int)(MyCommFun.Str2Decimal(txttotalMoney.Text) * 100);
            xjActionModel.moneyType  = MyCommFun.Str2Int(radmoneyType.SelectedItem.Value);
            xjActionModel.min_value  = (int)(MyCommFun.Str2Decimal(txtmin_value.Text) * 100);
            xjActionModel.keywords   = txtKW.Text.Trim();

            if (ddlhbType.SelectedItem.Value == "0")
            {  //如果红包为关注时红包,则领取方式为:一次性
                xjActionModel.lqType = 0;
            }
            if (xjActionModel.moneyType == 0)
            {
                xjActionModel.max_value = xjActionModel.min_value;
            }
            else
            {
                xjActionModel.max_value = (int)(MyCommFun.Str2Decimal(txtmax_value.Text) * 100);
            }
            xjActionModel.remark = txtremark.Value;

            //红包参数
            xjActionModel.wishing     = txtwishing.Text.Trim();
            xjActionModel.nick_name   = txtnick_name.Text.Trim();
            xjActionModel.send_name   = txtsend_name.Text.Trim();
            xjActionModel.logo_imgurl = txtlogo_imgurl.Text.Trim();
            xjActionModel.client_ip   = txtclient_ip.Text.Trim();

            //分享的参数
            xjActionModel.share_content = txtshare_content.Value.Trim();
            xjActionModel.share_url     = txtshare_url.Value.Trim();
            xjActionModel.share_imgurl  = txtshare_imgurl.Text.Trim();

            if (id > 0)
            {
                //修改
                bool updateOK = xjactBll.Update(xjActionModel);
                //if (xjActionModel.hbType == 1)
                //{
                //    //添加关键词
                //    IList<Model.wx_requestRule> rlist = rBll.GetModelList("modelFunctionName = '现金红包' and modelFunctionId=" + id);

                //    if (rlist != null && rlist.Count > 0)
                //    {
                //        Model.wx_requestRule rule = new Model.wx_requestRule();

                //        rule = rlist[0];
                //        rule.reqKeywords = txtKW.Text.Trim();
                //        rBll.Update(rule);
                //    }
                //    else
                //    {
                //        AddRule(weixin.id, id);
                //    }
                //}
                AddAdminLog(MXEnums.ActionEnum.Edit.ToString(), "修改现金红包活动,主键为" + id); //记录日志//1e2124dd04e11d01b9df2865f85944be
                JscriptMsg("修改现金红包活动成功!", "actionmgr.aspx", "Success");
            }
            else
            {
                //新增
                xjActionModel.hbType       = MyCommFun.Str2Int(ddlhbType.Text.Trim());
                xjActionModel.totalLqMoney = 0;
                xjActionModel.wid          = weixin.id;
                xjActionModel.createDate   = DateTime.Now;
                int addId = xjactBll.Add(xjActionModel);
                //if (xjActionModel.hbType == 1)
                //{
                //    //添加关键词
                //    AddRule(weixin.id, addId);
                //}

                AddAdminLog(MXEnums.ActionEnum.Add.ToString(), "添加现金红包活动,主键为" + addId); //记录日志//1e2124dd04e11d01b9df2865f85944be
                JscriptMsg("添加现金红包活动成功!", "actionmgr.aspx", "Success");
            }



            #endregion
        }
Ejemplo n.º 25
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            Model.wx_userweixin weixin = GetWeiXinCode();


            //基本设置

            string beginPicurl = imgbeginPic.ImageUrl;

            if (this.beginPic.Text.ToString() != "")
            {
                beginPicurl = this.beginPic.Text.ToString();
            }
            info.beginPic = beginPicurl;

            info.actName      = this.actName.Text;
            info.duijiangInfo = this.duijiangInfo.Text;
            info.brief        = this.brief.InnerText;
            DateTime beginDate = DateTime.Parse(this.beginDate.Text);
            DateTime endDate   = DateTime.Parse(this.endDate.Text);

            if (beginDate >= endDate)
            {
                JscriptMsg("开始时间必须小于结束时间", "", "Error");
                return;
            }
            if (this.beginDate.Text != "")
            {
                info.beginDate = beginDate;
            }
            if (this.endDate.Text != "")
            {
                info.endDate = endDate;
            }
            info.actContent = this.actContent.InnerText;
            info.cfcjhf     = this.cfcjhf.Text;

            //活动结束

            string endPicurl = imgEndPic.ImageUrl;

            if (this.endPic.Text != "")
            {
                endPicurl = this.endPic.Text;
            }
            info.endPic = endPicurl;

            info.endNotice  = this.endNotice.Text;
            info.endContent = this.endContent.Text;



            //
            if (this.zhongjianglv.Text != "")
            {
                info.zhongjianglv = MyCommFun.Str2Decimal(this.zhongjianglv.Text);
            }

            info.personMaxTimes = MyCommFun.Str2Int(this.personMaxTimes.Text);
            info.dayMaxTimes    = MyCommFun.Str2Int(this.dayMaxTimes.Text);
            if (info.dayMaxTimes > info.personMaxTimes)
            {
                JscriptMsg("每人每天砸的次数不能大于砸奖总次数!", "", "Error");
                return;
            }

            info.djPwd = this.djPwd.Text;
            if (this.backMusic.Text != "")
            {
                info.backMusic = this.backMusic.Text;
            }
            else
            {
                info.backMusic = "music/default.mp3";
            }
            info.personNum = MyCommFun.Str2Int(this.zhongjianglv.Text);

            //
            info.snShezhi      = this.snShezhi.Text;
            info.snRename      = this.snRename.Text;
            info.telRename     = this.telRename.Text;
            info.jpDisplay     = Convert.ToBoolean(this.jpDisplay.SelectedValue);
            info.mrXingyun     = Convert.ToBoolean(this.mrXingyun.SelectedValue);
            info.zhongjiangSZ  = Convert.ToInt32(this.zhongjiangSZ.SelectedValue);
            info.choujiangMode = this.choujiangMode.SelectedValue;

            if (type == "edite")
            {
                info.id = zjdid;
                //1修改主表
                infobll.Update(info);
                //2删除,且新增奖项表
                EditAwardItem(zjdid);
                //3 修改回复规则表
                IList <Model.wx_requestRule> rlist = rBll.GetModelList("modelFunctionName = '砸金蛋' and modelFunctionId=" + zjdid);

                if (rlist != null && rlist.Count > 0)
                {
                    rule             = rlist[0];
                    rule.reqKeywords = txtKW.Text.Trim();

                    rBll.Update(rule);
                }
                else
                {
                    AddRule(weixin.id, zjdid);
                }

                AddAdminLog(MXEnums.ActionEnum.Edit.ToString(), "修改砸金蛋活动,主键为" + zjdid); //记录日志
                JscriptMsg("修改砸金蛋活动成功!", "zjdlist.aspx", "Success");
            }
            else if (type == "add")
            {
                info.wid        = weixin.id;
                info.createDate = DateTime.Now;
                //1新增主表
                int id = infobll.Add(info);

                //2新增奖项表
                EditAwardItem(id);
                //3 新增回复规则表
                AddRule(weixin.id, id);
                AddAdminLog(MXEnums.ActionEnum.Add.ToString(), "添加砸金蛋活动,主键为" + id); //记录日志
                JscriptMsg("添加砸金蛋活动成功!", "zjdlist.aspx", "Success");
            }
        }
Ejemplo n.º 26
0
        public void Handle(GetPagedOrderListRequest message)
        {
            var orderService = new HotelOrderService();
            var hotelService = new Application.Service.HotelService();
            int totalCount   = 0;

            var orderList = orderService.GetList(message.PageSize, message.Page, message.Where, message.Orderby,
                                                 out totalCount);

            if (orderList != null && orderList.Tables.Count > 0 && orderList.Tables[0].Rows.Count > 0)
            {
                orderList.Tables[0].Columns.Add("isRefund", typeof(string));

                orderList.Tables[0].Columns.Add("hotelName", typeof(string));
                orderList.Tables[0].Columns.Add("totalPrice", typeof(decimal));
                orderList.Tables[0].Columns.Add("statusName", typeof(string));
                orderList.Tables[0].Columns.Add("strisRefund", typeof(string));

                int count = orderList.Tables[0].Rows.Count;
                for (int i = 0; i < count; i++)
                {
                    var dr = orderList.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 refundOrder = new RefundOrderService().GetModel(o => o.OrderId == id && o.HotelId == hotelId);
                        if (refundOrder != 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"] = hotelService.GetModel(hotelId).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;
                }
                orderList.AcceptChanges();
            }

            var response = new GetPagedOrderListResponse()
            {
                TotalCount = totalCount,
                OrderList  = orderList
            };

            _bus.Reply(response);
        }
Ejemplo n.º 27
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);
        }