Example #1
0
        public static ArrayList QueryList(string mpcode)
        {
            ArrayList           r   = new ArrayList();
            Sys_MenuBll         sdb = new Sys_MenuBll();
            SqlCondtion         sc  = new SqlCondtion();
            SessionUserValidate iv  = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                r.Add(iv.badstr);
                StringBuilder where = new StringBuilder();
                where.Append(" and mpcode ='" + mpcode + "'");
                where.Append(sc.GetSqlWhere(" mshow ", "True", "", ""));
                where.Append(" order by msort");
                List <Sys_Menu> lsm = sdb.QueryList(where.ToString());
                if (lsm != null)
                {
                    foreach (Sys_Menu s in lsm)
                    {
                        ArrayList al = new ArrayList();
                        al.Add(s.mcode);
                        al.Add(s.mname);
                        al.Add(s.mhaschild);
                        r.Add(al);
                    }
                }
            }
            else
            {
                r.Add(iv.badstr);
            }
            return(r);
        }
Example #2
0
        public static ArrayList QueryListFyJcT(string curpage, string pagesize)
        {
            ArrayList                r    = new ArrayList();
            Sys_SizeTransformBll     stfb = new Sys_SizeTransformBll();
            List <Sys_SizeTransform> lsf  = new List <Sys_SizeTransform>();
            SqlCondtion              sc   = new SqlCondtion();
            SessionUserValidate      iv   = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                r.Add(iv.badstr);
                int rcount = 0;
                int pcount = 0;
                StringBuilder where = new StringBuilder();
                where.Append(sc.GetSqlWhere(" jtype ", "套", "", ""));
                if (iv.u.rcode == "xtgl")
                {
                }
                else
                {
                    where.Append(" and dcode='" + iv.u.dcode.Substring(0, 8) + "'");
                }
                lsf = stfb.QueryList(Convert.ToInt32(curpage), Convert.ToInt32(pagesize), where.ToString(), "id desc", ref rcount, ref pcount);
                if (lsf != null)
                {
                    r.Add(pcount);
                    foreach (Sys_SizeTransform s in lsf)
                    {
                        ArrayList al = new ArrayList();
                        al.Add(s.jcode);
                        al.Add(s.jname);
                        al.Add(s.jtype);
                        al.Add(s.mtg);
                        al.Add(s.mtk);
                        al.Add(s.mth);
                        al.Add(s.mtsl);
                        al.Add(s.lbg);
                        al.Add(s.lbk);
                        al.Add(s.lbh);
                        al.Add(s.lbsl);
                        al.Add(s.stlg);
                        al.Add(s.stlk);
                        al.Add(s.stlh);
                        al.Add(s.stlsl);
                        al.Add(s.ltlg);
                        al.Add(s.ltlk);
                        al.Add(s.ltlh);
                        al.Add(s.ltlsl);
                        r.Add(al);
                    }
                }
            }
            else
            {
                r.Add(iv.badstr);
            }
            return(r);
        }
Example #3
0
        public static ArrayList QueryList(string account, string curpage, string pagesize, string udepname, string uname)
        {
            ArrayList           r   = new ArrayList();
            Sys_UserBll         seb = new Sys_UserBll();
            Sys_RoleBll         srb = new Sys_RoleBll();
            SqlCondtion         sc  = new SqlCondtion();
            SessionUserValidate iv  = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                r.Add(iv.badstr);
                StringBuilder where = new StringBuilder();
                where.Append(sc.GetSqlWhere(" uname ", account, "l", ""));
                where.Append(sc.GetSqlWhere(" dname ", udepname, "l", ""));
                where.Append(sc.GetSqlWhere(" ename ", uname, "l", ""));
                //where.Append(sc.GetSqlWhere(" estate ", "true", "", ""));
                int       rcount = 0;
                int       pcount = 0;
                DataTable ls     = seb.QueryTable(Convert.ToInt32(curpage), Convert.ToInt32(pagesize), where.ToString(), "id desc", ref rcount, ref pcount);
                if (ls != null)
                {
                    r.Add(pcount);
                    foreach (DataRow s in ls.Rows)
                    {
                        Sys_Role  sr = srb.Query(" and rcode='" + s["rcode"].ToString() + "'");
                        ArrayList al = new ArrayList();
                        al.Add(s["id"].ToString());
                        al.Add(s["uname"].ToString());
                        al.Add(s["ename"].ToString());
                        al.Add(s["dname"].ToString());
                        al.Add(sr == null?"":sr.rname);
                        al.Add(s["ulogin"].ToString() == "True"?"启用":"停用");
                        r.Add(al);
                    }
                }
            }
            else
            {
                r.Add(iv.badstr);
            }
            return(r);
        }
Example #4
0
        public static ArrayList CustQueryListFyJcDoor(string curpage, string pagesize)
        {
            ArrayList                r    = new ArrayList();
            Sys_SizeTransformBll     stfb = new Sys_SizeTransformBll();
            List <Sys_SizeTransform> lsf  = new List <Sys_SizeTransform>();
            SqlCondtion              sc   = new SqlCondtion();
            SessionUserValidate      iv   = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                r.Add(iv.badstr);
                int rcount = 0;
                int pcount = 0;
                StringBuilder where = new StringBuilder();
                where.Append(sc.GetSqlWhere(" jtype ", "门扇", "", ""));
                where.Append(" and dcode='" + iv.u.dcode.Substring(0, 8) + "'");
                lsf = stfb.QueryList(Convert.ToInt32(curpage), Convert.ToInt32(pagesize), where.ToString(), "id desc", ref rcount, ref pcount);
                if (lsf != null)
                {
                    r.Add(pcount);
                    foreach (Sys_SizeTransform s in lsf)
                    {
                        ArrayList al = new ArrayList();
                        al.Add(s.jcode);
                        al.Add(s.jname);
                        al.Add(s.dg);
                        al.Add(s.dk);
                        al.Add(s.dh);
                        al.Add(s.mcomputermethod == "比例" ? "比例" : "固定");
                        al.Add(s.d1sl);
                        al.Add(s.d2sl);
                        al.Add(s.d1k);
                        al.Add(s.d2k);
                        r.Add(al);
                    }
                }
            }
            else
            {
                r.Add(iv.badstr);
            }
            return(r);
        }