Пример #1
0
        public static List <Sector> GetAll(int limit = -1)
        {
            List <SectorDTO> sectorsDto = SectorDAL.GetAll(limit);

            List <Sector> sectors = new List <Sector>();

            foreach (SectorDTO sector in sectorsDto)
            {
                sectors.Add(new Sector(sector));
            }

            return(sectors);
        }
Пример #2
0
 public static DataTable SelectAll()
 {
     try
     {
         DataTable dt;
         dt = SectorDAL.SelectAll();
         return(dt);
     }
     catch (ExceptionDAL dalex)
     {
         throw new ExceptionBLL(dalex, dalex.Message);
     }
 }
Пример #3
0
        public static DataRow Select(int IdSector)
        {
            DataRow dr;

            try
            {
                return(dr = SectorDAL.Select(IdSector).Rows[0]);
            }


            catch (ExceptionDAL dalex)
            {
                throw new ExceptionBLL(dalex, dalex.Message);
            }
        }
Пример #4
0
 public static bool Remove(int sectorId, int userId)
 {
     return(SectorDAL.Remove(sectorId, userId));
 }
Пример #5
0
 public static bool Update(Sector sector)
 {
     return(SectorDAL.Update(new SectorDTO(sector)));
 }
Пример #6
0
 public static bool Save(Sector sector)
 {
     return(SectorDAL.Save(new SectorDTO(sector)));
 }
Пример #7
0
 public static Sector GetSectorById(int id)
 {
     return(new Sector(SectorDAL.GetById(id)));
 }
Пример #8
0
 public SectorContainer()
 {
     _sectorDAL = new SectorDAL();
 }
Пример #9
0
 public static bool Update(SectorModel sectorModel)
 {
     return(SectorDAL.Update(new SectorDTO(sectorModel)));
 }
Пример #10
0
 public static bool Save(SectorModel sectorModel)
 {
     return(SectorDAL.Save(new SectorDTO(sectorModel)));
 }