Пример #1
0
        public static string InitWButton(string wcode, string bcode)
        {
            string              r    = "";
            Sys_WorkEventBll    sweb = new Sys_WorkEventBll();
            Sys_WorkEvent       swe  = new Sys_WorkEvent();
            Sys_ButtonBll       sbb  = new Sys_ButtonBll();
            Sys_Button          sb   = new Sys_Button();
            SessionUserValidate iv   = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                if (bcode == "" || bcode == null)
                {
                    swe      = sweb.Query(" and wcode='" + wcode + "'");
                    sb.id    = 0;
                    sb.bname = "";
                    sb.bcode = sbb.CreateCode().ToString().PadLeft(4, '0');
                    sb.wname = swe.wname == null ? "" : swe.wname;
                    sb.wcode = swe.wcode == null ? "" : swe.wcode;
                }
                else
                {
                    sb = sbb.Query(" and bcode='" + bcode + "'");
                }
                r = js.Serialize(sb);
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
Пример #2
0
        public static string InitEventJd(string emcode, string wcode)
        {
            string              r    = "";
            Sys_WorkEventBll    sweb = new Sys_WorkEventBll();
            Sys_WorkEvent       swe  = new Sys_WorkEvent();
            SessionUserValidate iv   = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                if (wcode == "")
                {
                    swe.emcode = emcode;
                    swe.wcode  = sweb.CreateCode().ToString().PadLeft(4, '0');
                    swe.id     = 0;
                    swe.wattr  = 2;
                }
                else
                {
                    swe = sweb.Query(" and wcode='" + wcode + "'");
                }
                r = js.Serialize(swe);
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
Пример #3
0
        public static ArrayList QueryOverOrderFlowTj(string otype)
        {
            ArrayList            r    = new ArrayList();
            List <Sys_WorkEvent> lswf = bwfb.QuerySingleWorkFlow(otype);

            if (lswf != null)
            {
                r.Add("S");
                for (int i = 0; i < lswf.Count; i++)
                {
                    ArrayList     al  = new ArrayList();
                    Sys_WorkEvent swe = lswf[i];
                    al.Add(swe.wname);
                    DataTable dt = tsb.QueryList("View_CB_UnOrderProcess", " * ", " and wcode='" + swe.wcode + "' and getdate()>wcyctime and wcyctime<>''", "");
                    if (dt != null)
                    {
                        al.Add(dt.Rows.Count);
                    }
                    else
                    {
                        al.Add(0);
                    }
                    r.Add(al);
                }
            }
            return(r);
        }
Пример #4
0
        public static string SaveEventJd(string emrcode, string jdcode, string wattrex, string wcondtion, string wcycletime, string wemcode, string wemname, string wid, string wname, string wprewcode, string wrwcode, string wrwtype, string wtype)
        {
            string              r    = "";
            Sys_WorkEventBll    sweb = new Sys_WorkEventBll();
            Sys_WorkEvent       swe  = new Sys_WorkEvent();
            SessionUserValidate iv   = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                swe.emcode     = wemcode;
                swe.wcode      = jdcode;
                swe.wcondtion  = wcondtion;
                swe.wname      = wname;
                swe.wnextwcode = "";
                swe.wprewcode  = wprewcode;
                swe.wrwcode    = wrwcode;
                swe.wattr      = Convert.ToInt32(wtype);
                swe.wcycletime = Convert.ToInt32(wcycletime);
                swe.wremcode   = emrcode;
                swe.wattrex    = wattrex;
                swe.wrwtype    = wrwtype;
                if (wid == "0")
                {
                    if (sweb.Add(swe) > 0)
                    {
                        r = "S";
                    }
                    else
                    {
                        r = "F";
                    }
                }
                else
                {
                    if (sweb.Update(swe))
                    {
                        r = "S";
                    }
                    else
                    {
                        r = "F";
                    }
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }