Esempio n. 1
0
        public static DataTable Listar(LinestdLogica line)
        {
            DataTable datos = new DataTable();

            try
            {
                datos = AccesoDatos.Consultar("SELECT linea,consec,turno,nombre as Hora,estandar as Meta FROM t_linestd where linea='" + line.Linea + "' and turno='" + line.Turno + "' order by nombre");
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(datos);
        }
Esempio n. 2
0
        public static DataTable ConsultarTurno(LinestdLogica line)
        {
            DataTable datos = new DataTable();

            try
            {
                datos = AccesoDatos.Consultar("SELECT * FROM t_linestd WHERE linea = '" + line.Linea + "' and turno= '" + line.Turno + "' ORDER BY consec");
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(datos);
        }
Esempio n. 3
0
 public static bool Eliminar(LinestdLogica line)
 {
     try
     {
         string sQuery = "DELETE FROM t_linestd WHERE linea = '" + line.Linea + "' and consec=" + line.Consec + "";
         if (AccesoDatos.Borrar(sQuery) != 0)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch
     {
         return(false);
     }
 }
Esempio n. 4
0
 public static bool Verificar(LinestdLogica line)
 {
     try
     {
         string sQuery;
         sQuery = "SELECT * FROM t_linestd WHERE linea = '" + line.Linea + "' and consec = " + line.Consec + "";
         DataTable datos = AccesoDatos.Consultar(sQuery);
         if (datos.Rows.Count != 0)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch
     {
         return(false);
     }
 }
Esempio n. 5
0
 public static int Guardar(LinestdLogica line)
 {
     string[] parametros = { "@Linea", "@Consec", "@Turno", "@Nombre", "@Estandar" };
     return(AccesoDatos.Actualizar("sp_mant_linestd", parametros, line.Linea, line.Consec, line.Turno, line.Nombre, line.Estandar));
 }