Exemplo n.º 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);
        }
Exemplo n.º 2
0
 //Eliminar
 public int BorrarArea(int IDArea)
 {
     DatoArea datAuto = new DatoArea();
     return datAuto.EliminarArea(IDArea);
 }
Exemplo n.º 3
0
 //Update
 public int ActualizarArea(int IDArea, string NombreArea)
 {
     DatoArea datArea = new DatoArea();
     return datArea.ActualizarArea(IDArea, NombreArea);
 }
Exemplo n.º 4
0
 //desplegr todos
 public List<Area> ObtenerArea()
 {
     DatoArea datArea = new DatoArea();
     return datArea.select_All_Area();
 }
Exemplo n.º 5
0
 //Insertar
 public int InsertarArea(string NombreArea)
 {
     DatoArea datArea = new DatoArea();
     return datArea.InsertarArea(NombreArea);
 }