예제 #1
0
        public List <tbl_Mod> GetModByBoxCode(string boxcode)
        {
            BoxRepository boxRepo = new BoxRepository();
            var           boxes   = boxRepo.SearchFor(o => o.Box_Code == boxcode).SingleOrDefault();

            if (boxes != null)
            {
                var mods = boxes.tbl_Mod.OrderBy(o => o.Mod_Pos);
                if (mods != null)
                {
                    return(mods.ToList());
                }
                else
                {
                    return(new List <tbl_Mod>());
                }
            }
            else
            {
                return(new List <tbl_Mod>());
            }
        }
예제 #2
0
        public List <tbl_Mod> GetModByBoxId(int boxid)
        {
            BoxRepository boxRepo = new BoxRepository();

            return(boxRepo.Find(boxid).tbl_Mod.ToList());
        }