예제 #1
0
        private void deleteMeasurementUnit_Click(object sender, EventArgs e)
        {
            MeasurementUnit measurementUnitToDelete = new MeasurementUnit();

            measurementUnitToDelete.Id   = (int)cbbMeasurementUnit.SelectedValue;
            measurementUnitToDelete.Name = txtMeasurementUnitUpdate.Text;
            if (measurementUnitToDelete.DeleteMeasurementUnit())
            {
                MessageBox.Show("Measurement unit deleted sucessfully");
                LoadComboBox();
            }
            else
            {
                MessageBox.Show("Error deleting measurement unit");
            }
        }