private void NewServiceButton_Click(object sender, EventArgs e) { ServiceIdNumericUpDown.Value = LazyWorker <ServiceModel> .Insert(FilledDataToService()); LoadAllServices(); FormUtilities.SetRowIndex(ServiceGridView); SaveServiceButton.Enabled = true; DeleteServiceButton.Enabled = true; FormUtilities.NotifySuccess(); }
private void SaveServiceButton_Click(object sender, EventArgs e) { if (LazyWorker <ServiceModel> .Update(FilledDataToService())) { int index = ServiceGridView.SelectedRows[0].Index; LoadAllServices(); FormUtilities.SetRowIndex(ServiceGridView, index); FormUtilities.NotifySuccess(); } }