private void btnUpdate_Click(object sender, RoutedEventArgs e) { var result = _membershipType.Update(); if (!result.Success) { MessageWindow.ShowAlertMessage(result.Message); return; } DialogResult = true; Close(); }
private void Update(object sender, RoutedEventArgs e) { if (string.IsNullOrEmpty(_currentMembershipType.Description)) { MessageWindow.ShowAlertMessage("MembershipType Name must not be empty!"); return; } if (_currentMembershipType.MembershipTypeId == 0) { _currentMembershipType.Create(); return; } _currentMembershipType.Update(); }