示例#1
0
 /// <summary>
 /// Metodo que Da de Baja un Componente
 /// </summary>
 /// <returns>Retorna true si se dio de de baja el componente y false de caso contrario</returns>
 public bool DarDeBaja()
 {
     try
     {
         Halcones.DALC.COMPONENTE comp = CommonBC.ModeloEscuelaHalcones.COMPONENTE.First(
             c => c.ID_COMPONENTE == this._idComponente);
         comp.ESTADO = this._estado;
         CommonBC.ModeloEscuelaHalcones.SaveChanges();
         return(true);
     }
     catch (Exception ex)
     {
         ConfigHalcones.GenerarLog("ERROR", ex.ToString());
         return(false);
     }
 }
示例#2
0
 /// <summary>
 /// Metodo que actualiza un Componente
 /// </summary>
 /// <returns>Retorna true si se actualizo el componente y false de caso contrario</returns>
 public bool Actualizar()
 {
     try
     {
         Halcones.DALC.COMPONENTE comp = CommonBC.ModeloEscuelaHalcones.COMPONENTE.First(
             c => c.ID_COMPONENTE == this._idComponente);
         comp.ID_COMPONENTE = this._idComponente;
         comp.COMPONENTE1   = this._componente;
         comp.FABRICANTE    = this._fabricante;
         CommonBC.ModeloEscuelaHalcones.SaveChanges();
         return(true);
     }
     catch (Exception ex)
     {
         ConfigHalcones.GenerarLog("ERROR", ex.ToString());
         return(false);
     }
 }
示例#3
0
 /// <summary>
 /// Metodo que obtiene los datos de un Componente.
 /// </summary>
 /// <returns>Retorna true si se encontro el componente y false de caso contrario</returns>
 public bool Buscar()
 {
     try
     {
         Halcones.DALC.COMPONENTE comp = CommonBC.ModeloEscuelaHalcones.COMPONENTE.First(
             c => c.ID_COMPONENTE == this._idComponente);
         this._idComponente = int.Parse(comp.ID_COMPONENTE.ToString());
         this._componente   = comp.COMPONENTE1.ToString();
         this._fabricante   = comp.FABRICANTE.ToString();
         this._estado       = comp.ESTADO;
         return(true);
     }
     catch (Exception ex)
     {
         ConfigHalcones.GenerarLog("ERROR", ex.ToString());
         return(false);
     }
 }