public RouteStationRepairForm(RouteStationFailure failure) { InitializeComponent(); m_failure = failure; InitLists(); Bind(); WireEvents(); SetupEnvironment(); }
void repairFailureLink_Click(object sender, EventArgs e) { RouteStationFailure failure = failuresView.GetFocusedRow() as RouteStationFailure; if (failure != null && failure.FailCode != null) { LoadRepairView(failure); } }
private void repairButton_Click(object sender, EventArgs e) { RouteStationFailure failure = repairFailuresView.GetFocusedRow() as RouteStationFailure; if (failure != null) { LoadRepairView(failure); } }
internal void MapServiceCodeToFailure(ServiceCode code) { if (m_failure == null) { m_failure = Scout.Core.Data.CreateEntity <RouteStationFailure>(UnitOfWork); } m_failure.FailCode = code; m_failure.StationProcess = m_process; m_failure.Comments = m_comments; }
private bool VerifyDelete(RouteStationFailure failure) { if (failure.HasConsumedRepairParts) { Scout.Core.UserInteraction.Dialog.ShowMessage("This failure cannot be deleted until the repair parts consumed are reversed.", UserMessageType.Error); return(false); } return (MessageBox.Show( "Are you sure you want to delete this failure?", Application.ProductName, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes); }
private void removeFailureLink_OpenLink(object sender, OpenLinkEventArgs e) { RouteStationFailure failure = failuresView.GetFocusedRow() as RouteStationFailure; if (failure != null) { if (VerifyDelete(failure)) { m_process.Failures.Remove(failure); } } }
private void LoadRepairView(RouteStationFailure failure) { RouteStationRepairForm form = new RouteStationRepairForm(failure); form.ShowDialog(); }