Esempio n. 1
0
        public static string MBatchFireEventBtn(string sid, string bms)
        {
            string              r    = "";
            Sys_ButtonBll       sbb  = new Sys_ButtonBll();
            BusiWorkFlowBll     bwfb = new BusiWorkFlowBll();
            CB_OrderFlowBll     cofb = new CB_OrderFlowBll();
            SessionUserValidate iv   = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                string[] sids = sid.Split(';');
                if (sids.Length > 0)
                {
                    foreach (string id in sids)
                    {
                        string     wcode = cofb.QueryCurWorkFlow(id);
                        Sys_Button sbt   = sbb.Query(" and wcode='" + wcode + "' and battr='T'");
                        try
                        {
                            if (bwfb.FireEventBtn(id, sbt, 1, bms, iv.u.ename) > 0)
                            {
                                r = "S";
                            }
                        }
                        catch
                        {
                            r = "F";
                        }
                    }
                }
            }
            else
            {
                r = iv.badstr;;
            }
            return(r);
        }
Esempio n. 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string r = "", sid = "", fname = "", dtype = "";
            SessionUserValidate iv = SysValidateBll.ValidateSession();
            B_DesignPlanBll     bmib = new B_DesignPlanBll();
            CB_OrderFlowBll     cofb = new CB_OrderFlowBll();

            if (iv.f)
            {
                HttpFileCollection files = Request.Files;
                if (Request.QueryString["sid"] != null)
                {
                    sid = Request.QueryString["sid"];
                }
                if (Request.QueryString["fname"] != null)
                {
                    fname = Request.QueryString["fname"];
                }
                if (Request.QueryString["dtype"] != null)
                {
                    dtype = Request.QueryString["dtype"];
                }
                string       newname = DateTime.Now.ToString("yyyyMMddhhmmssfff");
                UpFile       uf      = new UpFile();
                ArrayList    efile   = new ArrayList();
                B_DesignPlan spi     = new B_DesignPlan();
                string       url     = "/UpFile/DesignFile/";
                string       ur      = uf.UpFiles(files[0], newname, url, 102400000);
                if (ur.Length > 1)
                {
                    string xname = uf.GetFileExName(files[0]);
                    spi.osid   = sid;
                    spi.sid    = CommonBll.GetSid();
                    spi.maker  = iv.u.ename;
                    spi.dname  = fname + xname;
                    spi.durl   = url + ur;
                    spi.emcode = "";
                    spi.dtype  = dtype;
                    spi.rcode  = iv.u.rcode;
                    spi.wcode  = cofb.QueryCurWorkFlow(sid);
                    if (bmib.Add(spi) > 0)
                    {
                        r = "S";
                    }
                    else
                    {
                        r = "F";
                    }
                }
                else
                {
                    r = ur;
                }
            }
            else
            {
                r = iv.badstr;
            }
            Response.Write("{  msg:'" + r + "'}");
            Response.End();
        }