Пример #1
0
        public static Area Get(int id)
        {
            Area       item;
            AreaEntity entity;

            entity = AreaDao.Get(id);
            item   = AreaMapper.Get(entity);

            return(item);
        }
Пример #2
0
        public void TestGetPage()
        {
            IAreaDao area  = new AreaDao();
            int      count = 0;
            IList <TravelAgent.Model.Area> list = area.Get("", 2, 10, out count);

            foreach (TravelAgent.Model.Area item in list)
            {
                Console.WriteLine(item.ShortName);
            }
        }
Пример #3
0
        public void Add()
        {
            IAreaDao area = new AreaDao();
            IList <TravelAgent.Model.Area> list = area.Get("Pid = 510000");

            //Assert.IsNotNull(list);
            foreach (TravelAgent.Model.Area item in list)
            {
                Console.WriteLine(item.Name);
            }
        }
Пример #4
0
 public Area GetArea(Expression <Func <Area, bool> > criteria)
 {
     return(AreaDao.Get(criteria));
 }
Пример #5
0
 public Area GetArea(int id)
 {
     return(AreaDao.Get(id));
 }
Пример #6
0
        public bool CodigoAreaExiste(string codigo, int idEmpresa)
        {
            Area area = AreaDao.Get(x => x.Codigoarea == codigo && x.Idempresa == idEmpresa);

            return(area != null);
        }