Пример #1
0
        //desplegar por id
        public Area ObtenerAreaById(int IDArea)
        {
            DatoArea datArea = new DatoArea();
            //dos formas de hacerlo
            //LINQ
            Area aut = new Area();
            aut = (from l in datArea.select_All_Area()
                   where l.IDArea == IDArea
                   select l).FirstOrDefault();

            return aut;
            //por medio del procedimiento almacenado
            //return datAuto.select_AutosbyId(IDAuto);
        }
Пример #2
0
 //Eliminar
 public int BorrarArea(int IDArea)
 {
     DatoArea datAuto = new DatoArea();
     return datAuto.EliminarArea(IDArea);
 }
Пример #3
0
 //Update
 public int ActualizarArea(int IDArea, string NombreArea)
 {
     DatoArea datArea = new DatoArea();
     return datArea.ActualizarArea(IDArea, NombreArea);
 }
Пример #4
0
 //desplegr todos
 public List<Area> ObtenerArea()
 {
     DatoArea datArea = new DatoArea();
     return datArea.select_All_Area();
 }
Пример #5
0
 //Insertar
 public int InsertarArea(string NombreArea)
 {
     DatoArea datArea = new DatoArea();
     return datArea.InsertarArea(NombreArea);
 }