예제 #1
0
        public static int Eliminar(LineaConfigLnLogica cve)
        {
            int iRes = 0;

            try
            {
                iRes = AccesoDatos.Borrar("DELETE FROM t_lineconfd WHERE clave = '" + cve.Clave + "' and consec = " + cve.Consec + "");
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(iRes);
        }
예제 #2
0
        public static DataTable ValidaClaveLinea(LineaConfigLnLogica cve)
        {
            DataTable datos = new DataTable();

            try
            {
                datos = AccesoDatos.Consultar("SELECT * FROM t_lineconfd WHERE line = '" + cve.Linea + "' and clave != '" + cve.Clave + "' ");
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(datos);
        }
예제 #3
0
        public static DataTable VistaClaveLine(LineaConfigLnLogica cve)
        {
            DataTable datos = new DataTable();

            try
            {
                datos = AccesoDatos.Consultar("SELECT consec,line as Linea FROM t_lineconfd WHERE clave = '" + cve.Clave + "' order by consec");
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(datos);
        }
예제 #4
0
        public static DataTable ConsultarConfLinea(LineaConfigLnLogica cve)
        {
            DataTable datos = new DataTable();

            try
            {
                string sQuery = "SELECT f.* FROM t_lineconfd d inner join t_lineconf f on d.clave = f.clave where d.line = '" + cve.Linea + "'";
                datos = AccesoDatos.Consultar(sQuery);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(datos);
        }
예제 #5
0
 public static int GuardarSP(LineaConfigLnLogica cve)
 {
     string[] parametros = { "@Clave", "@Consec", "@Linea" };
     return(AccesoDatos.Actualizar("sp_mant_lineconfd", parametros, cve.Clave, cve.Consec, cve.Linea));
 }