コード例 #1
0
        public static ArrayList QueryListEventMenuByAttr(string eattr)
        {
            ArrayList            r    = new ArrayList();
            StringBuilder        sql  = new StringBuilder();
            Sys_EventMenuBll     semb = new Sys_EventMenuBll();
            List <Sys_EventMenu> lsem = new List <Sys_EventMenu>();
            SessionUserValidate  iv   = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                r.Add(iv.badstr);
                sql.Append(" and emattrex='" + eattr + "'");
                lsem = semb.QueryList(sql.ToString());
                if (lsem != null)
                {
                    foreach (Sys_EventMenu s in lsem)
                    {
                        ArrayList al = new ArrayList();
                        al.Add(s.emcode);
                        al.Add(s.emname);
                        r.Add(al);
                    }
                }
            }
            else
            {
                r.Add(iv.badstr);;
            }
            return(r);
        }
コード例 #2
0
        public static ArrayList NQueryListEventMenu(string ptype, string pvalue)
        {
            ArrayList            r    = new ArrayList();
            StringBuilder        sql  = new StringBuilder();
            Sys_EventMenuBll     semb = new Sys_EventMenuBll();
            List <Sys_EventMenu> lsem = new List <Sys_EventMenu>();
            SessionUserValidate  iv   = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                r.Add(iv.badstr);
                if (iv.u.rcode != "xtgl")
                {
                    sql.Append(" and dcode='" + iv.u.dcode.Substring(0, 8) + "'");
                }
                if (ptype == "f")
                {
                    sql.Append(" and isflow='true'");
                }
                if (ptype == "l")
                {
                    sql.Append(" and islist='true'");
                }
                if (ptype == "t")
                {
                    sql.Append(" and isspe='true'");
                }
                if (ptype == "e")
                {
                    sql.Append(" and isexp=" + pvalue + " ");
                }
                if (ptype == "bb")
                {
                    sql.Append(" and isbb='true'");
                }
                lsem = semb.QueryList(sql.ToString());
                if (lsem != null)
                {
                    foreach (Sys_EventMenu s in lsem)
                    {
                        ArrayList al = new ArrayList();
                        al.Add(s.emcode);
                        al.Add(s.emname);
                        r.Add(al);
                    }
                }
            }
            else
            {
                r.Add(iv.badstr);;
            }
            return(r);
        }
コード例 #3
0
        public static ArrayList QueryListEventMenu(string e, string f, string l, string t)
        {
            ArrayList            r    = new ArrayList();
            StringBuilder        sql  = new StringBuilder();
            Sys_EventMenuBll     semb = new Sys_EventMenuBll();
            List <Sys_EventMenu> lsem = new List <Sys_EventMenu>();
            SessionUserValidate  iv   = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                r.Add(iv.badstr);
                if (iv.u.rcode != "xtgl")
                {
                    sql.Append(" and dcode='" + iv.u.dcode.Substring(0, 8) + "'");
                }
                if (f != "")
                {
                    sql.Append(" and isflow='true'");
                }
                if (l != "")
                {
                    sql.Append(" and islist='true'");
                }
                if (t != "")
                {
                    sql.Append(" and isspe='true'");
                }
                if (e != "")
                {
                    sql.Append(" and isexp=" + Convert.ToInt32(e) + "");
                }
                lsem = semb.QueryList(sql.ToString());
                if (lsem != null)
                {
                    foreach (Sys_EventMenu s in lsem)
                    {
                        ArrayList al = new ArrayList();
                        al.Add(s.emcode);
                        al.Add(s.emname);
                        r.Add(al);
                    }
                }
            }
            else
            {
                r.Add(iv.badstr);;
            }
            return(r);
        }
コード例 #4
0
        public static ArrayList CustQueryMainEventMenu(string etype)
        {
            ArrayList            r    = new ArrayList();
            StringBuilder        sql  = new StringBuilder();
            Sys_EventMenuBll     semb = new Sys_EventMenuBll();
            List <Sys_EventMenu> lsem = new List <Sys_EventMenu>();
            SessionUserValidate  iv   = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                r.Add(iv.badstr);
                string where = "";
                if (iv.u.rcode == "xtgl")
                {
                    where = " and emattr='a'";
                }
                else
                {
                    where = " and (emattr='a' or dcode='" + iv.u.dcode.Substring(0, 8) + "')";
                }
                lsem = semb.QueryList(" and emtype='" + etype + "'" + where);
                if (lsem != null)
                {
                    foreach (Sys_EventMenu s in lsem)
                    {
                        ArrayList al = new ArrayList();
                        al.Add(s.emcode);
                        al.Add(s.emname);
                        r.Add(al);
                    }
                }
            }
            else
            {
                r.Add(iv.badstr);;
            }
            return(r);
        }