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); }
public static DataTable SelectAll() { try { DataTable dt; dt = SectorDAL.SelectAll(); return(dt); } catch (ExceptionDAL dalex) { throw new ExceptionBLL(dalex, dalex.Message); } }
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); } }
public static bool Remove(int sectorId, int userId) { return(SectorDAL.Remove(sectorId, userId)); }
public static bool Update(Sector sector) { return(SectorDAL.Update(new SectorDTO(sector))); }
public static bool Save(Sector sector) { return(SectorDAL.Save(new SectorDTO(sector))); }
public static Sector GetSectorById(int id) { return(new Sector(SectorDAL.GetById(id))); }
public SectorContainer() { _sectorDAL = new SectorDAL(); }
public static bool Update(SectorModel sectorModel) { return(SectorDAL.Update(new SectorDTO(sectorModel))); }
public static bool Save(SectorModel sectorModel) { return(SectorDAL.Save(new SectorDTO(sectorModel))); }