Example #1
0
        public static ArrayList QueryMaterialListCategoryByBdcode(string btype, string mpcode)
        {
            ArrayList r = new ArrayList();
            Sys_MaterialCategoryBll     sub = new Sys_MaterialCategoryBll();
            T_StatisticsBll             tsb = new T_StatisticsBll();
            List <Sys_MaterialCategory> lsr = new List <Sys_MaterialCategory>();
            SessionUserValidate         iv  = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                r.Add(iv.badstr);
                lsr = sub.QueryList(" and mcpcode='" + mpcode + "' and dcode='" + iv.u.dcode.Substring(0, 8) + "'");
                if (lsr != null)
                {
                    foreach (Sys_MaterialCategory s in lsr)
                    {
                        ArrayList al = new ArrayList();
                        if (tsb.BaseExists("Sys_RBrandsMaterial", " and pbcode='" + btype + "' and mpcode like'" + s.mccode + "%' "))
                        {
                            al.Add(s.mccode);
                            al.Add(s.mcname);
                            al.Add(s.mcstate);
                            r.Add(al);
                        }
                    }
                }
            }
            else
            {
                r.Add(iv.badstr);
            }
            return(r);
        }
Example #2
0
        public static ArrayList CustQueryListMaterialCategoryByType(string mtype, string mpcode)
        {
            ArrayList r = new ArrayList();
            Sys_MaterialCategoryBll     sub = new Sys_MaterialCategoryBll();
            List <Sys_MaterialCategory> lsr = new List <Sys_MaterialCategory>();
            SessionUserValidate         iv  = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                r.Add(iv.badstr);
                lsr = sub.QueryList(" and mtype='" + mtype + "' and mcpcode='" + mpcode + "' and dcode='" + iv.u.dcode.Substring(0, 8) + "'");
                if (lsr != null)
                {
                    foreach (Sys_MaterialCategory s in lsr)
                    {
                        ArrayList al = new ArrayList();
                        al.Add(s.mccode);
                        al.Add(s.mcname);
                        al.Add(s.mcstate);
                        r.Add(al);
                    }
                }
            }
            else
            {
                r.Add(iv.badstr);
            }
            return(r);
        }