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)); } }