private void cmbDepartment_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cmbDepartment.SelectedValue == null || cmbDepartment.SelectedValue.ToString() == "")
            {
                return;
            }

            try
            {
                DAL.Program program = new DAL.Program();
                program.DepartmentId  = Convert.ToInt32(cmbDepartment.SelectedValue);
                cmbProgram.DataSource = program.Select().Tables[0];

                cmbProgram.DisplayMember = "name";
                cmbProgram.ValueMember   = "Id";
                cmbProgram.SelectedValue = -1;
            }
            catch (Exception)
            {
            }
        }
 private void searchBtn_Click(object sender, EventArgs e)
 {
     DAL.Program program = new DAL.Program();
     dgvData.DataSource = program.Select().Tables[0];
 }