private void Page_Load(System.Object sender, System.EventArgs e) { //Dim FormFieldStats As Collection Collection FormStats = new Collection(); //Dim item As Collection string Target; Response.CacheControl = "no-cache"; Response.AddHeader("Pragma", "no-cache"); Response.Expires = -1; StyleSheetJS.Text = m_refStyle.GetClientScript(); //Put user code to initialize the page here ContentLanguage = m_refContentApi.ContentLanguage; AppImgPath = m_refContentApi.AppImgPath; FormId = Convert.ToInt64(Request.QueryString["id"]); DisplayType = Request.QueryString["display_type"]; Target = Request.QueryString["display_target"]; if (Request.QueryString["LangType"] != "") { ContentLanguage = Convert.ToInt32( Request.QueryString["LangType"]); m_refContentApi.SetCookieValue("LastValidLanguageID", ContentLanguage.ToString()); } else { if (m_refContentApi.GetCookieValue("LastValidLanguageID") != "") { ContentLanguage = int.Parse(m_refContentApi.GetCookieValue("LastValidLanguageID")); } } EnableMultilingual = m_refContentApi.EnableMultilingual; m_refContentApi.ContentLanguage = ContentLanguage; Security_info = m_refContentApi.LoadPermissions(FormId, "content", 0); objForm = m_refContentApi.EkModuleRef; if ((Convert.ToString(FormId) != "") && (FormId > 0)) { DefaultFormTitle = objForm.GetFormTitleById(FormId); } else { DefaultFormTitle = Request.QueryString["FormTitle"]; } int i; string strFieldNames = ""; string strFieldOptionNames = ""; string strFieldOptionValues = ""; ArrayList cResult = new ArrayList(); ArrayList cItem; Hashtable hshQuestions; long llResponses; cResult = m_refContentApi.GetFormDataHistogramById((int) FormId); //llResponses = CInt(cResult.Item(0)(0).ToString.Substring(cResult.Item(0)(0).ToString.IndexOf("responses") + 9)) llResponses = m_refContentApi.EkModuleRef.GetFormSubmissionsByFormId(FormId); hshQuestions = m_refContentApi.GetFormFieldQuestionsById((int) FormId); if (DisplayType == "1") { FormReportGrid.Visible = true; BoundColumn colBound; colBound = new System.Web.UI.WebControls.BoundColumn(); colBound.DataField = "Names"; colBound.HeaderText = ""; colBound.ItemStyle.VerticalAlign = VerticalAlign.Top; colBound.HeaderStyle.CssClass = "title-header"; colBound.ItemStyle.Wrap = false; FormReportGrid.Columns.Add(colBound); colBound = new System.Web.UI.WebControls.BoundColumn(); colBound.DataField = "Percent"; colBound.HeaderText = ""; colBound.HeaderStyle.CssClass = "title-header"; colBound.ItemStyle.Wrap = false; colBound.ItemStyle.VerticalAlign = VerticalAlign.Top; colBound.ItemStyle.HorizontalAlign = HorizontalAlign.Left; FormReportGrid.Columns.Add(colBound); FormReportGrid.BorderColor = System.Drawing.Color.White; DataTable dt = new DataTable(); //Dim dr As DataRow dt.Columns.Add(new DataColumn("Names", typeof(string))); dt.Columns.Add(new DataColumn("Percent", typeof(string))); int j; // loop through the names and value pairs to populate the dr and add the dr to dt lblTbl.Visible = true; lblTbl.Text = ""; lblTbl.Text = lblTbl.Text + "<Table>"; lblTbl.Text = lblTbl.Text + "<tr><td align=center><B><U>Responses - " + llResponses.ToString() + "</U></B></td></tr>"; lblTbl.Text = lblTbl.Text + "</table>"; for (i = 0; i <= cResult.Count - 1; i++) { //cItem = cResult[i]; cItem =(ArrayList) cResult[i]; lblTbl.Text = lblTbl.Text + "<Table>"; lblTbl.Text = lblTbl.Text + "<tr><td align=center><B><U>" + hshQuestions[cItem[0]] + "</U></B></td></tr>"; lblTbl.Text = lblTbl.Text + "</table>"; lblTbl.Text = lblTbl.Text + "<table>"; for (j = 1; j <= cItem.Count - 1; j++) { lblTbl.Text = lblTbl.Text + "<tr><td>"; lblTbl.Text = lblTbl.Text + "<b>" + (Convert.ToInt64((cItem[j].ToString().Substring(cItem[j].ToString().LastIndexOf(",") + 1))) * 100) / llResponses + "%" + "</b> " + cItem[j].ToString().Substring(0, System.Convert.ToInt32(cItem[j].ToString().LastIndexOf(",") - 5)); lblTbl.Text = lblTbl.Text + "</td></tr>"; } lblTbl.Text = lblTbl.Text + "</Table>"; } //dt.Rows.Add(dr) //Dim dv As New DataView(dt) //FormReportGrid.DataSource = dv //FormReportGrid.DataBind() } else { chart.Visible = true; // Now we have the data get the values //For Each item In FormStats //strNames = "18-21,22-25,26-30,31-40,41-50,51-60,61-over:10k-20k,21k-30k,31k-40k:High School,Some College,Degree(Associates),Master,Doctoral,Professional" //'strNames = "18-21,22-25,26-30,31-40,41-50,51-60,61-over:10k-20k,21k-30k,31k-40k" //strStale = "10,30,25,10,5,5,15:10,50,40:10,10,10,10,10,10" //strFieldNames = "Age range:Annual Income:Education level" strFieldNames = ""; strFieldOptionNames = ""; strFieldOptionValues = ""; //EktComma is used to retain the commas in the fields and field option names int idx; int j; //Dim scaleFactor As Double for (idx = 0; idx <= cResult.Count - 1; idx++) { cItem =(ArrayList) cResult[idx]; if (cItem.Count > 0) { strFieldNames = strFieldNames + ":" + hshQuestions[cItem[0].ToString().Replace(",", "EktComma")]; } } strFieldNames = EkFunctions.UrlEncode(strFieldNames.Substring(1, strFieldNames.Length - 1)); cItem = null; //For Each cItem In cResult for (idx = 0; idx <= cResult.Count - 1; idx++) { cItem = (ArrayList)cResult[idx]; for (j = 1; j <= cItem.Count - 1; j++) { strFieldOptionNames = strFieldOptionNames + cItem[j].ToString().Substring(0, System.Convert.ToInt32(cItem[j].ToString().LastIndexOf(",") - 5)).Replace(",", "EktComma") + ","; strFieldOptionValues = strFieldOptionValues + (Convert.ToInt64((cItem[j].ToString().Substring(cItem[j].ToString().LastIndexOf(",") + 1))) * 100) / llResponses + ","; } strFieldOptionNames = (string) (strFieldOptionNames.Substring(0, strFieldOptionNames.Length - 1) + ":"); strFieldOptionValues = (string) (strFieldOptionValues.Substring(0, strFieldOptionValues.Length - 1) + ":"); } strFieldOptionNames = EkFunctions.UrlEncode(strFieldOptionNames.Substring(0, strFieldOptionNames.Length - 1)); strFieldOptionValues = strFieldOptionValues.Substring(0, strFieldOptionValues.Length - 1); if (DisplayType == "2") { DisplayType = "0"; //Horizontal bar chart in chart.aspx } bool showAxis = false; chart.ImageUrl = "chart.aspx?fieldOptionNames=" + strFieldOptionNames + "&FieldNames=" + strFieldNames + "&FormValues=" + strFieldOptionValues + "&form_page=form_page&grpdisplay=" + DisplayType + "&responses=" + llResponses + "&showAxis=" + showAxis; //& Request.QueryString("report_display") //Next } }
//const bool SaveXmlAsFile = false; private void Page_Load(System.Object sender, System.EventArgs e) { BtnExport.Visible = false; this.uxPaging.Visible = false; if (Request.Params["HTTPS"] != "on" && (!string.IsNullOrEmpty(Request.Params["HTTPS"]))) { //Adding lines below causes HTTPS not to work. //IE bug http://support.microsoft.com/default.aspx?scid=kb;en-us;812935 Response.CacheControl = "no-cache"; Response.AddHeader("Pragma", "no-cache"); } Response.Expires = -1; RegisterResources(); //Put user code to initialize the page here StyleSheetJS.Text = m_refStyle.GetClientScript(); m_refMsg = m_refContentApi.EkMsgRef; BtnExport.Text = m_refMsg.GetMessage("btn export"); BtnExport.ToolTip = BtnExport.Text; lblStartDate.Text = m_refMsg.GetMessage("generic start date label"); lblEndDate.Text = m_refMsg.GetMessage("generic end date label"); litGetResult.Text = m_refMsg.GetMessage("lbl get report"); ltrWaitMsg.Text = String.Format(m_refMsg.GetMessage("lbl please wait while we prepare your report"), this.totalPages.Value); //Please wait while we prepare your report of {0} pages. It might take a few minutes. CurrentUserId = m_refContentApi.UserId; ContentLanguage = m_refContentApi.ContentLanguage; AppImgPath = m_refContentApi.AppImgPath; AppPath = m_refContentApi.AppPath; //strFormsURL = m_refContentApi.QualifyURL(m_refContentApi.AppPath, "controls/forms/"); //strFormsPath = Server.MapPath(strFormsURL); if (!string.IsNullOrEmpty(Request.QueryString["action"])) Action = EkFunctions.HtmlEncode(Request.QueryString["action"]); if (!string.IsNullOrEmpty(Request.QueryString["id"])) FormId = Convert.ToInt64(Request.QueryString["id"]); if (!string.IsNullOrEmpty(Request["start_date"])) StartDate = Request["start_date"]; if (!string.IsNullOrEmpty(Request["end_date"])) EndDate = Request["end_date"]; if (m_refContentApi.RequestInformationRef.IsMembershipUser == 1) { Utilities.ShowError(m_refMsg.GetMessage("com: user does not have permission")); return; } if ((StartDate != "") && (EndDate == null)) { EndDate = Strings.FormatDateTime(DateTime.Now, DateFormat.ShortDate); } if (!string.IsNullOrEmpty(Request["flag"])) Flag = Request["flag"]; if (Page.IsPostBack) Flag = "true"; if (!string.IsNullOrEmpty(Request["data_type"])) DataType = Request["data_type"]; if (!string.IsNullOrEmpty(Request["display_type"])) DisplayType = Request["display_type"]; if (!string.IsNullOrEmpty(Request.QueryString["folder_id"])) { strFolderID = Request.QueryString["folder_id"]; } if (!string.IsNullOrEmpty(Request.QueryString["hid"])) { SelectedhId = System.Convert.ToInt64(Request.QueryString["hid"]); } if (DisplayType == "") { DisplayType = "horizontal"; } if (!string.IsNullOrEmpty(Request.QueryString["LangType"])) { ContentLanguage = Convert.ToInt32(Request.QueryString["LangType"]); m_refContentApi.SetCookieValue("LastValidLanguageID", ContentLanguage.ToString()); } else { if (m_refContentApi.GetCookieValue("LastValidLanguageID") != "") { ContentLanguage = int.Parse(m_refContentApi.GetCookieValue("LastValidLanguageID")); } } EnableMultilingual = m_refContentApi.EnableMultilingual; m_refContentApi.ContentLanguage = ContentLanguage; Security_info = m_refContentApi.LoadPermissions(FormId, "content", 0); objForm = m_refContentApi.EkModuleRef; if (SelectedhId > 0) { if (!string.IsNullOrEmpty(Request.QueryString["FormTitle"])) DefaultFormTitle = Request.QueryString["FormTitle"]; } else if ((Convert.ToString(FormId) != "") && (FormId > 0)) { DefaultFormTitle = objForm.GetFormTitleById(FormId); } else { if (!string.IsNullOrEmpty(Request.QueryString["FormTitle"])) DefaultFormTitle = Request.QueryString["FormTitle"]; } gtForms = objForm.GetAllFormInfo(); if (Action == "delete") { string DelDataID = string.Empty; bool ret; if (!string.IsNullOrEmpty(Request.Form["delete_data_id"])) DelDataID = Request.Form["delete_data_id"]; ret = objForm.PurgeFormData(FormId, DelDataID); Flag = "true"; } Collection cHistData; ArrayList aReportHistoryId = null; ArrayList aReportTitle = null; cHistData = m_refContentApi.EkContentRef.GetHistoryListv2_0(FormId); if (cHistData.Count > 0) { aReportHistoryId = new ArrayList(); aReportTitle = new ArrayList(); foreach (Collection cData in cHistData) { if ("A" == cData["ContentStatus"].ToString()) { aReportHistoryId.Add(cData["HistoryID"]); aReportTitle.Add(cData["ContentTitle"]); } } } if (Flag == "true") { FormResult.Text = LoadResult(); if ("" == ExportResult.Text) { ExportResult.Text = FormResult.Text; } ExportResult.Visible = false; } FormsReportToolBar(); DisplayDateFields(); DisplayHistoryOption(aReportHistoryId, aReportTitle); DisplaySelectReport(DisplayType, FormId); FillLiterals(); }
private void Page_Load(System.Object sender, System.EventArgs e) { //Put user code to initialize the page here m_refMsg = m_refContentApi.EkMsgRef; SetJSResourceStrings(); RegisterResources(); if (!(Request.QueryString["action"] == null)) { m_strPageAction = Convert.ToString(Request.QueryString["action"]).ToLower().Trim(); } if (!(Request.QueryString["folder_id"] == null)) { m_intFolderId = Convert.ToInt64(Request.QueryString["folder_id"]); } if (!string.IsNullOrEmpty(Request.QueryString["form_id"])) { m_intFormId = Convert.ToInt64(Request.QueryString["form_id"]); } if (!string.IsNullOrEmpty(Request.QueryString["LangType"])) { ContentLanguage = Convert.ToInt32(Request.QueryString["LangType"]); m_refContentApi.SetCookieValue("LastValidLanguageID", ContentLanguage.ToString()); } else { if (m_refContentApi.GetCookieValue("LastValidLanguageID") != "") { ContentLanguage = Convert.ToInt32(m_refContentApi.GetCookieValue("LastValidLanguageID")); } } if (ContentLanguage == Ektron.Cms.Common.EkConstants.CONTENT_LANGUAGES_UNDEFINED) { m_refContentApi.ContentLanguage = Ektron.Cms.Common.EkConstants.ALL_CONTENT_LANGUAGES; } else { m_refContentApi.ContentLanguage = ContentLanguage; } ltr_formTitle.Text = m_refMsg.GetMessage("msg form title"); ltr_msgSubmission.Text = m_refMsg.GetMessage("alert msg no of submission"); ltr_emailReq.Text = m_refMsg.GetMessage("msg email req"); CurrentUserId = m_refContentApi.UserId; AppImgPath = m_refContentApi.AppImgPath; m_refModule = m_refContentApi.EkModuleRef; }
private string LoadResult() { string msgNoData = m_refMsg.GetMessage("msg no data report"); PageRequestData pagingData = new PageRequestData(); pagingData.PageSize = m_refContentApi.RequestInformationRef.PagingSize; pagingData.CurrentPage = System.Convert.ToInt32(this.uxPaging.SelectedPage) + 1; // pagingData is 1-based and uxPaging is 0-based if (Information.IsNumeric(DisplayType)) { if (SelectedhId > 0) { objFormInfo = m_refContentApi.GetFormByHistoryId(SelectedhId); } else { objFormInfo = m_refContentApi.GetFormById(FormId); } resultsMessage.Text = ""; if (objFormInfo == null) { resultsMessage.Text = "<p class=\"ui-state-highlight warningError\">ERROR: Could not find form. Form ID: " + FormId + "</p>"; return ""; } Hashtable objHistData; objHistData = m_refContentApi.EkModuleRef.GetFormFieldQuestionsById(FormId); if (objHistData.Count > 0) { //only provide the QueryLang as allContenLanguage (-1) for poll and survey reports. //only need data from all languages to match up the poll result on the site. QueryLang = "-1"; if (SelectedhId > 0) { string sTmp = "<ektdesignns_choices id=\""; int iPos = -1; int iPos2 = -2; iPos = System.Convert.ToInt32(objFormInfo.Html.ToString().ToLower().IndexOf(sTmp)); if (iPos > -1) { iPos = iPos + sTmp.Length; iPos2 = System.Convert.ToInt32(objFormInfo.Html.ToString().ToLower().IndexOf("\"", iPos)); if (iPos2 > -1) { sPollFieldId = (string)(objFormInfo.Html.ToString().ToLower().Substring(iPos, iPos2 - iPos)); } } } } Ektron.Cms.FormSubmittedData[] aryData; aryData = m_refContentApi.EkModuleRef.GetFormFieldDataById(FormId, StartDate, EndDate, -1, QueryLang, sPollFieldId, ref pagingData); if ((aryData == null) || 0 == aryData.Length) { this.uxPaging.Visible = false; resultsMessage.Text = "<p class=\"ui-state-highlight warningError\">" + msgNoData + "</p>"; return ""; } else { BtnExport.Visible = true; this.uxPaging.TotalPages = pagingData.TotalPages; if (this.uxPaging.TotalPages > 1) { // only show paging if there are more than 1 page in total. this.uxPaging.Visible = true; this.totalPages.Value = this.uxPaging.TotalPages.ToString(); this.uxPaging.CurrentPageIndex = pagingData.CurrentPage - 1; // uxPaging is 0-based and pagingData is 1-based } } int iData; sFormDataIds = "\'" + aryData[0].FormDataID + "\'"; for (iData = 1; iData <= aryData.Length - 1; iData++) { sFormDataIds = sFormDataIds + ",\'" + aryData[iData].FormDataID + "\'"; } return DisplayReport(DisplayType, objFormInfo, aryData, Security_info.CanDelete); } System.Text.StringBuilder result = new System.Text.StringBuilder(); Collection objFormData; Collection cDatas; Collection cData; objForm = m_refContentApi.EkModuleRef; objFormData = new Collection(); objFormData.Add(FormId, "FORM_ID", null, null); objFormData.Add(CurrentUserId, "USER_ID", null, null); objFormData.Add(StartDate, "START_DATE", null, null); objFormData.Add(EndDate, "END_DATE", null, null); cDatas = objForm.GetAllFormData(objFormData); if (cDatas.Count == 0) { result.Append("<table><tr><td>" + msgNoData + "</td></tr></table>"); return (result.ToString()); } long iCnt; long tmpFormId; long dataID = 0; string strHtml; bool bPaste; strHtml = ""; tmpFormId = 0; if (DisplayType == "horizontal") { Collection fd1; //object fds1; Collection fds1; Collection fd2; //object fds2; Collection fds2; if (FormId.ToString() == "") { foreach (Collection tempLoopVar_gtForm in gtForms) { gtForm = tempLoopVar_gtForm; fds1 = objForm.GetFormFieldsById(FormId); fds2 = objForm.TransferFormVariable(objFormData, ref pagingData); if (fds2.Count > 0) { bPaste = false; result.Append("<table><tr><td> </td></tr></table>"); ; result.Append("<table border=1 width=96% cellspacing=0 align=center><tr><td><table border=0 width=100% cellspacing=0 align=center>"); result.Append("<tr><td><table border=0 width=100% cellspacing=0>"); result.Append("<tr height=20>"); foreach (Collection tempLoopVar_fd1 in fds1) { fd1 = tempLoopVar_fd1; if (IsValidCol((string)(fd1["form_field_name"]))) { result.Append("<td class=headcell valign=top>" + fd1["form_field_name"] + "</td>"); } } result.Append("<td class=headcell valign=top>Date Created</td></tr>"); foreach (Collection tempLoopVar_fd2 in fds2) { fd2 = tempLoopVar_fd2; strHtml = ""; strHtml = strHtml + "<tr>"; foreach (Collection tempLoopVar_fd1 in fds1) { fd1 = tempLoopVar_fd1; if (!Information.IsDBNull(fd2[fd1["form_field_name"]])) { if (CheckDataType(fd2[fd1["form_field_name"]].ToString(), DataType) == true) { if (fd2[fd1["form_field_name"]].ToString() != "") { bPaste = true; } } } if (IsValidCol((string)(fd1["form_field_name"]))) { strHtml = strHtml + "<td valign=top>" + fd2[fd1["form_field_name"]] + "</td>"; } } if (bPaste == true) { strHtml = strHtml + "<td valign=top>" + fd2["date_created"] + "</td>"; strHtml = strHtml + "</tr>"; result.Append(strHtml); bPaste = false; } } result.Append("</table></td></tr></table></td></tr></table><hr>"); } } } else { fds1 = objForm.GetFormFieldsById(FormId); fds2 = objForm.TransferFormVariable(objFormData, ref pagingData); if (fds2.Count > 0) { bPaste = false; result.Append("<table><tr><td> </td></tr></table>"); if (!string.IsNullOrEmpty(Request.Form["Form_Title"])) result.Append("<table class=\"ektronGrid\" border=0 width=96% align=center cellspacing=0><tr><td align=left class=lbls>Title: " + Request.Form["Form_Title"] + " " + "" + "</td></tr></table>"); result.Append("<table border=1 width=96% cellspacing=0 align=center><tr><td><table border=0 width=100% cellspacing=0 align=center>"); result.Append("<tr><td><table border=0 width=100% cellspacing=0>"); result.Append("<tr height=20>"); if (Security_info.CanDelete) { result.Append("<td class=headcell align=\"center\" valign=top nowrap=\"true\">(Delete)<br><input type=\"checkbox\" name=\"chkSelectAll\" onClick=\"SelectAll(this)\"></td>"); } foreach (Collection tempLoopVar_fd1 in fds1) { fd1 = tempLoopVar_fd1; if (IsValidCol((string)(fd1["form_field_name"]))) { result.Append("<td class=headcell valign=top>" + fd1["form_field_name"] + "</td>"); } } result.Append("<td class=headcell valign=top>Date Created</td></tr>"); foreach (Collection tempLoopVar_fd2 in fds2) { fd2 = tempLoopVar_fd2; strHtml = ""; //strHtml = strHtml & "<tr>" //strHtml = strHtml & "<td valign=top><input type=""checkbox""/></td>" foreach (Collection tempLoopVar_fd1 in fds1) { fd1 = tempLoopVar_fd1; if (!Information.IsDBNull(fd2[fd1["form_field_name"]])) { if (CheckDataType(fd2[fd1["form_field_name"]].ToString(), DataType) == true) { if (fd2[fd1["form_field_name"]].ToString() != "") { bPaste = true; } } } if (IsValidCol((string)(fd1["form_field_name"]))) { strHtml = strHtml + "<td valign=top>" + fd2[fd1["form_field_name"]] + "</td>"; } } if (bPaste == true) { if (sFormDataIds != "") { sFormDataIds = sFormDataIds + ",\'" + fd2["form_data_id"] + "\'"; } else { sFormDataIds = "\'" + fd2["form_data_id"] + "\'"; } if (Security_info.CanDelete) { strHtml = (string)("<tr><td align=\"center\" valign=top><input onClick=\"CheckIt(this)\" type=\"checkbox\" name=\"ektChk" + fd2["form_data_id"] + "\" id=\"ektChk" + fd2["form_data_id"] + "\"/></td>" + strHtml); } else { strHtml = (string)("<tr>" + strHtml); // we do not need <td>s around this. } strHtml = strHtml + "<td valign=top>" + fd2["date_created"] + "</td>"; strHtml = strHtml + "</tr>"; result.Append(strHtml); bPaste = false; } } result.Append("</table></td></tr></table></td></tr></table><hr>"); } } } else if (DisplayType == "vertical") { if (FormId.ToString() == "") { foreach (Collection tempLoopVar_gtForm in gtForms) { gtForm = tempLoopVar_gtForm; result.Append("<table><tr><td> </td></tr></table>"); result.Append("<table border=1 width=96% cellspacing=0 align=center><tr><td><table border=0 width=100% cellspacing=0 align=center>"); result.Append("<tr><td><table border=0 width=100% cellspacing=0>"); result.Append("<tr height=20><td class=headcell align=center width=5% >Id</td><td class=headcell width=20% >Variable Name</td><td class=headcell width=55% >Value</td><td class=headcell width=25% >Date Submited</td></tr>"); iCnt = 1; foreach (Collection tempLoopVar_cData in cDatas) { cData = tempLoopVar_cData; if (CheckDataType(cData["FORM_FIELD_VALUE"].ToString(), DataType) == true) { bPaste = true; if (DataType.ToLower() != "all") { if (cData["FORM_FIELD_VALUE"].ToString() == "") { bPaste = false; } else { bPaste = true; } } if (bPaste) { if (tmpFormId.ToString() == cData["FORM_ID"].ToString()) { if ((int)(iCnt / 2) == (iCnt / 2)) { result.Append("<tr class=evenrow><td valign=top align=center>" + cData["FORM_DATA_ID"] + "</td><td>" + cData["FORM_FIELD_NAME"] + "</td><td>" + cData["FORM_FIELD_VALUE"] + "</td><td>" + cData["DATE_CREATED"] + "</td></tr>"); } else { result.Append("<tr><td valign=top align=center>" + cData["FORM_DATA_ID"] + "</td><td>" + cData["FORM_FIELD_NAME"] + "</td><td>" + cData["FORM_FIELD_VALUE"] + "</td><td>" + cData["DATE_CREATED"] + "</td></tr>"); } iCnt++; } } } } result.Append("</table></td></tr></table></td></tr></table><hr>"); } } else { result.Append("<table><tr><td> </td></tr></table>"); if (!string.IsNullOrEmpty(Request.Form["form_title"])) result.Append("<table class=\"ektronGrid\" border=0 width=96% align=center cellspacing=0><tr><td align=left class=lbls>Title: " + Request.Form["form_title"] + "</td></tr><tr><td align=left class=lbls>ID: " + FormId + "</td></tr></table>"); result.Append("<table border=1 width=100% cellspacing=0 align=center><tr><td><table border=0 width=100% cellspacing=0 align=center>"); result.Append("<tr><td><table border=0 width=100% cellspacing=0>"); result.Append("<tr height=20>"); if (Security_info.CanDelete) { result.Append("<td class=headcell align=\"center\" width=1% nowrap=\"true\">(Delete)<br><input type=\"checkbox\" name=\"chkSelectAll\" onClick=\"SelectAll(this)\"></td>"); } result.Append("<td class=headcell align=center width=5% >Id</td><td class=headcell width=20% >Variable Name</td><td class=headcell width=55% >Value</td><td class=headcell >Date Submited</td></tr>"); iCnt = 1; foreach (Collection tempLoopVar_cData in cDatas) { cData = tempLoopVar_cData; strHtml = ""; if (CheckDataType(cData["FORM_FIELD_VALUE"].ToString(), DataType) == true) { bPaste = true; if (DataType.ToLower() != "all") { if (cData["FORM_FIELD_VALUE"].ToString() == "") { bPaste = false; } else { bPaste = true; } } if (bPaste) { if (sFormDataIds != "") { sFormDataIds = sFormDataIds + ",\'" + cData["form_data_id"] + "\'"; } else { sFormDataIds = "\'" + cData["form_data_id"] + "\'"; } if ((int)(iCnt / 2) == (iCnt / 2)) { strHtml = "<tr class=evenrow>"; } else { strHtml = "<tr>"; } if (Security_info.CanDelete) { if (dataID != Convert.ToInt64(cData["FORM_DATA_ID"].ToString())) { strHtml = strHtml + "<td align=\"center\" valign=top><input onClick=\"CheckIt(this)\" type=\"checkbox\" name=\"ektChk" + cData["FORM_DATA_ID"] + "\" id=\"ektChk" + cData["FORM_DATA_ID"] + "\"/></td>"; } else { strHtml = strHtml + "<td valign=top></td>"; } } if (IsValidCol(cData["FORM_FIELD_NAME"].ToString())) { result.Append(strHtml + "<td valign=top align=center>" + cData["FORM_DATA_ID"] + "</td><td valign=top>" + cData["FORM_FIELD_NAME"].ToString() + "</td><td valign=top>" + cData["FORM_FIELD_VALUE"].ToString() + "</td><td valign=top>" + cData["DATE_CREATED"] + "</td></tr>"); } iCnt++; } } if (dataID != Convert.ToInt64(cData["FORM_DATA_ID"].ToString())) { dataID = Convert.ToInt64(cData["FORM_DATA_ID"].ToString()); } } result.Append("</table></td></tr></table></td></tr></table><hr>"); } } return (result.ToString()); }