Example #1
0
        public static DataTable EMPLEADO_NOMBRE()
        {
            if (Main_Menu.TIPO_RRHH == "ADMIN")
            {
                DataTable dt2 = new DataTable();

                Conexion2 coned = new Conexion2();
                coned.con.Open();

                string     consulta = "SELECT EM.NOMBRE  FROM [EXACTUS].[dismo].[EMPLEADO_JERARQUIA] as  EJ  INNER JOIN  [EXACTUS].[dismo].[EMPLEADO] as EM  on EJ.SUBORDINADO = EM.EMPLEADO  INNER JOIN [DM].[CORRECT].[USUARIOS] as DMUSER  ON EJ.SUPERIOR = DMUSER.COD_EMPLEADO ";
                SqlCommand comando  = new SqlCommand(consulta, coned.con);

                SqlDataAdapter adap = new SqlDataAdapter(comando);

                adap.Fill(dt2);
                coned.con.Close();
                return(dt2);
            }
            else
            {
                DataTable dt2 = new DataTable();

                Conexion2 coned = new Conexion2();
                coned.con.Open();

                string     consulta = "SELECT EM.NOMBRE  FROM [EXACTUS].[dismo].[EMPLEADO_JERARQUIA] as  EJ  INNER JOIN  [EXACTUS].[dismo].[EMPLEADO] as EM  on EJ.SUBORDINADO = EM.EMPLEADO  INNER JOIN [DM].[CORRECT].[USUARIOS] as DMUSER  ON EJ.SUPERIOR = DMUSER.COD_EMPLEADO  where DMUSER.COD_EMPLEADO = '" + Main_Menu.COD_EMPLEADO + "'";
                SqlCommand comando  = new SqlCommand(consulta, coned.con);

                SqlDataAdapter adap = new SqlDataAdapter(comando);

                adap.Fill(dt2);
                coned.con.Close();
                return(dt2);
            }
        }
Example #2
0
            public static DataTable PLACAS()
            {
                DataTable dt2 = new DataTable();

                Conexion2 coned = new Conexion2();

                coned.con.Open();

                string     consulta = "SELECT PLACA FROM [DM].[CORRECT].[VEHICULOS] ORDER BY PLACA";
                SqlCommand comando  = new SqlCommand(consulta, coned.con);

                SqlDataAdapter adap = new SqlDataAdapter(comando);

                adap.Fill(dt2);
                coned.con.Close();
                return(dt2);
            }
Example #3
0
        public static DataTable EMPRESAS()
        {
            DataTable dt9 = new DataTable();

            Conexion2 coned = new Conexion2();

            coned.con.Open();

            string     consulta = "SELECT NOMRE FROM [DM].[CORRECT].[EMPRESAS] order by ID desc";
            SqlCommand comando  = new SqlCommand(consulta, coned.con);

            SqlDataAdapter adap = new SqlDataAdapter(comando);

            adap.Fill(dt9);
            coned.con.Close();
            return(dt9);
        }
Example #4
0
            public static DataTable CUENTA_BAT()
            {
                DataTable dt5 = new DataTable();

                Conexion2 coned = new Conexion2();

                coned.con.Open();

                string     consulta = "SELECT CUENTA FROM [DM].[CORRECT].[ACTIVIDADES_BAT] order by ID desc";
                SqlCommand comando  = new SqlCommand(consulta, coned.con);

                SqlDataAdapter adap = new SqlDataAdapter(comando);

                adap.Fill(dt5);
                coned.con.Close();
                return(dt5);
            }
Example #5
0
            public static DataTable REGISTRO()
            {
                DataTable dt2 = new DataTable();

                Conexion2 coned = new Conexion2();

                coned.con.Open();

                string     consulta = "SELECT Registro FROM [DM].[CORRECT].[Proveedores] ORDER BY Registro";
                SqlCommand comando  = new SqlCommand(consulta, coned.con);

                SqlDataAdapter adap = new SqlDataAdapter(comando);

                adap.Fill(dt2);
                coned.con.Close();
                return(dt2);
            }
Example #6
0
            public static DataTable RUTAS()
            {
                DataTable dt = new DataTable();

                Conexion2 coned = new Conexion2();

                coned.con.Open();

                string     consulta = "SELECT [RUTA] FROM [DM].[CORRECT].[RUTA_REGALIAS] ORDER BY RUTA";
                SqlCommand comando  = new SqlCommand(consulta, coned.con);

                SqlDataAdapter adap = new SqlDataAdapter(comando);

                adap.Fill(dt);
                coned.con.Close();
                return(dt);
            }
Example #7
0
            public static DataTable FORMA_PAGO()
            {
                DataTable dt2 = new DataTable();

                Conexion2 coned = new Conexion2();

                coned.con.Open();

                string     consulta = "SELECT TIPO FROM [DM].[CORRECT].[FORMA_PAGO_GAS] ORDER BY TIPO";
                SqlCommand comando  = new SqlCommand(consulta, coned.con);

                SqlDataAdapter adap = new SqlDataAdapter(comando);

                adap.Fill(dt2);
                coned.con.Close();
                return(dt2);
            }
Example #8
0
        public static DataTable EMPLEADOS_CODIGO()
        {
            if (Main_Menu.TIPO_RRHH == "ADMIN")
            {
                DataTable dt2 = new DataTable();

                Conexion2 coned = new Conexion2();
                coned.con.Open();

                string     consulta = "SELECT EJ.[SUBORDINADO] FROM [EXACTUS].[dismo].[EMPLEADO_JERARQUIA] as  EJ INNER JOIN  [EXACTUS].[dismo].[EMPLEADO] as EM on EJ.SUBORDINADO = EM.EMPLEADO  INNER JOIN [DM].[CORRECT].[USUARIOS] as DMUSER  ON EJ.SUPERIOR = DMUSER.COD_EMPLEADO ";
                SqlCommand comando  = new SqlCommand(consulta, coned.con);

                SqlDataAdapter adap = new SqlDataAdapter(comando);

                adap.Fill(dt2);
                coned.con.Close();
                return(dt2);
            }
            else
            {
                DataTable dt2 = new DataTable();

                Conexion2 coned = new Conexion2();
                coned.con.Open();

                string     consulta = "SELECT EJ.[SUBORDINADO] FROM [EXACTUS].[dismo].[EMPLEADO_JERARQUIA] as  EJ INNER JOIN  [EXACTUS].[dismo].[EMPLEADO] as EM on EJ.SUBORDINADO = EM.EMPLEADO  INNER JOIN [DM].[CORRECT].[USUARIOS] as DMUSER  ON EJ.SUPERIOR = DMUSER.COD_EMPLEADO  where DMUSER.COD_EMPLEADO ='" + Main_Menu.COD_EMPLEADO + "'";
                SqlCommand comando  = new SqlCommand(consulta, coned.con);

                SqlDataAdapter adap = new SqlDataAdapter(comando);

                adap.Fill(dt2);

                if (Main_Menu.autoev == "S")
                {
                    if (dt2.Rows.Count > 0)
                    {
                        DataRow Row = dt2.NewRow();
                        Row["SUBORDINADO"] = Main_Menu.COD_EMPLEADO;
                        dt2.Rows.Add(Row);
                    }
                }
                coned.con.Close();
                return(dt2);
            }
        }