private void toolStripButtonAddUserInfo_Click(object sender, EventArgs e)
        {
            AccessDataBase.Model.UserInfo modeUserInfo = new AccessDataBase.Model.UserInfo();
            AccessDataBase.BLL.UserInfo   bllUserInfo  = new AccessDataBase.BLL.UserInfo();
            modeUserInfo.UserID = bllUserInfo.GetMaxId();

            FormUser formUser = new FormUser(modeUserInfo, OpenMode.Add);

            formUser.ShowDialog();

            this.refreshDataGridView();
        }
        public void updateGridViewWithCheckBoxRow(object sender, DataGridViewCellEventArgs e)
        {
            if (dataGridViewWithCheckBox1.CurrentRow == null)
            {
                return;
            }

            int    selectIndex  = dataGridViewWithCheckBox1.CurrentRow.Index;
            string controllerID = dataGridViewWithCheckBox1["UserID", selectIndex].Value.ToString().Trim();

            AccessDataBase.Model.UserInfo modeUserInfo = bllUserInfo.GetModel(int.Parse(controllerID));

            FormUser formUser = new FormUser(modeUserInfo, OpenMode.Update);

            formUser.ShowDialog();

            this.refreshDataGridView();
        }
        private void toolStripButtonUpdateUserInfo_Click(object sender, EventArgs e)
        {
            if (dataGridViewWithCheckBox1.CurrentRow == null)
            {
                return;
            }

            AccessDataBase.BLL.UserInfo bllUserInfo = new AccessDataBase.BLL.UserInfo();

            int    selectIndex  = dataGridViewWithCheckBox1.CurrentRow.Index;
            string controllerID = dataGridViewWithCheckBox1["UserID", selectIndex].Value.ToString().Trim();

            AccessDataBase.Model.UserInfo modeUserInfo = bllUserInfo.GetModel(int.Parse(controllerID));

            FormUser formUser = new FormUser(modeUserInfo, OpenMode.Update);

            formUser.ShowDialog();

            this.refreshDataGridView();
        }
        public void updateGridViewWithCheckBoxRow(object sender, DataGridViewCellEventArgs e)
        {
            if (dataGridViewWithCheckBox1.CurrentRow == null)
                return;

            int selectIndex = dataGridViewWithCheckBox1.CurrentRow.Index;
            string controllerID = dataGridViewWithCheckBox1["UserID", selectIndex].Value.ToString().Trim();

            AccessDataBase.Model.UserInfo modeUserInfo = bllUserInfo.GetModel(int.Parse(controllerID));

            FormUser formUser = new FormUser(modeUserInfo, OpenMode.Update);
            formUser.ShowDialog();

            this.refreshDataGridView();
        }
        private void toolStripButtonUpdateUserInfo_Click(object sender, EventArgs e)
        {
            if (dataGridViewWithCheckBox1.CurrentRow == null)
                return;

            AccessDataBase.BLL.UserInfo bllUserInfo = new AccessDataBase.BLL.UserInfo();

            int selectIndex = dataGridViewWithCheckBox1.CurrentRow.Index;
            string controllerID = dataGridViewWithCheckBox1["UserID", selectIndex].Value.ToString().Trim();

            AccessDataBase.Model.UserInfo modeUserInfo = bllUserInfo.GetModel(int.Parse(controllerID));

            FormUser formUser = new FormUser(modeUserInfo, OpenMode.Update);
            formUser.ShowDialog();

            this.refreshDataGridView();
        }
        private void toolStripButtonAddUserInfo_Click(object sender, EventArgs e)
        {
            AccessDataBase.Model.UserInfo modeUserInfo = new AccessDataBase.Model.UserInfo();
            AccessDataBase.BLL.UserInfo bllUserInfo = new AccessDataBase.BLL.UserInfo();
            modeUserInfo.UserID = bllUserInfo.GetMaxId();

            FormUser formUser = new FormUser(modeUserInfo,OpenMode.Add);
            formUser.ShowDialog();

            this.refreshDataGridView();
        }