public void ExtractRelation(IfDataStrategy DataReader, MainDataSet dataset) { //UserRoles[1:n] this.usrGroups.Clear(); List <string> groups = DataReader.GetDNodesBySNodeandEdgeType(this.Name, this.Type, "BelongTo"); foreach (string group in groups) { this.usrGroups.Add(dataset.GetGroupItem(group)); } List <string> tasks; //SubmitTasks[1:n] this.taskSubmit.Clear(); tasks = DataReader.GetDNodesBySNodeandEdgeType(this.Name, this.Type, "Submit"); foreach (string taskname in tasks) { this.taskSubmit.Add(dataset.GetTaskItem(taskname)); } //HandleTasks[1:n] this.taskHandle.Clear(); tasks = DataReader.GetDNodesBySNodeandEdgeType(this.Name, this.Type, "Handle"); foreach (string taskname in tasks) { this.taskHandle.Add(dataset.GetTaskItem(taskname)); } }
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); } } }
public void ExtractRelation(IfDataStrategy DataReader, MainDataSet dataset) { //Procedure Record record = DataReader.GetDNodeBySNodeandEdgeType(this.Name, this.Type, "Assign"); this.procedure = dataset.GetProcedureItem(record.Name); }
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); } }
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); } }
private static MainDataSet _dataset; //(2) public static MainDataSet GetDataSet() //(3) { if (_dataset == null) { _dataset = new MainDataSet(); } return(_dataset); }
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); }
public void ExtractRelation(IfDataStrategy DataReader, MainDataSet dataset) { //TaskType Record record = DataReader.GetDNodeBySNodeandEdgeType(this.Name, this.Type, "Binding"); this.taskType = dataset.GetTypeItem(record.Name); //ProcedureSteps this.procedureSteps.Clear(); List <string> steps = DataReader.GetDNodesBySNodeandEdgeType(this.Name, this.Type, "Include"); foreach (string stepname in steps) { this.procedureSteps.Add(dataset.GetStepItem(stepname)); } procedureSteps.Sort(); }
public void ExtractRelation(IfDataStrategy DataReader, MainDataSet dataset) { Record record; //TaskType[1:1] record = DataReader.GetDNodeBySNodeandEdgeType(this.Name, this.Type, "SetType"); this.task.BusinessType = dataset.GetTypeItem(record.Name); //Sumitter[1:1] record = DataReader.GetDNodeBySNodeandEdgeType(this.Name, this.Type, "Submitter"); this.task.Submitter = dataset.GetUserItem(record.Name); //Handler[1:1] record = DataReader.GetDNodeBySNodeandEdgeType(this.Name, this.Type, "Handler"); this.task.Handler = dataset.GetUserItem(record.Name); //Priority[1:1] record = DataReader.GetDNodeBySNodeandEdgeType(this.Name, this.Type, "SetPriority"); this.task.QLevel = dataset.GetQlevelItem(record.Name); UpdatePriority(); }
public void UpdateRelation(IfDataStrategy DataReader, MainDataSet dataset) { //Users[1:n] this.users.Clear(); List <string> sUsers = DataReader.GetDNodesBySNodeandEdgeType(this.Name, this.Type, "Include"); foreach (string username in sUsers) { this.users.Add(dataset.GetUserItem(username)); } //ProcedureStep[1:n] this.procedureSteps.Clear(); List <string> sSteps = DataReader.GetDNodesBySNodeandEdgeType(this.Name, this.Type, "InCharge"); foreach (string stepname in sSteps) { this.procedureSteps.Add(dataset.GetStepItem(stepname)); } }
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); } } }
public void ExtractRelation(IfDataStrategy DataReader, MainDataSet dataset) { Record record; //Procedure record = DataReader.GetDNodeBySNodeandEdgeType(this.Name, this.Type, "BelongTo"); this.procedure = dataset.GetProcedureItem(record.Name); //NextStep record = DataReader.GetDNodeBySNodeandEdgeType(this.Name, this.Type, "Next"); this.nextStep = dataset.GetStepItem(record.Name); //PreviousStep record = DataReader.GetDNodeBySNodeandEdgeType(this.Name, this.Type, "Previous"); this.preStep = dataset.GetStepItem(record.Name); if (this.IsFeedback == true) { return; } //HandleRole record = DataReader.GetDNodeBySNodeandEdgeType(this.Name, this.Type, "HandleBy"); this.handleRole = dataset.GetGroupItem(record.Name); }
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); } } }