コード例 #1
0
 public RouteStationRepairForm(RouteStationFailure failure)
 {
     InitializeComponent();
     m_failure = failure;
     InitLists();
     Bind();
     WireEvents();
     SetupEnvironment();
 }
コード例 #2
0
        void repairFailureLink_Click(object sender, EventArgs e)
        {
            RouteStationFailure failure = failuresView.GetFocusedRow() as RouteStationFailure;

            if (failure != null && failure.FailCode != null)
            {
                LoadRepairView(failure);
            }
        }
コード例 #3
0
        private void repairButton_Click(object sender, EventArgs e)
        {
            RouteStationFailure failure =
                repairFailuresView.GetFocusedRow() as RouteStationFailure;

            if (failure != null)
            {
                LoadRepairView(failure);
            }
        }
コード例 #4
0
        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;
        }
コード例 #5
0
        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);
        }
コード例 #6
0
        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);
                }
            }
        }
コード例 #7
0
        private void LoadRepairView(RouteStationFailure failure)
        {
            RouteStationRepairForm form = new RouteStationRepairForm(failure);

            form.ShowDialog();
        }