Ejemplo n.º 1
0
        public static ArrayList QueryListBackEvent(string bcode)
        {
            ArrayList            r   = new ArrayList();
            Sys_BackEventBll     sdb = new Sys_BackEventBll();
            List <Sys_BackEvent> lsb = new List <Sys_BackEvent>();
            SessionUserValidate  iv  = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                r.Add(iv.badstr);
                lsb = sdb.QueryList(" and bcode='" + bcode + "'");
                if (lsb != null)
                {
                    foreach (Sys_BackEvent s in lsb)
                    {
                        ArrayList al = new ArrayList();
                        al.Add(s.ecode);
                        al.Add(s.bname);
                        al.Add(s.ename);
                        al.Add(s.esort);
                        r.Add(al);
                    }
                }
            }
            else
            {
                r.Add(iv.badstr);
            }
            return(r);
        }
Ejemplo n.º 2
0
        public static string InitBackEvent(string bcode, string ecode)
        {
            string              r    = "";
            Sys_BackEventBll    sbeb = new Sys_BackEventBll();
            Sys_BackEvent       sbe  = new Sys_BackEvent();
            Sys_ButtonBll       sbb  = new Sys_ButtonBll();
            Sys_Button          sb   = new Sys_Button();
            SessionUserValidate iv   = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                if (ecode == "" || ecode == null)
                {
                    sb        = sbb.Query(" and bcode='" + bcode + "'");
                    sbe.id    = 0;
                    sbe.ename = "";
                    sbe.ecode = sbeb.CreateCode().ToString().PadLeft(4, '0');
                    sbe.bname = sb.bname == null ? "" : sb.bname;
                    sbe.bcode = sb.bcode == null ? "" : sb.bcode;
                }
                else
                {
                    sbe = sbeb.Query(" and ecode='" + ecode + "'");
                }
                r = js.Serialize(sbe);
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
Ejemplo n.º 3
0
        public static string SaveTBackEvent(string htbcode, string htbname, string htcode, string thid, string htname,
                                            string htsort, string htsource, string htsql, string htstate)
        {
            string              r   = "";
            Sys_BackEventBll    sbb = new Sys_BackEventBll();
            Sys_BackEvent       sb  = new Sys_BackEvent();
            SessionUserValidate iv  = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                sb.bcode  = htbcode;
                sb.bname  = htbname;
                sb.ename  = htname;
                sb.ecode  = htcode;
                sb.esort  = htsort;
                sb.source = htsource;
                sb.ebody  = htsql;
                sb.estate = htstate;
                if (thid == "0")
                {
                    if (sbb.Add(sb) > 0)
                    {
                        r = "S";
                    }
                    else
                    {
                        r = "F";
                    }
                }
                else
                {
                    if (sbb.Update(sb))
                    {
                        r = "S";
                    }
                    else
                    {
                        r = "F";
                    }
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
Ejemplo n.º 4
0
        public static string SaveBackEvent(string hbcode, string hbname, string hbstate, string hcode, string hid, string hname, string hsql, string hsort, string hsoure)
        {
            string              r   = "";
            Sys_BackEventBll    sbb = new Sys_BackEventBll();
            Sys_BackEvent       sb  = new Sys_BackEvent();
            SessionUserValidate iv  = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                sb.bcode  = hcode;
                sb.bname  = hname;
                sb.ename  = hbname;
                sb.ecode  = hbcode;
                sb.esort  = hsort;
                sb.source = hsoure;
                sb.ebody  = hsql.Replace("\n", " ");
                sb.estate = hbstate;
                if (hid == "0")
                {
                    if (sbb.Add(sb) > 0)
                    {
                        r = "S";
                    }
                    else
                    {
                        r = "F";
                    }
                }
                else
                {
                    if (sbb.Update(sb))
                    {
                        r = "S";
                    }
                    else
                    {
                        r = "F";
                    }
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
Ejemplo n.º 5
0
        public static string DelBackEvent(string ecode)
        {
            string              r   = "";
            Sys_BackEventBll    sdb = new Sys_BackEventBll();
            SessionUserValidate iv  = SysValidateBll.ValidateSession();

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