public static int Eliminar(LineaRampeoLogica line)
        {
            int iRes = 0;

            try
            {
                iRes = AccesoDatos.Borrar("DELETE FROM t_lineramp WHERE company ='" + line.CN + "' and station = '" + line.Estacion + "'");
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(iRes);
        }
        public static DataTable Vista(LineaRampeoLogica lin)
        {
            DataTable datos = new DataTable();

            try
            {
                datos = AccesoDatos.Consultar("SELECT station,line,factor FROM t_lineramp WHERE company='" + lin.CN + "' order by line");
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(datos);
        }
        public static DataTable ConsultarEstacion(LineaRampeoLogica line)
        {
            DataTable datos = new DataTable();

            try
            {
                datos = AccesoDatos.Consultar("SELECT * FROM t_lineramp WHERE station = '" + line.Estacion + "'");
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(datos);
        }
 public static bool VerificaCapturaHora(LineaRampeoLogica line)
 {
     try
     {
         string sQuery = "SELECT c.line FROM t_lineconfd c inner join t_lineramp r on c.line = r.linehr " +
                         "WHERE R.station = '" + line.Estacion + "' AND(c.clave = 'LMBA01' OR c.clave = 'LMBA02')  group by c.line HAVING COUNT(c.line)	 > 0";
         DataTable datos = AccesoDatos.Consultar(sQuery);
         if (datos.Rows.Count != 0)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch
     {
         return(false);
     }
 }
 public static int GuardarSP(LineaRampeoLogica line)
 {
     string[] parametros = { "@Company", "@Station", "@Line", "@Factor", "@Usuario" };
     return(AccesoDatos.Actualizar("sp_mant_lineramp", parametros, line.CN, line.Estacion, line.Linea, line.Factor, line.Usuario));
 }