public static DataTable ConsultarLinea(EstacionLogica est) { DataTable datos = new DataTable(); try { datos = AccesoDatos.Consultar("SELECT * FROM t_estacion WHERE maquina = '" + est.Linea + "'"); } catch (Exception ex) { throw ex; } return(datos); }
public static bool Eliminar(EstacionLogica est) { try { string sQuery = "DELETE FROM t_estacion WHERE estacion = '" + est.Estacion + "'"; if (AccesoDatos.Borrar(sQuery) != 0) { return(true); } else { return(false); } } catch { return(false); } }
public static bool VerificarMaq(EstacionLogica est) { try { string sQuery; sQuery = "SELECT * FROM t_estacion WHERE maquina = '" + est.Linea + "'"; DataTable datos = AccesoDatos.Consultar(sQuery); if (datos.Rows.Count != 0) { return(true); } else { return(false); } } catch { return(false); } }
public static int Guardar(EstacionLogica est) { string[] parametros = { "@Estacion", "@Planta", "@Linea", "@Proceso", "@Area", "@Usuario" }; return(AccesoDatos.Actualizar("sp_mant_estacion", parametros, est.Estacion, est.Planta, est.Linea, est.Proceso, est.Area, est.Usuario)); }