Exemple #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);
        }
Exemple #2
0
        public static ArrayList QueryEventJdList(string emcode)
        {
            ArrayList            r    = new ArrayList();
            Sys_WorkEventBll     sweb = new Sys_WorkEventBll();
            List <Sys_WorkEvent> lswe = new List <Sys_WorkEvent>();
            SessionUserValidate  iv   = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                r.Add(iv.badstr);
                lswe = sweb.QueryList(" and emcode='" + emcode + "'");
                if (lswe != null)
                {
                    foreach (Sys_WorkEvent s in lswe)
                    {
                        ArrayList al = new ArrayList();
                        al.Add(s.wcode);
                        al.Add(s.wname);
                        r.Add(al);
                    }
                }
            }
            else
            {
                r.Add(iv.badstr);
            }
            return(r);
        }
Exemple #3
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);
        }
Exemple #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);
        }
Exemple #5
0
        public static string DelEventJd(string wcode)
        {
            string              r    = "";
            Sys_WorkEventBll    sweb = new Sys_WorkEventBll();
            SessionUserValidate iv   = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                if (sweb.Delete(wcode))
                {
                    r = "S";
                }
                else
                {
                    r = "F";
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }