private void LoadQuestion(string move) { MESDSTableAdapters.VwFlowTableAdapter ta = new MESDSTableAdapters.VwFlowTableAdapter(); MESDS ds = new MESDS(); MESDS.VwFlowRow dr; switch (move) { case "First": lblNodeId.Text = ((Node)SessionClass.Flow[0]).from.ToString(); lblTitle.Text = ((Node)SessionClass.Flow[0]).fromTitle.ToString(); lblNodeType.Text = ((Node)SessionClass.Flow[0]).type.ToString(); RadioButtonList1.SelectedValue = ((Node)SessionClass.Flow[0]).decision.ToString(); lnkBtnFinish.Visible = false; break; case "Next": SessionClass.AddNode(SessionClass.Step - 1, int.Parse(lblNodeId.Text), RadioButtonList1.SelectedValue, lblTitle.Text, int.Parse(lblNodeType.Text)); ta.FillByIDndDec(ds.VwFlow, int.Parse(lblNodeId.Text), RadioButtonList1.SelectedValue.Equals("True")); if (ds.VwFlow.Rows.Count > 0) { dr = (MESDS.VwFlowRow)ds.VwFlow.Rows[0]; lblNodeId.Text = dr.NodeIdTo.ToString(); lblTitle.Text = dr.ToTitle; lblNodeType.Text = dr.NodeToType.ToString(); RadioButtonList1.SelectedIndex = 0; if (dr.NodeToType == 2) { lblTitle.Text = "Diagnosis Is : " + lblTitle.Text; lnkBtnFinish.Visible = true; lblNodeType.Text = "2"; SessionClass.AddNode(SessionClass.Step, int.Parse(lblNodeId.Text), RadioButtonList1.SelectedValue, lblTitle.Text, int.Parse(lblNodeType.Text)); } //if (dr.NodeToType == 3 || dr.NodeToType == 4) //{ // if (dr.NodeToType == 3) // { // } // else // { // } //} } else { lblNodeId.Text = "-1"; lblTitle.Text = "Please Contact your Doctor"; lnkBtnFinish.Visible = true; lblNodeType.Text = "2"; SessionClass.AddNode(SessionClass.Step, int.Parse(lblNodeId.Text), RadioButtonList1.SelectedValue, lblTitle.Text, int.Parse(lblNodeType.Text)); } break; case "Previous": lblNodeId.Text = ((Node)SessionClass.Flow[SessionClass.Step]).from.ToString(); lblTitle.Text = ((Node)SessionClass.Flow[SessionClass.Step]).fromTitle; lblNodeType.Text = ((Node)SessionClass.Flow[0]).type.ToString(); RadioButtonList1.SelectedValue = ((Node)SessionClass.Flow[SessionClass.Step]).decision.ToString(); break; } }