コード例 #1
0
        /// <summary>
        /// 公告提交
        /// </summary>
        /// <returns></returns>
        public int NoticeSubmit()
        {
            int    _id         = FormString.IntSafeQ("_id");
            string _title      = FormString.SafeQ("_title");
            string _content    = FormString.SafeQNo("_content", 1000000);
            int    _sort       = FormString.IntSafeQ("_sort");
            int    _isactive   = FormString.IntSafeQ("_isactive");
            int    _systemtype = FormString.IntSafeQ("_systemtype");
            int    _noticetype = FormString.IntSafeQ("_noticetype");

            B2BNoticeEntity _entity = B2BNoticeBLL.Instance.GetB2BNotice(_id);

            _entity.Id            = _id;
            _entity.Title         = _title;
            _entity.NoticeContent = _content;
            _entity.Sort          = _sort;
            _entity.IsActive      = _isactive;
            _entity.CreateTime    = StringUtils.GetDbDateTime(FormString.SafeQ("_creatime"));
            _entity.ShowTime      = StringUtils.GetDbDateTime(FormString.SafeQ("_showtime"));
            _entity.EndTime       = StringUtils.GetDbDateTime(FormString.SafeQ("_endtime"));
            _entity.SystemType    = _systemtype;
            _entity.NoticeType    = _noticetype;

            int _result = B2BNoticeBLL.Instance.AddB2BNotice(_entity);

            return(_result);
        }
コード例 #2
0
        public string CmsUpdateSubmit()
        {
            int    _cmsid          = FormString.IntSafeQ("cmsid");
            string _title          = FormString.SafeQ("title");
            string _templetcontent = FormString.SafeQNo("templetcontent", 1000000);
            int    _productnum     = FormString.IntSafeQ("productnum");
            int    _cmstype        = FormString.IntSafeQ("cmstype");
            int    _isactive       = FormString.IntSafeQ("isactive");

            CmsTempletEntity _entity = new CmsTempletEntity();

            _entity.Id             = _cmsid;
            _entity.Title          = _title;
            _entity.TempletContent = _templetcontent;
            _entity.ProductNum     = _productnum;
            _entity.CMSType        = _cmstype;
            _entity.CreateDate     = DateTime.Now;
            _entity.IsActive       = _isactive;

            int _count = CmsTempletBLL.Instance.UpdateCmsTemplet(_entity);

            if (_count > 0)
            {
                return(((int)CommonStatus.Success).ToString());
            }

            return(((int)CommonStatus.Fail).ToString());
        }
コード例 #3
0
        public string CmsComtentAdd()
        {
            string           _str         = FormString.SafeQ("str", 1000000);
            string           title        = FormString.SafeQ("title", 200);
            int              cmstyleid    = FormString.IntSafeQ("cmstyleid");
            int              cmsid        = FormString.IntSafeQ("cmsid", 0);
            string           cmscontent   = FormString.SafeQNo("cmscontent", 1000000);
            int              cmstempletid = FormString.IntSafeQ("cmstempletid");
            CmsContentEntity _cmsentity   = CmsContentBLL.Instance.GetCmsContent(cmsid);

            _cmsentity.Id           = cmsid;
            _cmsentity.CmsContent   = cmscontent;
            _cmsentity.CMSType      = cmstyleid;
            _cmsentity.CreateTime   = DateTime.Now;
            _cmsentity.IsActive     = 1;
            _cmsentity.Title        = title;
            _cmsentity.CmsTempletId = cmstempletid;
            int cmsidresult = CmsContentBLL.Instance.AddCmsContent(_cmsentity);

            if (cmsidresult > 0)
            {
                if (!string.IsNullOrEmpty(_str))
                {
                    int cmsproducts = CmsTemProductBLL.Instance.AddCmsProc(_str, cmsidresult);
                }
                return(((int)CommonStatus.Success).ToString());
            }


            return(((int)CommonStatus.Fail).ToString());
        }
コード例 #4
0
        /// <summary>
        /// 产品详情图片添加
        /// </summary>
        /// <returns></returns>
        public int ProductDetailPicsAdd()
        {
            int              _productExtId = FormString.IntSafeQ("productExtId");
            int              _pid          = FormString.IntSafeQ("pid");
            string           _detailDes    = FormString.SafeQNo("detailDes", 1000000);
            ProductExtEntity entity        = new ProductExtEntity();

            entity.Id            = _productExtId;
            entity.ProductId     = _pid;
            entity.DetailDescrip = _detailDes;
            return(ProductExtBLL.Instance.AddProductExt(entity));
        }
コード例 #5
0
        /// <summary>
        /// 购物指南添加
        /// </summary>
        /// <returns></returns>
        public int ShoppingDirectoryAdd()
        {
            string             _issuetitle   = FormString.SafeQ("issuetitle");
            string             _issuecontent = FormString.SafeQNo("issuecontent", 1000000);
            int                _isactive     = FormString.IntSafeQ("isactive");
            int                _classid      = FormString.IntSafeQ("classid");
            IssueContentEntity entity        = new IssueContentEntity();

            entity.IssueTitle   = _issuetitle;
            entity.IssueContent = _issuecontent;
            entity.IsActive     = _isactive;
            entity.ClassId      = _classid;

            return(IssueContentBLL.Instance.AddIssueContent(entity));
        }
コード例 #6
0
        public int WeChatUrlAdd()
        {
            string _redirecturl = StringUtils.SafeCodeSmall(FormString.SafeQNo("_url", 200));
            int    _urltype     = FormString.IntSafeQ("_urltype");
            string _remark      = FormString.SafeQ("_remark", 200);

            WeChatNavigationEntity _entity = WeChatNavigationBLL.Instance.GetNavigationByUrl(_redirecturl);

            if (_entity == null || _entity.Id == 0)
            {
                _entity.RedirectUrl = _redirecturl;
                _entity.Id          = WeChatNavigationBLL.Instance.AddWeChatNavigation(_entity);
            }
            _entity.WeChatUrlType = _urltype;
            _entity.Remark        = _remark;
            //_entity.WeChatUrl = string.Format(WeiXinConfig.URL_FORMAT_KHRedirect, WeiXinConfig.GetAppId(), System.Web.HttpContext.Current.Server.UrlEncode(SuperMarket.Core.ConfigCore.Instance.ConfigCommonEntity.WeChatWebUrl), _entity.Id);
            _entity.WeChatUrl = string.Format(WeiXinConfig.URL_WeiXin_Redirect, WeiXinConfig.GetAppId(), System.Web.HttpContext.Current.Server.UrlEncode(_redirecturl), _entity.Id);

            int _result = WeChatNavigationBLL.Instance.UpdateWeChatNavigation(_entity);

            return(_result);
        }
コード例 #7
0
        public int WeiXinQNewsSubmit()
        {
            int               _id         = FormString.IntSafeQ("_id");
            string            _title      = FormString.SafeQ("_title", 200);
            string            _content    = FormString.SafeQNo("_content", 1000000);
            int               _sort       = FormString.IntSafeQ("_sort");
            int               _isactive   = FormString.IntSafeQ("_isactive");
            int               _systemtype = FormString.IntSafeQ("_systemtype");
            int               _noticetype = FormString.IntSafeQ("_noticetype");
            string            _FromUrl    = FormString.SafeQ("FromUrl", 200);
            WeiXinQNewsEntity _entity     = WeiXinQNewsBLL.Instance.GetWeiXinQNews(_id);

            _entity.Id          = _id;
            _entity.Title       = _title;
            _entity.NewsContent = _content;
            _entity.CreateTime  = StringUtils.GetDbDateTime(FormString.SafeQ("_creatime"));
            _entity.NewsType    = _noticetype;
            _entity.FromUrl     = _FromUrl;
            int _result = WeiXinQNewsBLL.Instance.AddWeiXinQNews(_entity);

            return(_result);
        }
コード例 #8
0
        /// <summary>
        /// 发送给虚拟报价员用户访问的网址,待转发
        /// </summary>
        /// <returns></returns>
        public string SendQuoteUrl()
        {
            ResultObj _obj   = new ResultObj();
            int       memid  = FormString.IntSafeQ("memid");
            string    oldurl = StringUtils.SafeCodeSmall(FormString.SafeQNo("oldurl", 8000));

            if (!string.IsNullOrEmpty(oldurl))
            {
                VWMemberEntity member   = MemberBLL.Instance.GetVWMember(memid);
                string         tempcode = Server.UrlEncode(CryptDES.DESEncrypt(member.TimeStampTab));
                string         baseurl;
                Dictionary <string, string> nvc = new Dictionary <string, string>();
                StringUtils.ParseUrl(oldurl, out baseurl, out nvc);
                nvc.Remove("wechatcode");
                nvc.Add("tempcode", tempcode);
                string url = baseurl + "?";
                foreach (string key in nvc.Keys)
                {
                    url += "&" + key + "=" + nvc[key];
                }
                bool result = WeiXinCustomerBLL.Instance.SendCGUrlToManager(url, memid);
                if (result)
                {
                    _obj.Status = (int)CommonStatus.Success;
                }
                else
                {
                    _obj.Status = (int)CommonStatus.Fail;
                }
            }
            else
            {
                _obj.Status = (int)CommonStatus.Fail;
            }
            return(JsonJC.ObjectToJson(_obj));
        }