Beispiel #1
0
        public void SetAttributeRef(QSAttribute atrType)
        {
            switch (atrType)
            {
            case QSAttribute.QS_ACTIVITY:
                this.Calc.AttributeXref = WebSiteCommon.GetXlatList("qualityActivity", "", "short");
                break;

            case QSAttribute.PROBLEM_AREA:
                this.Calc.AttributeXref = WebSiteCommon.GetXlatList("problemArea", "", "short");
                break;

            case QSAttribute.NONCONF_CATEGORY:
                this.NCCategoryList = SQMResourcesMgr.SelectNonconfCategoryList("");
                string[] catList = this.RecordList.Where(r => r.Nonconform != null && !string.IsNullOrEmpty(r.Nonconform.NONCONF_CATEGORY)).Select(r => r.Nonconform.NONCONF_CATEGORY).Distinct().ToArray();
                this.Calc.AttributeXref = new Dictionary <string, string>();
                foreach (string cat in catList)
                {
                    NONCONFORMANCE nc = this.NCCategoryList.Where(l => l.NONCONF_CD == cat).FirstOrDefault();
                    this.Calc.AttributeXref.Add(nc.NONCONF_CD.ToString(), nc.NONCONF_NAME);
                }
                break;

            case QSAttribute.NONCONF_ID:
                this.NonConfList        = this.RecordList.Where(r => r.Nonconform != null).Select(r => r.Nonconform).Distinct().ToList();
                this.Calc.AttributeXref = new Dictionary <string, string>();
                foreach (NONCONFORMANCE nc in this.NonConfList)
                {
                    this.Calc.AttributeXref.Add(nc.NONCONF_ID.ToString(), nc.NONCONF_NAME);
                }
                break;

            case QSAttribute.DISPOSITION:
                this.Calc.AttributeXref = WebSiteCommon.GetXlatList("NCDisposition", "", "short");
                break;

            case QSAttribute.SEVERITY:
                this.Calc.AttributeXref = WebSiteCommon.GetXlatList("incidentSeverity", "", "short");
                break;

            case QSAttribute.PART_TYPE:
                this.Calc.AttributeXref = new Dictionary <string, string>();
                foreach (PART_ATTRIBUTE pat in SQMModelMgr.SelectPartAttributeList("TYPE", "", false))
                {
                    this.Calc.AttributeXref.Add(pat.ATTRIBUTE_CD, pat.ATTRIBUTE_VALUE);
                }
                break;

            default:
                break;
            }
            return;
        }
Beispiel #2
0
        public int CreateStepCompleteTasks()
        {
            int taskCount = 0;

            TASK_STATUS task = null;
            Dictionary <string, string> stepList = WebSiteCommon.GetXlatList("caseStep", "", "short");

            foreach (KeyValuePair <string, string> step in stepList)
            {
                if ((task = this.TeamTask.FindTask(step.Key, "C", 0)) == null)
                {
                    this.TeamTask.CreateTask(step.Key, "C", 0, step.Value, DateTime.MinValue, 0);
                }
            }

            return(taskCount);
        }
        public static List <UOM> GetCompanyStdUnits(decimal companyID)
        {
            List <UOM> stdUOMList = new List <UOM>();

            Dictionary <string, string> dcXlat = WebSiteCommon.GetXlatList("stdUnits", "", "short");

            foreach (KeyValuePair <string, string> xItem in dcXlat)
            {
                UOM uom = new UOM();
                uom.UOM_CATEGORY = xItem.Key;
                uom.UOM_CD       = xItem.Value;
                decimal id;
                if (decimal.TryParse(xItem.Value, out id))
                {
                    uom.UOM_ID = id;
                }
                stdUOMList.Add(uom);
            }

            return(stdUOMList);
        }
Beispiel #4
0
        private void SetupPage()
        {
            int nextStep = CaseCtl().problemCase.CheckCaseNextStep();
            int progress = CaseCtl().problemCase.CheckCaseStatus();

            if (CaseCtl().isDirected)
            {
                uclSearchBar.SetButtonsEnabled(false, false, false, false, false, false);
            }
            uclPageTabs.TabsPanel.Visible = true;
            uclPageTabs.SetTabLabelsFromList(WebSiteCommon.GetXlatList("caseStep", "", "short"));
            uclPageTabs.SetAllTabsEnabled(true);

            if (CaseCtl().problemCase.TeamTask != null)
            {
                TaskStatus status;
                foreach (TASK_STATUS task in CaseCtl().problemCase.TeamTask.TaskList.Where(l => l.TASK_TYPE == "C" && l.TASK_SEQ == 0))
                {
                    if ((status = TaskMgr.CalculateTaskStatus(task)) < TaskStatus.New)
                    {
                        string imageURL = TaskMgr.TaskStatusImage(status);
                        uclPageTabs.SetTabImage(Convert.ToInt32(task.TASK_STEP), imageURL, status.ToString());
                    }
                }
            }

            SessionManager.EffLocation = SessionManager.UserContext.WorkingLocation;  /// is this true ??

            if (CaseCtl().isNew)
            {
                uclCaseHdr.ProblemCaseHdr.Visible = true;
            }
            else
            {
                uclCaseHdr.ProblemCaseHdr.Visible = true;
                uclCaseHdr.BindProblemCaseHeader(CaseCtl().problemCase, true);
            }
        }