Esempio n. 1
0
        /// <summary>
        /// Delete
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnDelete_Click(object sender, EventArgs e)
        {
            int          UserGroupId  = Convert.ToInt32(dgvUserGroup.CurrentRow.Cells["UserGroupId"].Value);
            string       Name         = dgvUserGroup.CurrentRow.Cells["UserId"].Value.ToString();
            DialogResult dialogResult = MessageBox.Show(btnDelete, "Are you really want to Delete Name:" + Name, "Confirmation", MessageBoxButtons.OKCancel);

            if (dialogResult == DialogResult.OK)
            {
                _userGroupService.DeleteUserGroupById(UserGroupId);
                BindData();
                ResetUIInputtdData();
            }
        }