예제 #1
0
        public RouteStationFailure AddFailure(ServiceCode code, string comments)
        {
            RouteStationFailure failure = Scout.Core.Data.CreateEntity <RouteStationFailure>(Session);

            failure.FailCode = code;
            failure.Comments = comments;
            Failures.Add(failure);

            return(failure);
        }
예제 #2
0
        public static bool CreateNoRepairRecord(RouteStationFailure failure)
        {
            RouteStationRepair repair = Scout.Core.Data.CreateEntity <RouteStationRepair>(failure.Session);

            repair.Comments         = "No Repair";
            repair.Component        = null;
            repair.Failure          = failure;
            repair.ArePartsRequired = false;
            repair.Repair           = RepairAction.None;

            ReplacementComponentFacts facts = CreateNoPartComponent(repair);

            return(Save(repair, facts));
        }
예제 #3
0
        public void ChangeFpErrorCodeOwner(RouteStationFailure failure)
        {
            var currentFpHolder = AllProcessFailures.FirstOrDefault(f => f.IsFpErrorCode);

            if (currentFpHolder == null)
            {
                currentFpHolder = Failures.FirstOrDefault(f => f.IsFpErrorCode);
            }

            if (currentFpHolder != null)
            {
                currentFpHolder.IsFpErrorCode = false;
            }

            failure.IsFpErrorCode = true;
        }