private void BtnAddGroup_Click(object sender, EventArgs e) { string groupName = TxbGroup.Text; if (string.IsNullOrWhiteSpace(groupName)) { MessageBox.Show("sheavset carieli velebi"); } else { AddGroup(GroupName: groupName); ComboFill(); TxbGroup.Clear(); } }
private void BtnUpdateUser_Click(object sender, EventArgs e) { string name = TxbUserName.Text; string surname = TxbUserLastName.Text; DateTime birthdate = DtBirthdate.Value; int GroupId = ((KeyValuePair <int, string>)ComboGroupsList.SelectedItem).Key; if (VlidateUserViewModel(name: name, surname: surname)) { UpdateUser(UserId, name, surname, birthdate, GroupId); TxbUserName.Clear(); TxbUserLastName.Clear(); DtBirthdate.ResetText(); TxbGroup.Clear(); GridFill(); } else { MessageBox.Show("sheavset carieli velebi"); } }