Esempio n. 1
0
        //public string UrlRef
        //{
        //    get
        //    {
        //        string _urlRef = "";
        //        if (!string.IsNullOrEmpty(Request.QueryString["urlref"]))//多图上传
        //        {
        //            _urlRef = Request.QueryString["urlref"].ToLower();
        //        }
        //        else
        //        {
        //            _urlRef = Request.UrlReferrer == null ? "" : Request.UrlReferrer.ToString().ToLower();
        //        }
        //        return _urlRef;
        //    }
        //}
        //private bool IsBar()
        //{
        //    bool flag = false;
        //    if (!string.IsNullOrEmpty(UrlRef))
        //    {
        //        flag = (UrlRef.Contains("/pclass?") || UrlRef.Contains("/pitem?") || UrlRef.Contains("/editcontent?"));
        //    }
        //    return flag;
        //}
        private M_GuestBookCate GetBarModel(UploadConfig config)
        {
            M_GuestBookCate model  = null;
            B_Guest_Bar     barBll = new B_Guest_Bar();

            if (config.SourceUrl.Contains("/pclass?"))
            {
                int cateid = DataConverter.CLng(StrHelper.GetValFromUrl(config.SourceUrl, "id"));
                model = cateBll.SelReturnModel(cateid);
            }
            else
            {
                int cateid = 0;
                int postid = DataConverter.CLng(StrHelper.GetValFromUrl(config.SourceUrl, "cateid"));
                if (postid > 0)
                {
                    cateid = barBll.SelCateIDByPost(postid);
                }
                else
                {
                    cateid = DataConverter.CLng(StrHelper.GetValFromUrl(config.SourceUrl, "cateid"));
                }
                model = cateBll.SelReturnModel(cateid);
            }
            return(model);
        }
Esempio n. 2
0
 public UploadHandler(HttpContext context, UploadConfig config) : base(context)
 {
     this.UploadConfig = config;
     this.Result       = new UploadResult()
     {
         State = UploadState.Unknown
     };
 }