private void RemoveSelectedService() { if (uiServicesListBox.SelectedItem != null) { XmlWorker.RemoveService((Service)uiServicesListBox.SelectedItem); UpdateServicesInformation(); UpdateClientInformation(); } }
private void AddService() { var serviceForm = new ServiceForm(); if (serviceForm.ShowDialog() == DialogResult.OK) { XmlWorker.AddService(serviceForm.CurrentService, false); UpdateServicesInformation(); } }
private void UpdateClientInformation() { if (_selectedClient == null) { return; } var selectedClientServices = XmlWorker.GetServices(_selectedClient.Login); _selectedClient.Services = selectedClientServices; uiClientServicesListBox.DataSource = _selectedClient.Services; }
private void EditService() { var serviceForm = new ServiceForm(); if (uiServicesListBox.SelectedItem != null) { serviceForm.CurrentService = (Service)uiServicesListBox.SelectedItem; if (serviceForm.ShowDialog() == DialogResult.OK) { XmlWorker.AddService(serviceForm.CurrentService, true); UpdateServicesInformation(); UpdateClientInformation(); } } }
public void SaveServices() { XmlWorker.SaveClientServices(Services, Login); }
private void LoadServicesAndClients() { UpdateServicesInformation(); _clients = XmlWorker.GetClients(); uiClientsComboBox.DataSource = _clients; }
private void UpdateServicesInformation() { var services = XmlWorker.GetServices(); uiServicesListBox.DataSource = services; }
private void AutorizationForm_Load(object sender, EventArgs e) { AllUser = XmlWorker.GetUsers(); uiPasswordTextBox.Text = XmlWorker.GetLastLogin(); }