Esempio n. 1
0
        private void txtSearchNameGroup_TextChanged(object sender, EventArgs e)
        {
            User_Group_Data UserGroupData = new User_Group_Data();
            DataView        dv            = UserGroupData.getListUser_Group(txtGroupID.Text).DefaultView;

            dv.RowFilter = string.Format("Name like '%{0}%'", txtSearchNameGroup.Text);
            GridViewDetail.DataSource = dv.ToTable();
        }
Esempio n. 2
0
        private void GridViewGroup_SelectionChanged(object sender, EventArgs e)
        {
            string          GroupID         = GridViewGroup.Rows[GridViewGroup.CurrentCell.RowIndex].Cells["GroupID"].Value.ToString();
            User_Group_Data user_Group_Data = new User_Group_Data();

            bsDetailGroup.DataSource          = user_Group_Data.getListUser_Group(GroupID);
            GroupViewDetailStudent.DataSource = bsDetailGroup;

            GroupViewDetailStudent.Columns["Gender"].Visible      = false;
            GroupViewDetailStudent.Columns["Email"].Visible       = false;
            GroupViewDetailStudent.Columns["DateOfBirth"].Visible = false;
        }
Esempio n. 3
0
        private void GridViewGroup_SelectionChanged(object sender, EventArgs e)
        {
            string          GroupID       = txtGroupID.Text;
            User_Group_Data UserGroupData = new User_Group_Data();

            try
            {
                bsUser_Group.DataSource   = UserGroupData.getListUser_Group(GroupID);
                GridViewDetail.DataSource = bsUser_Group;
            }
            catch
            {
            }
        }
Esempio n. 4
0
        private void btnDeleteStudentFormGroup_Click(object sender, EventArgs e)
        {
            User_Group UserGroup = new User_Group();

            UserGroup.GroupID  = txtGroupID.Text;
            UserGroup.UserName = GridViewDetail.Rows[GridViewDetail.CurrentCell.RowIndex].Cells[0].Value.ToString().Trim();

            User_Group_Data UserGroupData = new User_Group_Data();

            try
            {
                if (UserGroupData.checkDeleteUser_Group(UserGroup))
                {
                    MessageBox.Show("Delete Student in list Complete!");
                    bsUser_Group.DataSource   = UserGroupData.getListUser_Group(UserGroup.GroupID);
                    GridViewDetail.DataSource = bsUser_Group;
                }
            }
            catch
            {
                MessageBox.Show("Delete Student in list Fail!");
            }
        }