Beispiel #1
0
        public static string LoadMeasureImg(string sid)
        {
            string r = "";
            SessionUserValidate iv = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                B_MeasureImg bmi = bmib.Query(" and (csid='" + sid + "' or csid =(select csid from dbo.B_SaleOrder where osid='" + sid + "'))");
                r = js.Serialize(bmi);
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string r = "";
            SessionUserValidate iv   = SysValidateBll.ValidateSession();
            B_MeasureImgBll     bmib = new B_MeasureImgBll();

            if (iv.f)
            {
                HttpFileCollection files   = Request.Files;
                string             csid    = Request.QueryString["sid"];
                string             clname  = Request.QueryString["clname"];
                string             newname = DateTime.Now.ToString("yyyyMMddhhmmssfff");
                UpFile             uf      = new UpFile();
                ArrayList          efile   = new ArrayList();
                B_MeasureImg       spi     = new B_MeasureImg();

                string url = "/UpFile/ImageMeasure/";
                string ur  = uf.UpImage(files[0], newname, url, 10240000);
                if (ur.Length > 1)
                {
                    spi.csid    = csid;
                    spi.maker   = iv.u.ename;
                    spi.imgname = clname;
                    spi.url     = url + ur;
                    spi.cdate   = DateTime.Now.ToString();
                    if (bmib.Add(spi) > 0)
                    {
                        r = "S";
                    }
                    else
                    {
                        r = "F";
                    }
                }
                else
                {
                    r = ur;
                }
            }
            else
            {
                r = iv.badstr;
            }
            Response.Write("{  msg:'" + r + "'}");
            Response.End();
        }