Пример #1
0
        private void buttonAddNewOperation_Click(object sender, EventArgs e)
        {
            string name          = textBoxAddOperationName.Text;
            string executionTime = textBoxAddOperationExecutionTime.Text;

            if (!FieldsCompleted(name, executionTime))
            {
                labelAddOperation.Text = @"Must complete mandatory fields.";
            }
            else
            {
                buttonAddNewOperation.Enabled = true;
                Operatie operation = new Operatie()
                {
                    Denumire     = name,
                    TimpExecutie = Convert.ToDecimal(executionTime)
                };

                _carService.AddOperation(operation);

                labelAddOperation.Text    = @"Operation added.";
                labelAddOperation.Visible = true;
            }
        }
Пример #2
0
 public void AddOperation(Operatie operation)
 {
     _api.AddOperation(operation);
 }