Esempio n. 1
0
        public static ArrayList QueryListUnit()
        {
            ArrayList           r   = new ArrayList();
            Sys_UnitBll         sub = new Sys_UnitBll();
            List <Sys_Unit>     lsr = new List <Sys_Unit>();
            SessionUserValidate iv  = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                r.Add(iv.badstr);
                string where = "";
                if (iv.u.rcode == "xtgl")
                {
                }
                else
                {
                    where = " and  dcode='" + iv.u.dcode.Substring(0, 8) + "'";
                }
                lsr = sub.QueryList(where);
                if (lsr != null)
                {
                    foreach (Sys_Unit s in lsr)
                    {
                        ArrayList al = new ArrayList();
                        al.Add(s.ucode);
                        al.Add(s.uname);
                        r.Add(al);
                    }
                }
            }
            else
            {
                r.Add(iv.badstr);
            }
            return(r);
        }
Esempio n. 2
0
        public static ArrayList QueryFyList(string curpage, string pagesize)
        {
            ArrayList           r   = new ArrayList();
            Sys_UnitBll         sub = new Sys_UnitBll();
            List <Sys_Unit>     lsu = new List <Sys_Unit>();
            SessionUserValidate iv  = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                string where = "";
                r.Add(iv.badstr);
                if (iv.u.rcode != "xtgl")
                {
                    where = " and  dcode='" + iv.u.dcode.Substring(0, 8) + "'";
                }
                int rcount = 0;
                int pcount = 0;
                lsu = sub.QueryList(Convert.ToInt32(curpage), Convert.ToInt32(pagesize), where, "id desc", ref rcount, ref pcount);
                if (lsu != null)
                {
                    r.Add(pcount);
                    foreach (Sys_Unit s in lsu)
                    {
                        ArrayList al = new ArrayList();
                        al.Add(s.ucode);
                        al.Add(s.uname);
                        r.Add(al);
                    }
                }
            }
            else
            {
                r.Add(iv.badstr);
            }
            return(r);
        }