public static void GetAll(Model_Assessment parameters) { IList <Model_Assessment> ret = AssessmentController.GetAssessmentList(parameters); AppTools.SendResponse(HttpContext.Current.Response, ret.ObjectToJSON()); }
public string GenQuestionTypeScale(Model_Assessment ass) { //List<Model_Assessment_Choice> choice = ass.AssChoice; StringBuilder ret = new StringBuilder(); ret.Append("<h1 class=\"step_count\"></h1>"); ret.Append("<div class=\"step-content\">"); ret.Append("<input type=\"hidden\" name=\"ass_fill_\" value=\"" + ass.ASID + "\" />"); ret.Append("<div class=\"text-center m-t-md\">"); ret.Append("<h2>" + ass.Questions + "</h2>"); ret.Append("<div class=\"question-type q-type-scale\">"); ret.Append("<div class=\"col-md-3 left-ele\" >" + ass.LeftScaleTitle + " </div>"); ret.Append("<div class=\"col-md-6 choice-ele\">"); ret.Append("<table>"); ret.Append("<tr>"); for (int i = ass.StartRank; i <= ass.EndRank; i++) { ret.Append("<td>" + i + "</td>"); } //ret.Append("<td>1</td> <td>2</td> <td>3</td> <td>4</td> <td>5</td>"); ret.Append("</tr>"); ret.Append("<tr>"); for (int i = ass.StartRank; i <= ass.EndRank; i++) { ret.Append("<td><input type=\"radio\" name=\"ass_fill_i_sc_" + ass.ASID + "\" value=\"" + i + "\" /></td>"); } ret.Append("</tr>"); ret.Append("</table>"); ret.Append("</div>"); ret.Append("<div class=\"col-md-3 right-ele\"> " + ass.RigthScaleTitle + "</div>"); ret.Append("</div>"); ret.Append("</div>"); ret.Append("</div>"); return(ret.ToString()); }
protected void Button1_Click(object sender, EventArgs e) { int section = int.Parse(dropSection.SelectedValue); //int? intSUCID = null; //int? intSUCIDLF = null; //int? intSUCIDRT = null; //if(intSUCID == 7) //{ // intSUCIDLF = int.Parse(dropsub.SelectedValue); // // intSUCIDRT = int.Parse(dropsubrigth.SelectedValue); //} //else //{ // intSUCID = int.Parse(dropsub.SelectedValue); //} List <Model_Assessment_Choice> cl = new List <Model_Assessment_Choice>(); if (!string.IsNullOrEmpty(Request.Form["chk_choice"])) { string[] arrchoice = Request.Form["chk_choice"].Split(','); foreach (string i in arrchoice) { cl.Add(new Model_Assessment_Choice { Questions = Request.Form["question_s_" + i], Priority = int.Parse(Request.Form["pri_s_" + i]), SUCID = int.Parse(Request.Form["sel_sub_" + i]), Code = Request.Form["choice_sub_s_" + i] }); } } Model_Assessment ass = new Model_Assessment { Questions = QuestionTitle.Text.Trim(), Code = txtCode.Text.Trim(), SCID = int.Parse(dropSection.SelectedValue), SUCID = int.Parse(dropsub.SelectedValue), SUCID2 = string.IsNullOrEmpty(dropsub2.SelectedValue) ? (int?)null : int.Parse(dropsub2.SelectedValue), Status = bool.Parse(status.SelectedValue), QTID = byte.Parse(dropQType.SelectedValue), Priority = int.Parse(txtpri.Text.Trim()), StartRank = int.Parse(txtStartRank.Text.Trim()), EndRank = int.Parse(txtEndRank.Text.Trim()), AssChoice = cl, Side = byte.Parse(dropside.SelectedValue), GroupName = txtGroup.Text.Trim(), LeftScaleTitle = leftTitle.Text, RigthScaleTitle = rightTitle.Text }; Button btn = (Button)sender; if (!string.IsNullOrEmpty(Request.QueryString["ass"])) { int intID = int.Parse(Request.QueryString["ass"]); ass.ASID = intID; if (AssessmentController.EditAssessment(ass)) { Response.Redirect("Assessment?Section=" + dropSection.SelectedValue); } } else { int Assid = AssessmentController.AddAssessment(ass); if (Assid > 0) { Response.Redirect("Assessment?Section=" + dropSection.SelectedValue); //Model_Assessment_Choice // Response.Redirect(Request.Url.ToString()); } } }
protected void Page_Load(object sender, EventArgs e) { if (!this.Page.IsPostBack) { List <Model_AsSection> sec = AssessmentController.GetSectionList(true); dropSection.DataSource = sec; dropSection.DataTextField = "Title"; dropSection.DataValueField = "SCID"; dropSection.DataBind(); dropsecs.DataSource = sec; dropsecs.DataTextField = "Title"; dropsecs.DataValueField = "SCID"; dropsecs.DataBind(); dropQType.DataSource = AssessmentController.GetQTypeAllByStatus(true); dropQType.DataTextField = "Title"; dropQType.DataValueField = "QTID"; dropQType.DataBind(); Model_AsSection secs = AssessmentController.getSectionByID(int.Parse(dropSection.SelectedValue)); //txtCode.Text = secs.Code.ToString(); Model_AsSubSection ss = new Model_AsSubSection { SCID = int.Parse(dropSection.SelectedValue) }; Model_AsSubSection2 ss2 = new Model_AsSubSection2 { SCID = int.Parse(dropSection.SelectedValue) }; List <Model_AsSubSection> sub = AssessmentController.getSubsectionBySecId(ss); dropsub.DataSource = sub; dropsub.DataTextField = "Title"; dropsub.DataValueField = "SUCID"; dropsub.DataBind(); List <Model_AsSubSection2> sub2 = AssessmentController.getSubsectionBySecId2(ss2); dropsub2.DataSource = sub2; dropsub2.DataTextField = "Title"; dropsub2.DataValueField = "SUCID2"; dropsub2.DataBind(); if (!string.IsNullOrEmpty(Request.QueryString["ass"])) { add_section.Visible = true; byte id = byte.Parse(Request.QueryString["ass"]); Model_Assessment ass = AssessmentController.GetAssessmentByID(id); if (ass != null) { if (ass.AssChoice.Count > 0) { dropChoice_ret.DataSource = ass.AssChoice; dropChoice_ret.DataTextField = "CombindValue"; dropChoice_ret.DataValueField = "Priority"; dropChoice_ret.DataBind(); } dropside.SelectedValue = ass.Side.ToString(); QuestionTitle.Text = ass.Questions; txtCode.Text = ass.Code; dropQType.SelectedValue = ass.QTID.ToString(); txtpri.Text = ass.Priority.ToString(); txtStartRank.Text = ass.StartRank.ToString(); txtEndRank.Text = ass.EndRank.ToString(); status.SelectedValue = ass.Status.ToString(); Model_AsSubSection sss = new Model_AsSubSection { SCID = ass.SCID }; List <Model_AsSubSection> sub_edit = AssessmentController.getSubsectionBySecId(sss); dropsub.DataSource = sub_edit; dropsub.DataTextField = "Title"; dropsub.DataValueField = "SUCID"; dropsub.DataBind(); dropSection.SelectedValue = ass.SCID.ToString(); Model_AsSubSection2 sss2 = new Model_AsSubSection2 { SCID = ass.SCID }; List <Model_AsSubSection2> sub_edit2 = AssessmentController.getSubsectionBySecId2(sss2); dropsub2.DataSource = sub_edit2; dropsub2.DataTextField = "Title"; dropsub2.DataValueField = "SUCID2"; dropsub2.DataBind(); dropsecs.SelectedValue = (string.IsNullOrEmpty(this.qSection) ? ass.SCID.ToString() : this.qSection); dropsub.SelectedValue = ass.SUCID.ToString(); dropsub2.SelectedValue = ass.SUCID2.ToString(); leftTitle.Text = ass.LeftScaleTitle; rightTitle.Text = ass.RigthScaleTitle; txtGroup.Text = ass.GroupName; } } } if (!string.IsNullOrEmpty(Request.QueryString["tab"])) { string tab = Request.QueryString["tab"]; switch (tab) { case "2": tab1.Attributes.Add("aria-expanded", "false"); //tab2.Attributes.Add("aria-expanded", "true"); //tab3.Attributes.Add("aria-expanded", "false"); //tab4.Attributes.Add("aria-expanded", "false"); li_tab1.Attributes.Remove("class"); //li_tab2.Attributes.Add("class", "active"); //li_tab3.Attributes.Remove("class"); //li_tab4.Attributes.Remove("class"); tab_content1.Visible = false; //tab_content2.Visible = true; //tab_content3.Visible = false; //tab_content4.Visible = false; //List<Model_AsSection> sec = AssessmentController.GetSectionList(); //dropSection.DataSource = sec; //dropSection.DataTextField = "Title"; //dropSection.DataValueField = "SCID"; //dropSection.DataBind(); //dropsection2.DataSource = sec; //dropsection2.DataTextField = "Title"; //dropsection2.DataValueField = "SCID"; //dropsection2.DataBind(); //ListItem lis = new ListItem("All", "0"); //dropsection2.Items.Insert(0, lis); break; case "3": tab1.Attributes.Add("aria-expanded", "false"); //tab2.Attributes.Add("aria-expanded", "false"); //tab3.Attributes.Add("aria-expanded", "true"); //tab4.Attributes.Add("aria-expanded", "false"); li_tab1.Attributes.Remove("class"); //li_tab2.Attributes.Remove("class"); //li_tab3.Attributes.Add("class", "active"); //li_tab4.Attributes.Remove("class"); tab_content1.Visible = false; //tab_content2.Visible = false; //tab_content3.Visible = true; //tab_content4.Visible = false; break; case "4": tab1.Attributes.Add("aria-expanded", "false"); //tab2.Attributes.Add("aria-expanded", "false"); //tab3.Attributes.Add("aria-expanded", "false"); //tab4.Attributes.Add("aria-expanded", "true"); li_tab1.Attributes.Remove("class"); //li_tab2.Attributes.Remove("class"); //li_tab3.Attributes.Remove("class"); //li_tab4.Attributes.Add("class", "active"); tab_content1.Visible = false; //tab_content2.Visible = false; //tab_content3.Visible = false; //tab_content4.Visible = true; Model_AssesIntro ai = AssessmentController.GetAssIntro(); //txtIntroTitle.Text = ai.Title; //txtIntroContent.Text = ai.Description; break; } } else { tab_content1.Visible = true; //tab_content2.Visible = false; //tab_content3.Visible = false; //tab_content4.Visible = false; tab1.Attributes.Add("aria-expanded", "true"); //tab2.Attributes.Add("aria-expanded", "false"); //tab3.Attributes.Add("aria-expanded", "false"); //tab4.Attributes.Add("aria-expanded", "false"); li_tab1.Attributes.Add("class", "active"); //li_tab2.Attributes.Remove("class"); //li_tab3.Attributes.Remove("class"); //li_tab4.Attributes.Remove("class"); } }
public int InsertUserAssessment(Model_UsersAssessment uass) { int ret = 0; Model_Assessment ass = new Model_Assessment(); ass = ass.GetAssessmentByID(uass.ASID); if (ass != null) { using (SqlConnection cn = new SqlConnection(this.ConnectionString)) { SqlCommand cmd = new SqlCommand(@"INSERT INTO UserAssessment (TransactionID,Score,ASID,Code,Questions,SCID,SUCID,Status,IsHide,QTID,Priority, StartRank,EndRank,GroupName,Side,LeftScaleTitle,RigthScaleTitle,Combind,SUCID2) VALUES (@TransactionID,@Score,@ASID,@Code,@Questions,@SCID,@SUCID,@Status,@IsHide,@QTID,@Priority, @StartRank,@EndRank,@GroupName,@Side,@LeftScaleTitle,@RigthScaleTitle,@Combind,@SUCID2);SET @TASID = SCOPE_IDENTITY();", cn); cn.Open(); cmd.Parameters.Add("@TransactionID", SqlDbType.Int).Value = uass.TransactionID; cmd.Parameters.Add("@ASID", SqlDbType.Int).Value = uass.ASID; cmd.Parameters.Add("@Score", SqlDbType.Int).Value = uass.Score; cmd.Parameters.Add("@Code", SqlDbType.NVarChar).Value = ass.Code; cmd.Parameters.Add("@Questions", SqlDbType.NVarChar).Value = ass.Questions; cmd.Parameters.Add("@SCID", SqlDbType.Int).Value = ass.SCID; cmd.Parameters.Add("@SUCID", SqlDbType.Int).Value = ass.SUCID; cmd.Parameters.Add("@Status", SqlDbType.Bit).Value = ass.Status; cmd.Parameters.Add("@IsHide", SqlDbType.Bit).Value = ass.IsHide; cmd.Parameters.Add("@QTID", SqlDbType.TinyInt).Value = ass.QTID; cmd.Parameters.Add("@Priority", SqlDbType.Int).Value = ass.Priority; cmd.Parameters.Add("@StartRank", SqlDbType.Int).Value = ass.StartRank; cmd.Parameters.Add("@EndRank", SqlDbType.Int).Value = ass.EndRank; cmd.Parameters.Add("@GroupName", SqlDbType.NVarChar).Value = ass.GroupName; cmd.Parameters.Add("@Side", SqlDbType.TinyInt).Value = ass.Side; cmd.Parameters.Add("@LeftScaleTitle", SqlDbType.NVarChar).Value = ass.LeftScaleTitle; cmd.Parameters.Add("@RigthScaleTitle", SqlDbType.NVarChar).Value = ass.RigthScaleTitle; cmd.Parameters.Add("@Combind", SqlDbType.VarChar).Value = ass.SubCombind; if (ass.SUCID2.HasValue) { cmd.Parameters.Add("@SUCID2", SqlDbType.Int).Value = ass.SUCID2; } else { cmd.Parameters.AddWithValue("@SUCID2", DBNull.Value); } cmd.Parameters.Add("@TASID", SqlDbType.Int).Direction = ParameterDirection.Output; if (ExecuteNonQuery(cmd) > 0) { ret = (int)cmd.Parameters["@TASID"].Value; } } } return(ret); }
public string GenQuestionTypeRankingScalChoice(Model_Assessment ass) { StringBuilder ret = new StringBuilder(); ret.Append("<h1 class=\"step_count\"></h1>\r\n"); ret.Append("<div class=\"step-content\">\r\n"); ret.Append("<input type=\"hidden\" name=\"ass_fill_\" value=\"" + ass.ASID + "\" />\r\n"); ret.Append("<div class=\"text-center m-t-md\">\r\n"); ret.Append("<h2>" + ass.Questions + "</h2>\r\n"); ret.Append("<div class=\"question-type q-type-rank-scale-choice\">\r\n"); ret.Append("<div class=\"col-md-12 tbl-rank-scale\" >\r\n"); ret.Append("<table>\r\n"); ret.Append("<tr>\r\n"); ret.Append("<td class=\"question\"></td>\r\n"); ret.Append("<input type=\"hidden\" name=\"ass_fill_i_sc_" + ass.ASID + "\" value=\"0\" />"); for (int i = ass.StartRank; i <= ass.EndRank; i++) { if (i == ass.StartRank) { ret.Append("<td class=\"choice\">" + i + "<br /><span>" + ass.LeftScaleTitle + "</span></td>\r\n"); } else if (i == ass.EndRank) { ret.Append("<td class=\"choice\">" + i + "<br /> <span>" + ass.RigthScaleTitle + "</span> </td>\r\n"); } else { ret.Append("<td class=\"choice\">" + i + "</td>\r\n"); } } ret.Append(" </tr>\r\n"); List <Model_Assessment_Choice> choice = ass.AssChoice; if (choice.Count > 0) { foreach (Model_Assessment_Choice ch in choice) { ret.Append("<tr>\r\n"); ret.Append("<input type=\"hidden\" name=\"ass_fill_ch_" + ass.ASID + "\" value=\"" + ch.ASCID + "\" />\r\n"); ret.Append("<td class=\"question\">" + ch.Questions + "</td>\r\n"); for (int i = ass.StartRank; i <= ass.EndRank; i++) { ret.Append("<td class=\"choice\"><input type=\"radio\" name=\"ass_fill_ch_sc_" + ass.ASID + "_" + ch.ASCID + "\" value=\"" + i + "\" /></td>\r\n"); } ret.Append("</tr>\r\n"); } } ret.Append("</table>\r\n"); ret.Append("</div>\r\n"); ret.Append("</div>\r\n"); ret.Append("</div>\r\n"); ret.Append("</div>\r\n"); return(ret.ToString()); }
public string GenQuestionTypeRankLeftRigth(Model_Assessment ass) { //List<Model_Assessment_Choice> choice = ass.AssChoice; StringBuilder ret = new StringBuilder(); if (ass.Side == 1) { ret.Append("<h1 class=\"step_count\"></h1>"); ret.Append("<div class=\"step-content\">"); ret.Append("<input type=\"hidden\" name=\"ass_fill_\" value=\"" + ass.ASID + "\" />"); ret.Append("<div class=\"text-center m-t-md\">"); ret.Append("<h2></h2>"); ret.Append("<div class=\"question-type q-type-rank-scale-lr\">"); int col = (ass.EndRank - ass.StartRank) + 1; ret.Append("<div class=\"col-md-6 tbl-rank-scale-lr left\" >"); ret.Append("<table>"); ret.Append(" <tr><td colspan=\"" + col + "\" class=\"question left\">" + ass.Questions + "</td></tr>"); ret.Append("<tr>"); for (int i = ass.EndRank; i >= ass.StartRank; i--) { ret.Append("<td class=\"choice\">" + i + "</td>"); } //ret.Append("<tr><td class=\"choice\">1</td><td class=\"choice\">2</td><td class=\"choice\">3</td><td class=\"choice\">4</td>"); //ret.Append("<td class=\"choice\">5</td></tr>"); ret.Append("</tr><tr>"); for (int i = ass.StartRank; i <= ass.EndRank; i++) { ret.Append("<td class=\"choice\"><input type=\"radio\" name=\"ass_fill_i_sc_" + ass.ASID + "\" value=\"" + i + "\" /></td>"); } //ret.Append("<td class=\"choice\"><input type=\"radio\" name=\"le\" /></td>"); //ret.Append("<td class=\"choice\"><input type=\"radio\" name=\"le\" /></td>"); //ret.Append("<td class=\"choice\"><input type=\"radio\" name=\"le\" /></td>"); //ret.Append("<td class=\"choice\"><input type=\"radio\" name=\"le\" /></td>"); //ret.Append("<td class=\"choice\"><input type=\"radio\" name=\"le\" /></td>"); ret.Append("</tr>"); ret.Append("</table>"); ret.Append("</div>"); //ret.Append("<div class=\"col-md-1\"></div>"); } if (ass.Side == 2) { int col = (ass.EndRank - ass.StartRank) + 1; ret.Append("<input type=\"hidden\" name=\"ass_fill_\" value=\"" + ass.ASID + "\" />"); ret.Append("<div class=\"col-md-6 tbl-rank-scale-lr right\" >"); ret.Append("<table>"); ret.Append("<tr><td colspan=\"" + col + "\" class=\"question right\">" + ass.Questions + "</td></tr>"); ret.Append("<tr>"); for (int i = ass.StartRank; i <= ass.EndRank; i++) { ret.Append("<td class=\"choice\">" + i + "</td>"); } //ret.Append("<tr><td class=\"choice\">1</td><td class=\"choice\">2</td><td class=\"choice\">3</td><td class=\"choice\">4</td>"); //ret.Append("<td class=\"choice\">5</td></tr>"); ret.Append("</tr><tr>"); for (int i = ass.StartRank; i <= ass.EndRank; i++) { ret.Append("<td class=\"choice\"><input type=\"radio\" name=\"ass_fill_i_sc_" + ass.ASID + "\" value=\"" + i + "\" /></td>"); } // ret.Append("<td class=\"choice\"><input type=\"radio\" name=\"le\" /></td>"); //ret.Append("<td class=\"choice\"><input type=\"radio\" name=\"le\" /></td>"); //ret.Append("<td class=\"choice\"><input type=\"radio\" name=\"le\" /></td>"); //ret.Append("<td class=\"choice\"><input type=\"radio\" name=\"le\" /></td>"); //ret.Append("<td class=\"choice\"><input type=\"radio\" name=\"le\" /></td>"); ret.Append("</tr>"); ret.Append("</table>"); ret.Append("</div>"); ret.Append("</div>"); ret.Append("</div>"); ret.Append("</div>"); } return(ret.ToString()); }
protected void Page_Load(object sender, EventArgs e) { this.Page.Title = "KeenProfile Assessment"; if (!this.Page.IsPostBack) { if (!string.IsNullOrEmpty(Request.QueryString["success"])) { main_thanks.Visible = true; main_form.Visible = false; Model_AssesIntro intro = new Model_AssesIntro(); intro = intro.GetIntro(); ThanksTitle.Text = intro.ThanksTitle; ThanksDes.Text = convertcontent(intro.ThanksDes); } else { Model_Users u = this.UserActive; if (u != null) { //Get Main Intro Model_AssesIntro intro = new Model_AssesIntro(); intro = intro.GetIntro(); //Get Job Function Model_CJF cjf = new Model_CJF(); List <Model_CJF> cjflist = cjf.GetCJFeAll(); Model_UserCJF cjflistUser = new Model_UserCJF(); List <Model_UserCJF> cjfuserChecked = cjflistUser.GetListUsercjf(u.UserID); //Get Functional Competencies Model_FC fc = new Model_FC(); List <Model_FC> fclist = fc.GetFCAll(); Model_UserFC fcuser = new Model_UserFC(); List <Model_UserFC> fcuserchecked = fcuser.GetListUserFc(u.UserID); //Get Section Model_AsSection section = new Model_AsSection(); List <Model_AsSection> sectionlist = section.GetListSection(true); //Get Assessment Model_Assessment ass = new Model_Assessment(); List <Model_Assessment> asslist = ass.GetAssessmentAll(); //Get Country Model_Country c = new Model_Country(); List <Model_Country> ccountry = c.GetAllCountry(); dropNation.DataSource = ccountry; dropNation.DataTextField = "DropValue"; dropNation.DataValueField = "ID"; dropNation.DataBind(); dropNation.SelectedValue = "211"; StringBuilder strcjf = new StringBuilder(); StringBuilder strfc = new StringBuilder(); strcjf.Append("<div class=\"checkitem\">"); foreach (Model_CJF i in cjflist.Where(r => r.Status)) { string check = string.Empty; if (cjfuserChecked.Where(r => r.CJFID == i.CJFID).Count() > 0) { check = "Checked=\"Checked\""; } strcjf.Append("<div class=\"item\">"); strcjf.Append("<input type=\"radio\" name=\"chckCJF_form\" " + check + " class=\"role_cjf_valid\" value=\"" + i.CJFID + "\">"); strcjf.Append("<label>" + i.Title + "</label>"); strcjf.Append("</div>"); } strcjf.Append("</div>"); strfc.Append("<div class=\"checkitem\">"); foreach (Model_FC i in fclist) { string check = string.Empty; if (fcuserchecked.Where(r => r.FCID == i.FCID).Count() > 0) { check = "Checked=\"Checked\""; } strfc.Append("<div class=\"item\">"); strfc.Append("<input type=\"checkbox\" name=\"chckFC_form\" " + check + " class=\"role_fc_valid\" value=\"" + i.FCID + "\">"); strfc.Append("<label>" + i.Title + "</label>"); strfc.Append("</div>"); } strfc.Append("</div>"); chckCJF.Text = strcjf.ToString(); // checkFC.Text = strfc.ToString(); IntroTitle.Text = intro.Title; IntroDetail.Text = convertcontent(intro.Description); LastTitle.Text = intro.LastTitle; LastDes.Text = convertcontent(intro.LastDes); Maintitle.Text = intro.MainTitle; profiletitle.Text = intro.ProfileTitle; //fctitle.Text = intro.ProfileFCTitle; cjftitle.Text = intro.ProfileCJFTitle; StringBuilder ret = new StringBuilder(); foreach (Model_AsSection sec in sectionlist) { //string sIntro = sec.Title; //string sDetail = convertcontent(sec.Intro); List <Model_Assessment> list = asslist.Where(r => r.SCID == sec.SCID).OrderBy(r => r.Priority).ThenBy(r => r.GroupName).ToList(); if (list.Count > 0) { ret.Append(GenSectionIntro(sec)); foreach (Model_Assessment asi in list) { string question = asi.Questions; int rs = asi.StartRank; int rd = asi.EndRank; byte questionType = asi.QTID; // 1 Scale //4 Ranking Scale //5 Left / Right Ranking switch (questionType) { //Scale case 1: ret.Append(GenQuestionTypeScale(asi)); break; //Ranking Scale case 4: ret.Append(GenQuestionTypeRankingScalChoice(asi)); break; //Left / Right Ranking case 5: ret.Append(GenQuestionTypeRankLeftRigth(asi)); break; } } } } Stepcontent.Text = ret.ToString(); //Binding profile (initial data) heUserID.Value = u.UserID.ToString(); firstName.Text = (string.IsNullOrEmpty(u.FirstName) ? "" : u.FirstName); LastName.Text = (string.IsNullOrEmpty(u.LastName) ? "" : u.LastName); dropGender.SelectedValue = u.Gender.ToString(); dropNation.SelectedValue = u.Nationality.ToString(); day.Text = (u.DateofBirth != null? u.DateofBirth.ToString("yyy-MM-dd"): ""); txtPhon.Text = (string.IsNullOrEmpty(u.MobileNumber) ? "" : u.MobileNumber); } } } else { //Button btn = (Button)sender; //Response.Write(chckCJF.SelectedValue); } }