示例#1
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);
        }
示例#2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     gid = MXRequest.GetQueryInt("gid");
     fid = MXRequest.GetQueryInt("fid");
     if (!IsPostBack)
     {
         BLL.wx_fc_aboutWe awBll = new BLL.wx_fc_aboutWe();
         BLL.wx_fc_floor   fBll  = new BLL.wx_fc_floor();
         if (gid > 0)
         {
             Model.wx_fc_aboutWe awModel = awBll.GetModel(gid);
             address = awModel.address;
             name    = awModel.name;
             logourl = awModel.logoAddress;
             tel     = awModel.telephone;
             x       = awModel.latY;
             y       = awModel.lngX;
         }
         if (fid > 0)
         {
             Model.wx_fc_floor fModel = fBll.GetModel(fid);
             address = fModel.Address;
             name    = fModel.newsTitle;
             logourl = fModel.newsCover;
             y       = fModel.latY;
             x       = fModel.lngX;
         }
     }
 }
示例#3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     wid = MXRequest.GetQueryInt("wid");
     fid = MXRequest.GetQueryInt("fid");
     if (!IsPostBack)
     {
         BLL.wx_fc_aboutWe awBll = new BLL.wx_fc_aboutWe();
         aw = awBll.GetModelList(" fid=" + fid + " and wid=" + wid)[0];
     }
 }
示例#4
0
 private void ShowInfo(int _id)
 {
     Model.wx_fc_aboutWe model = bll.GetModel(_id);
     this.txtAddress.Text     = model.address;
     this.txtDetail.InnerText = model.newsDetail;
     this.txtLatXPoint.Text   = model.lngX.ToString();
     this.txtLngYPoint.Text   = model.latY.ToString();
     this.txtLogo.Text        = model.logoAddress;
     this.imgLogo.ImageUrl    = model.logoAddress;
     this.txtMobilephone.Text = model.mobilephone;
     this.txtName.Text        = model.name;
     this.txtSort_id.Text     = model.sort_id.ToString();
     this.txtTelephone.Text   = model.telephone.ToString();
 }
示例#5
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);
        }