예제 #1
0
        private void Orders_Load(object sender, EventArgs e)
        {
            string query = "select * from Order_View";

            dataGridView1.DataSource         = DBConnect.getTableAsDT(query);
            dataGridView1.Columns[0].Visible = false;
        }
예제 #2
0
        private void Employee_Load(object sender, EventArgs e)
        {
            var query = "select id, name from Department";

            cbDep.DisplayMember = "name";
            cbDep.ValueMember   = "id";
            cbDep.DataSource    = DBConnect.getTableAsDT(query);

            query = "select id,name from Post";
            cbPost.DisplayMember = "name";
            cbPost.ValueMember   = "id";
            cbPost.DataSource    = DBConnect.getTableAsDT(query);
        }
예제 #3
0
        public void refreshComboBox()
        {
            var query = "select id,name from Employee";

            cbEmployee.DisplayMember = "name";
            cbEmployee.ValueMember   = "id";
            cbEmployee.DataSource    = DBConnect.getTableAsDT(query);

            query = "select id,name from Post";
            cbPost.DisplayMember = "name";
            cbPost.ValueMember   = "id";
            cbPost.DataSource    = DBConnect.getTableAsDT(query);

            query = "select id,name from Department";
            cbDep.DisplayMember = "name";
            cbDep.ValueMember   = "id";
            cbDep.DataSource    = DBConnect.getTableAsDT(query);
        }
예제 #4
0
        private void Employees_Load(object sender, EventArgs e)
        {
            var query = "select * from Workers_View";

            dataGridView1.DataSource = DBConnect.getTableAsDT(query);
        }