Exemplo n.º 1
0
 public ActionResult Update(DriveUnit driveUnit)
 {
     if (!ModelState.IsValid)
     {
         return(View(driveUnit));
     }
     _adminService.Update(driveUnit);
     return(RedirectToAction("Index"));
 }
Exemplo n.º 2
0
    public void DriveInfoTest()
    {
        // set up
        DriveUnit uut = new DriveUnit();
        // run
        var result = uut.GetInfo();

        // verify
        Assert.IsNotNull(result, "Get Info did not return an object.");
    }
Exemplo n.º 3
0
        public void SetDriveUnit(DriveUnit driveUnit)
        {
            switch (driveUnit)
            {
            case DriveUnit.none: comboBDriveUnit.SelectedIndex = 0; break;

            case DriveUnit.front: comboBDriveUnit.SelectedIndex = 1; break;

            case DriveUnit.rear: comboBDriveUnit.SelectedIndex = 2; break;

            case DriveUnit.full: comboBDriveUnit.SelectedIndex = 3; break;
            }
        }
Exemplo n.º 4
0
        public void SetDrive(DriveUnit type)
        {
            switch (type)
            {
            case DriveUnit.none: ComboBDrive.SelectedIndex = 0; break;

            case DriveUnit.sail: ComboBDrive.SelectedIndex = 1; break;

            case DriveUnit.sailmotor: ComboBDrive.SelectedIndex = 2; break;

            case DriveUnit.motor: ComboBDrive.SelectedIndex = 3; break;
            }
        }
Exemplo n.º 5
0
 public DriveUnitViewModel()
 {
     driveUnit = new DriveUnit();
 }