Ejemplo n.º 1
0
        public static string DelProductionImg(string pid)
        {
            string r = "";
            SessionUserValidate iv = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                string[] arr = pid.Split('|');
                if (bgpb.UpRemarkImg(arr[2], Convert.ToInt32(arr[0]), "", arr[1]))
                {
                    //VProductions vps = new VProductions();
                    //vps.htmtext = bitb.MgItemProductionHtml(sid, Convert.ToInt32(gnum), "0006");
                    //vps.gnum = Convert.ToInt32(gnum);
                    //vps.vtype = "s";
                    //vps.sid = sid;
                    //vps.id = sid + gnum + "s";
                    //vpb.Add(vps);
                    r = "S";
                }
                else
                {
                    r = "F";
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string r = "";
            SessionUserValidate  iv   = SysValidateBll.ValidateSession();
            B_GroupProductionBll bmib = new B_GroupProductionBll();
            BusiInvTempBll       bitb = new BusiInvTempBll();
            VProductionsBll      vpb  = new VProductionsBll();

            if (iv.f)
            {
                HttpFileCollection files   = Request.Files;
                string             sid     = Request.QueryString["sid"];
                string             gnum    = Request.QueryString["gnum"];
                string             ptype   = Request.QueryString["ptype"];
                string             gurl    = "";
                string             newname = DateTime.Now.ToString("yyyyMMddhhmmssfff");
                UpFile             uf      = new UpFile();
                string             url     = "/UpFile/ImageRemark/";
                string             ur      = uf.UpImage(files[0], newname, url, 10240000);
                if (ur.Length > 1)
                {
                    gurl = url + ur;

                    if (bmib.UpRemarkImg(sid, Convert.ToInt32(gnum), gurl, ptype))
                    {
                        //VProductions vps = new VProductions();
                        //vps.htmtext = bitb.MgItemProductionHtml(sid, Convert.ToInt32(gnum), "0006");
                        //vps.gnum = Convert.ToInt32(gnum);
                        //vps.vtype = "s";
                        //vps.sid = sid;
                        //vps.id = sid + gnum + "s";
                        //vpb.Add(vps);
                        r = "S";
                    }
                    else
                    {
                        r = "F";
                    }
                }
                else
                {
                    r = ur;
                }
            }
            else
            {
                r = iv.badstr;
            }
            Response.Write("{  msg:'" + r + "'}");
            Response.End();
        }