private void UpdateDestinationButton_Click(object sender, EventArgs e) { DestinationVO current = bindingSource1.Current as DestinationVO; if (current != null) { DestinationEditForm form = new DestinationEditForm(current, manager); if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK) { DestinationDataGridView.Refresh(); Log(OperationsManager.EDIT_DESTINATIONS); } } }
private void RemovDestinationButton_Click(object sender, EventArgs e) { DestinationVO current = bindingSource1.Current as DestinationVO; if (current != null) { if (Question("هل أنت متأكد من الحذف؟") == System.Windows.Forms.DialogResult.Yes) { if (manager.Delete(current)) { bindingSource1.Remove(current); DestinationDataGridView.Refresh(); Message("تم الحذف بنجاح"); Log(OperationsManager.EDIT_DESTINATIONS); } else { Error(); } } } }