コード例 #1
0
        private void buttonAddNewChassis_Click(object sender, EventArgs e)
        {
            var chassisCode = textBoxChassisCode.Text;
            var chassisName = textBoxChassisName.Text;

            if (!FieldsCompleted(chassisName, chassisCode))
            {
                labelAddChassis.Text = @"Must complete mandatory fields.";
            }
            else
            {
                buttonAddNewChassis.Enabled = true;
                Sasiu sasiu = new Sasiu()
                {
                    CodSasiu = chassisCode,
                    Denumire = chassisName
                };

                _carService.AddChassis(sasiu);

                labelAddChassis.Text    = @"Chassis added.";
                labelAddChassis.Visible = true;
            }
        }
コード例 #2
0
 public void AddChassis(Sasiu sasiu)
 {
     _api.AddChassis(sasiu);
 }