示例#1
0
 public Form1(int UserId)
 {
     this.UserId = UserId;
     InitializeComponent();
     GetEmployees                     = StaffDAL.GetEmployees();
     bindingSource                    = new BindingSource(GetEmployees, null);
     dataGridView1.DataSource         = bindingSource;
     this.dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
 }
示例#2
0
        public static DatabaseDataSet.GetEmployeesDataTable GetEmployees()
        {
            DatabaseDataSet.GetEmployeesDataTable getEmployees = new DatabaseDataSet.GetEmployeesDataTable();

            using (Database.GetConnection())
            {
                DatabaseDataSetTableAdapters.GetEmployeesTableAdapter getEmployeesTableAdapter = new DatabaseDataSetTableAdapters.GetEmployeesTableAdapter();
                getEmployeesTableAdapter.Fill(getEmployees);
            }



            return(getEmployees);
        }
示例#3
0
 private void btnRefresh_Click(object sender, EventArgs e)
 {
     GetEmployees             = StaffDAL.GetEmployees();
     bindingSource            = new BindingSource(GetEmployees, null);
     dataGridView1.DataSource = bindingSource;
 }