Example #1
0
        public void StoreRelation(IfDataStrategy DataReader, MainDataSet dataset)
        {
            RelationShip newRelation;

            if (this.usrGroups.Count > 0)
            {
                //UserRoles[1:n]
                foreach (UserGroup curGroup in this.usrGroups)
                {
                    newRelation = new RelationShip(this.Name, this.Type, curGroup.Name, curGroup.Type, "BelongTo", "1");
                    DataReader.InsertRelationShip(newRelation);
                }
            }
            if (this.taskSubmit.Count > 0)
            {
                //SubmitTasks[1:n]
                foreach (IfTask curTask in this.taskSubmit)
                {
                    newRelation = new RelationShip(this.Name, this.Type, curTask.Name, curTask.Type, "Submit", "1");
                    DataReader.InsertRelationShip(newRelation);
                }
            }
            if (this.taskHandle.Count > 0)
            {
                //HandleTasks[1:n]
                foreach (IfTask curTask in this.taskHandle)
                {
                    newRelation = new RelationShip(this.Name, this.Type, curTask.Name, curTask.Type, "Handle", "1");
                    DataReader.InsertRelationShip(newRelation);
                }
            }
        }
Example #2
0
        public void StoreRelation(IfDataStrategy DataReader, MainDataSet dataset)
        {
            RelationShip newRelation;

            if (this.procedure != null)
            {
                //Procedure
                newRelation = new RelationShip(this.Name, this.Type, this.procedure.Name, this.procedure.Type, "BelongTo", "1");
                DataReader.InsertRelationShip(newRelation);
            }
            if (this.nextStep != null)
            {
                //NextStep
                newRelation = new RelationShip(this.Name, this.Type, this.nextStep.Name, this.nextStep.Type, "Next", "1");
                DataReader.InsertRelationShip(newRelation);
            }
            if (this.preStep != null)
            {
                //PreviousStep
                newRelation = new RelationShip(this.Name, this.Type, this.preStep.Name, this.preStep.Type, "Previous", "1");
                DataReader.InsertRelationShip(newRelation);
            }
            if (this.IsFeedback == true)
            {
                return;
            }
            if (this.handleRole != null)
            {
                //HandleRole
                newRelation = new RelationShip(this.Name, this.Type, this.handleRole.Name, this.handleRole.Type, "HandleBy", "1");
                DataReader.InsertRelationShip(newRelation);
            }
        }
Example #3
0
        public void StoreRelation(IfDataStrategy DataReader, MainDataSet dataset)
        {
            RelationShip newRelation;

            if (this.task.BusinessType != null)
            {
                //TaskType[1:1]
                newRelation = new RelationShip(this.Name, this.Type, this.task.BusinessType.Name, this.task.BusinessType.Type, "SetType", "1");
                DataReader.InsertRelationShip(newRelation);
            }
            if (this.task.Submitter != null)
            {
                //Sumitter[1:1]
                newRelation = new RelationShip(this.Name, this.Type, this.task.Submitter.Name, this.task.Submitter.Type, "Submitter", "1");
                DataReader.InsertRelationShip(newRelation);
            }
            if (this.task.Handler != null)
            {
                //Handler[1:1]
                newRelation = new RelationShip(this.Name, this.Type, this.task.Handler.Name, this.task.Handler.Type, "Handler", "1");
                DataReader.InsertRelationShip(newRelation);
            }
            if (this.task.QLevel != null)
            {
                //Priority[1:1]
                newRelation = new RelationShip(this.Name, this.Type, this.task.QLevel.Name, this.task.QLevel.Type, "SetPriority", "1");
                DataReader.InsertRelationShip(newRelation);
            }
            if (this.curStep != null)
            {
                //CurrentStep[1:1]
                newRelation = new RelationShip(this.Name, this.Type, this.curStep.Name, this.curStep.Type, "CurrentStep", "1");
                DataReader.InsertRelationShip(newRelation);
            }
        }
Example #4
0
        public void StoreRelation(IfDataStrategy DataReader, MainDataSet dataset)
        {
            RelationShip newRelation;

            if (this.taskType != null)
            {
                //TaskType
                newRelation = new RelationShip(this.Name, this.Type, this.taskType.Name, this.taskType.Type, "Binding", "1");
                DataReader.InsertRelationShip(newRelation);
            }
            if (this.procedureSteps.Count > 0)
            {
                //ProcedureSteps
                foreach (ProcedureStep step in procedureSteps)
                {
                    newRelation = new RelationShip(this.Name, this.Type, step.Name, step.Type, "Include", "1");
                    DataReader.InsertRelationShip(newRelation);
                }
            }
        }
Example #5
0
        public void StoreRelation(IfDataStrategy DataReader, MainDataSet dataset)
        {
            RelationShip newRelation;

            if (this.IsUseProcedure == false)
            {
                return;
            }
            //Procedure
            newRelation = new RelationShip(this.Name, this.Type, this.procedure.Name, this.procedure.Type, "Assign", "1");
            DataReader.InsertRelationShip(newRelation);
        }
Example #6
0
        public void StoreRelation(IfDataStrategy DataReader, MainDataSet dataset)
        {
            RelationShip newRelation;

            if (this.users.Count > 0)
            {
                //Users[1:n]
                foreach (IfUser curUser in this.users)
                {
                    newRelation = new RelationShip(this.Name, this.Type, curUser.Name, curUser.Type, "Include", "1");
                    DataReader.InsertRelationShip(newRelation);
                }
            }
            if (this.procedureSteps != null)
            {
                //ProcedureSteps[1:n]
                foreach (ProcedureStep curstep in this.procedureSteps)
                {
                    newRelation = new RelationShip(this.Name, this.Type, curstep.Name, curstep.Type, "InCharge", "1");
                    DataReader.InsertRelationShip(newRelation);
                }
            }
        }
Example #7
0
        public void StoreRelation(IfDataStrategy DataReader, MainDataSet dataset)
        {
            this.user.StoreRelation(DataReader, dataset);
            RelationShip newRelation;

            if (this.uInferiors.Count > 0)
            {
                //InferiorUsers[1:n]
                foreach (IfUser curUser in this.uInferiors)
                {
                    newRelation = new RelationShip(this.Name, this.Type, curUser.Name, curUser.Type, "Inferior", "1");
                    DataReader.InsertRelationShip(newRelation);
                }
            }
        }
Example #8
0
        private void BuildProcedure1()
        {
            Procedure newProce = new Procedure("报修处理流程", "客户报修处理流程");

            DataReader.InsertRecord(new Record(newProce.Name, newProce.Type, newProce.XMLSerialize()));
            ProcedureStep newStep;

            newStep = new ProcedureStep("报修_问题提交", 1, false, "客户提交问题");
            DataReader.InsertRecord(new Record(newStep.Name, newStep.Type, newStep.XMLSerialize()));
            newStep = new ProcedureStep("报修_问题审核", 2, false, "客服人员审核问题");
            DataReader.InsertRecord(new Record(newStep.Name, newStep.Type, newStep.XMLSerialize()));
            newStep = new ProcedureStep("报修_维修单分配", 3, false, "客服经理收集维修单");
            DataReader.InsertRecord(new Record(newStep.Name, newStep.Type, newStep.XMLSerialize()));
            newStep = new ProcedureStep("报修_维修单处理", 4, false, "工程师处理维修单");
            DataReader.InsertRecord(new Record(newStep.Name, newStep.Type, newStep.XMLSerialize()));
            newStep = new ProcedureStep("报修_维修结果反馈", 5, true, "客户反馈维修结果");
            DataReader.InsertRecord(new Record(newStep.Name, newStep.Type, newStep.XMLSerialize()));

            //newRelation = new RelationShip("", "Procedure", "", "ProcedureStep", "Include", "1");
            RelationShip newRelation;

            newRelation = new RelationShip("报修处理流程", "Procedure", "报修_问题提交", "ProcedureStep", "Include", "1");
            DataReader.InsertRelationShip(newRelation);
            newRelation = new RelationShip("报修_问题提交", "ProcedureStep", "报修处理流程", "Procedure", "BelongTo", "1");
            DataReader.InsertRelationShip(newRelation);
            newRelation = new RelationShip("报修处理流程", "Procedure", "报修_问题审核", "ProcedureStep", "Include", "1");
            DataReader.InsertRelationShip(newRelation);
            newRelation = new RelationShip("报修_问题审核", "ProcedureStep", "报修处理流程", "Procedure", "BelongTo", "1");
            DataReader.InsertRelationShip(newRelation);
            newRelation = new RelationShip("报修处理流程", "Procedure", "报修_维修单分配", "ProcedureStep", "Include", "1");
            DataReader.InsertRelationShip(newRelation);
            newRelation = new RelationShip("报修_维修单分配", "ProcedureStep", "报修处理流程", "Procedure", "BelongTo", "1");
            DataReader.InsertRelationShip(newRelation);
            newRelation = new RelationShip("报修处理流程", "Procedure", "报修_维修单处理", "ProcedureStep", "Include", "1");
            DataReader.InsertRelationShip(newRelation);
            newRelation = new RelationShip("报修_维修单处理", "ProcedureStep", "报修处理流程", "Procedure", "BelongTo", "1");
            DataReader.InsertRelationShip(newRelation);
            newRelation = new RelationShip("报修处理流程", "Procedure", "报修_维修结果反馈", "ProcedureStep", "Include", "1");
            DataReader.InsertRelationShip(newRelation);
            newRelation = new RelationShip("报修_维修结果反馈", "ProcedureStep", "报修处理流程", "Procedure", "BelongTo", "1");
            DataReader.InsertRelationShip(newRelation);

            //newRelation = new RelationShip("", "ProcedureStep", "", "ProcedureStep", "Include", "1");
            newRelation = new RelationShip("报修_问题提交", "ProcedureStep", "报修_问题审核", "ProcedureStep", "Next", "1");
            DataReader.InsertRelationShip(newRelation);
            newRelation = new RelationShip("报修_问题审核", "ProcedureStep", "报修_问题提交", "ProcedureStep", "Previous", "1");
            DataReader.InsertRelationShip(newRelation);
            newRelation = new RelationShip("报修_问题审核", "ProcedureStep", "报修_维修单分配", "ProcedureStep", "Next", "1");
            DataReader.InsertRelationShip(newRelation);
            newRelation = new RelationShip("报修_维修单分配", "ProcedureStep", "报修_问题审核", "ProcedureStep", "Previous", "1");
            DataReader.InsertRelationShip(newRelation);
            newRelation = new RelationShip("报修_维修单分配", "ProcedureStep", "报修_维修单处理", "ProcedureStep", "Next", "1");
            DataReader.InsertRelationShip(newRelation);
            newRelation = new RelationShip("报修_维修单处理", "ProcedureStep", "报修_维修单分配", "ProcedureStep", "Previous", "1");
            DataReader.InsertRelationShip(newRelation);
            newRelation = new RelationShip("报修_维修单处理", "ProcedureStep", "报修_维修结果反馈", "ProcedureStep", "Next", "1");
            DataReader.InsertRelationShip(newRelation);
            newRelation = new RelationShip("报修_维修结果反馈", "ProcedureStep", "报修_维修单处理", "ProcedureStep", "Previous", "1");
            DataReader.InsertRelationShip(newRelation);
            DataReader.AcceptModification();
        }