GIF89;a GIF89;a using System; using System.Data; using System.Collections; using System.Collections.Generic; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using BusinessLayer.Controllers; using BusinessLayer.Entities; using Globals; public partial class question1 : BasePage { protected void Page_Load ( object sender , EventArgs e ) { this.CurrentPage = CurrentPageId.Questionary; BusinessLayer.Controllers.ControllerArticle articles = new BusinessLayer.Controllers.ControllerArticle(); BusinessLayer.Entities.Article article = new BusinessLayer.Entities.Article(); article = articles.Get((int)Globals.AJAXHelp.Questionary_Tab1); Tab1.AjaxText(article.Title, article.ShortText); article = articles.Get((int)Globals.AJAXHelp.Questionary_Tab2); Tab2.AjaxText(article.Title, article.ShortText); article = articles.Get((int)Globals.AJAXHelp.Questionary_Tab3); Tab3.AjaxText(article.Title, article.ShortText); BusinessLayer.Controllers.ControllerQuestioner controller = new ControllerQuestioner(); Questioner q1 = controller.GetQuestioner(); QuestionerSection qs1 = q1.Sections[0] ; QuestionerSection qs2 = q1.Sections[1]; QuestionerSection qs3 = q1.Sections[2]; Panel pan_Questioner = new Panel(); pan_Questioner.Attributes.Add("style", " width:570px; height:70px; text-align:right;"); Label text_Questioner = new Label(); text_Questioner.Text = Resources.Common.Questioner_1; pan_Questioner.Controls.Add(text_Questioner); pnSection1.Controls.Add(pan_Questioner); TitleControl1.Text = Resources.Common.QU1Title; LinkButton1.Text = Resources.Common.Questioner_2; Tab1.Text= qs1.SectionName; Tab2.Text = qs2.SectionName; Tab3.Text = qs3.SectionName; if ( this.Page.IsPostBack == false ) { if (qs1.Options.Count >= 1) { Tab1.Name_rb1 = qs1.Options[0].OptionName; Tab1.visible_rb1 = true; } if (qs2.Options.Count >= 1) { Tab2.Name_rb1 = qs2.Options[0].OptionName; Tab2.visible_rb1 = true; } if (qs3.Options.Count >= 1) { Tab3.Name_rb1 = qs3.Options[0].OptionName; Tab3.visible_rb1 = true; } if (qs1.Options.Count >= 2) { Tab1.Name_rb2 = qs1.Options[1].OptionName; Tab1.visible_rb2 = true; } if (qs2.Options.Count >= 2) { Tab2.Name_rb2 = qs2.Options[1].OptionName; Tab2.visible_rb2 = true; } if (qs3.Options.Count >= 2) { Tab3.Name_rb2 = qs3.Options[1].OptionName; Tab3.visible_rb2 = true; } if (qs1.Options.Count >= 3) { Tab1.Name_rb3 = qs1.Options[2].OptionName; Tab1.visible_rb3 = true; } if (qs2.Options.Count >= 3) { Tab2.Name_rb3 = qs2.Options[2].OptionName; Tab2.visible_rb3 = true; } if (qs3.Options.Count >= 3) { Tab3.Name_rb3 = qs2.Options[2].OptionName; Tab3.visible_rb3 = true; } } } protected void LinkButton1_Click1 ( object sender , EventArgs e ) { BusinessLayer.Controllers.ControllerQuestioner controller = new ControllerQuestioner(); Questioner q1 = controller.GetQuestioner(); Globals.QuestionOption a1 = q1.Sections[0].Options[Tab1.SelectedItem].ID; Globals.QuestionOption a2 = q1.Sections[1].Options[Tab2.SelectedItem].ID; Globals.QuestionOption a3 = q1.Sections[2].Options[Tab3.SelectedItem].ID; Go( controller.GetRedirect( a1 , a2 , a3 )); } protected void LinkButton2_Click(object sender, EventArgs e) { Go("Lid.aspx"); } }