public void Execute(object parameter) { Vehicle theCar = parameter as Vehicle; OrderingAppServices tCmdr = new OrderingAppServices(); tCmdr.PlaceTeamOrder(theCar.Team, EOrderType.FireDriver, theCar.Id.ToString()); if (this.CommandExecutedSuccessfully != null) CommandExecutedSuccessfully(this, new EventArgs()); }
public void Execute(object parameter) { PartDesign theDesign = parameter as PartDesign; OrderingAppServices tCmdr = new OrderingAppServices(); string parameters = string.Concat(theDesign.Id.ToString()); tCmdr.PlaceTeamOrder(theDesign.Owner, EOrderType.BuildPartFromDesign, parameters); if (this.CommandExecutedSuccessfully != null) CommandExecutedSuccessfully(this, new EventArgs()); }
public void Execute(object parameter) { Part thePart = parameter as Part; OrderingAppServices tCmdr = new OrderingAppServices(); tCmdr.PlaceTeamOrder(thePart.Owner, EOrderType.UnmountPart, thePart.Id.ToString()); if (this.CommandExecutedSuccessfully != null) CommandExecutedSuccessfully(this, new EventArgs()); }
public void Execute(object parameter) { Vehicle theCar = parameter as Vehicle; MountPartDialog dlg = new MountPartDialog(theCar.Team); dlg.ShowDialog(); if (dlg.DialogResult == true) { OrderingAppServices tCmdr = new OrderingAppServices(); string parameters = string.Concat(((Part)dlg.cmbParts.SelectedItem).Id.ToString(), "|", theCar.Id.ToString()); tCmdr.PlaceTeamOrder(theCar.Team, EOrderType.MountPart, parameters); if (this.CommandExecutedSuccessfully != null) CommandExecutedSuccessfully(this, new EventArgs()); } }
public void Execute(object parameter) { Team theTeam = parameter as Team; BuyDesignDialog dlg = new BuyDesignDialog(); dlg.ShowDialog(); if (dlg.DialogResult == true) { OrderingAppServices tCmdr = new OrderingAppServices(); string parameters = string.Concat(theTeam.Id.ToString(), "|", ((PartDesign)dlg.cmbDesigns.SelectedItem).Id.ToString()); tCmdr.PlaceTeamOrder(theTeam, EOrderType.BuyDesign, parameters); if (this.CommandExecutedSuccessfully != null) CommandExecutedSuccessfully(this, new EventArgs()); } }
public void Execute(object parameter) { Vehicle theCar = parameter as Vehicle; Driver notThisOne = theCar.Team.Vehicles.SingleOrDefault(x => x.Id != theCar.Id).Driver; HireDriverDialog dlg = new HireDriverDialog(notThisOne); dlg.ShowDialog(); if (dlg.DialogResult == true) { OrderingAppServices tCmdr = new OrderingAppServices(); string parameters = string.Concat(((Driver)dlg.cmbDrivers.SelectedItem).Id.ToString(), "|", theCar.Id.ToString()); tCmdr.PlaceTeamOrder(theCar.Team, EOrderType.HireDriver, parameters); if (this.CommandExecutedSuccessfully != null) CommandExecutedSuccessfully(this, new EventArgs()); } }