Hi Team,
I want to know how to create nodes multiple with single node means,
I have one Plan for this plan i am getting multiple tasks are available for this how i need to take loop through all tasks direct to that particular plan by using Simple_EmployeeSymbol_CS class.
i am facing last node information only
Simple_EmployeeSymbol_CS planNode = new Simple_EmployeeSymbol_CS();
Simple_EmployeeSymbol_CS taskNode = new Simple_EmployeeSymbol_CS();
Simple_EmployeeSymbol_CS stepNode = new Simple_EmployeeSymbol_CS();
foreach (DataRow row in dtPlan.Rows)
{
planNode.FillStyle.Color = Color.FromArgb(125, 162, 163);
planNode.LineStyle.LineColor = Color.BlanchedAlmond;
planNode.EmployeeName = row["PlanID"].ToString();
planNode.PinPoint = new PointF(600, 200);
planNode.EnableShading = true;
this.DiagramWebControl1.Model.AppendChild(planNode);
// Tasks
taskNode.FillStyle.Color = Color.FromArgb(125, 162, 163);
taskNode.LineStyle.LineColor = Color.BlanchedAlmond;
taskNode.EmployeeName = row["TaskName"].ToString();
taskNode.PinPoint = new PointF(600, 300);
taskNode.EnableShading = true;
this.DiagramWebControl1.Model.AppendChild(taskNode);
// steps
DataTable dtSteps = GetRecoveryStepsData(Convert.ToInt32(row["TaskID"].ToString()));
int count= dtSteps.Rows.Count;
// here i am getting multiple records this i want show in dashboard (Step2, Step1, ...Like) foreach (DataRow rowstep in dtSteps.Rows)
{
stepNode.FillStyle.Color = Color.FromArgb(125, 162, 163);
stepNode.LineStyle.LineColor = Color.BlanchedAlmond;
stepNode.EmployeeName = rowstep["StepName"].ToString();
stepNode.PinPoint = new PointF(iYCoodinates,380);
stepNode.EnableShading = true;
this.DiagramWebControl1.Model.AppendChild(stepNode);
steoStatus.FillStyle.Color = Color.FromArgb(125, 162, 163);
steoStatus.LineStyle.LineColor = Color.BlanchedAlmond;
steoStatus.EmployeeName = rowstep["Status"].ToString();
steoStatus.PinPoint = new PointF(iYCoodinates,530);
steoStatus.EnableShading = true;
this.DiagramWebControl1.Model.AppendChild(steoStatus);
ConnectNodes(taskNode, stepNode);
ConnectNodes(steoStatus, stepNode);
}
ConnectNodes(procNode, planNode);
ConnectNodes(planNode, taskNode);
}
see this
Please reply me asap.