Ejemplo n.º 1
0
        public SQM.Shared.CorrectiveAction CreateCorrectiveAction(PROB_CAUSE_STEP cause)
        {
            SQM.Shared.CorrectiveAction action = new SQM.Shared.CorrectiveAction();
            action.RelatedCauseNo   = cause.ITERATION_NO;
            action.RelatedCause     = cause.WHY_OCCUR;
            action.RelatedCauseType = cause.CAUSE_TYPE;
            action.Action           = action.ActionCode = "";
            action.VerifyStatus     = "";
            action.EffDate          = DateTime.UtcNow;

            return(action);
        }
Ejemplo n.º 2
0
        public SQM.Shared.CorrectiveAction CreateCorrectiveAction(PROB_CAUSE_STEP cause, PROB_CAUSE_ACTION existingAction)
        {
            SQM.Shared.CorrectiveAction action = CreateCorrectiveAction(cause);
            action.ActionNo   = existingAction.ACTION_NO;
            action.ActionCode = existingAction.ACTION_CD;
            action.Action     = existingAction.ACTION_DESC;
            action.ActionCode = existingAction.ACTION_CD;
            if (existingAction.EFF_DT.HasValue)
            {
                action.EffDate = Convert.ToDateTime(existingAction.EFF_DT);
            }
            action.Responsible1 = existingAction.RESPONSIBLE1;
            if (existingAction.RESPONSIBLE1_PERSON.HasValue)
            {
                action.Responsible1ID = (decimal)existingAction.RESPONSIBLE1_PERSON;
            }
            action.Responsible2       = existingAction.RESPONSIBLE2;
            action.VerifyStatus       = existingAction.VERIFY_STATUS;
            action.VerifyObservations = existingAction.VERIFY_OBSERVATIONS;

            return(action);
        }
Ejemplo n.º 3
0
        public List <SQM.Shared.CorrectiveAction> CreateActionList()
        {
            // correlate actions with causes.  todo: reconcile deleted causes if/when that occurs in step 4
            List <SQM.Shared.CorrectiveAction> actionList = new List <SQM.Shared.CorrectiveAction>();

            if (this.ProbCase.PROB_CAUSE != null && this.ProbCase.PROB_CAUSE.PROB_CAUSE_STEP != null)
            {
                foreach (PROB_CAUSE_STEP cause in this.ProbCase.PROB_CAUSE.PROB_CAUSE_STEP)
                {
                    if (cause.IS_ROOTCAUSE.HasValue && (bool)cause.IS_ROOTCAUSE == true)
                    {
                        foreach (PROB_CAUSE_ACTION existingAction in this.ProbCase.PROB_CAUSE_ACTION)
                        {
                            if (existingAction.CAUSE_NO == cause.ITERATION_NO)
                            {
                                SQM.Shared.CorrectiveAction action = new SQM.Shared.CorrectiveAction();
                                action.RelatedCauseNo     = cause.ITERATION_NO;
                                action.RelatedCause       = cause.WHY_OCCUR;
                                action.ActionNo           = existingAction.ACTION_NO;
                                action.Action             = existingAction.ACTION_DESC;
                                action.ActionCode         = existingAction.ACTION_CD;
                                action.EffDate            = Convert.ToDateTime(existingAction.EFF_DT);
                                action.Responsible1       = existingAction.RESPONSIBLE1;
                                action.Responsible2       = existingAction.RESPONSIBLE2;
                                action.VerifyStatus       = existingAction.VERIFY_STATUS;
                                action.VerifyObservations = existingAction.VERIFY_OBSERVATIONS;
                                actionList.Add(action);
                            }
                        }
                    }
                }
            }

            actionList = OrderActionList(actionList);
            return(actionList);
        }