private void BindFilesList() { #region 绑定主题鉴定文件列表 try { fileinfoList.Text = ""; fileList = GetIdentifyFileList(); DataTable dt = Identifys.GetAllIdentify(); foreach (DataRow Identify in dt.Rows) { ViewState["code"] += Identify["name"] + ","; fileList.Remove(Identify["filename"].ToString()); } fileList.Remove("Thumbs.db"); int i = 1; foreach (string file in fileList) { fileinfoList.Text += "<tr class='mouseoutstyle' onmouseover='this.className=\"mouseoverstyle\"' onmouseout='this.className=\"mouseoutstyle\"' >\n"; fileinfoList.Text += "<td nowrap='nowrap' style='border-color:#EAE9E1;border-width:1px;border-style:solid;width:50px;' align='center'><input type='checkbox' id='id" + i + "' name='id" + i + "' value='" + i + "'/></td>\n"; fileinfoList.Text += "<td nowrap='nowrap' style='border-color:#EAE9E1;border-width:1px;border-style:solid;width:50px;' align='left'><input type='text' id='name" + i + "' name='name" + i + "' value='鉴定帖" + i + "' class=\"FormBase\" onfocus=\"this.className='FormFocus';\" onblur=\"this.className='FormBase';\" style='width:200px' /></td>\n"; fileinfoList.Text += "<td nowrap='nowrap' style='border-color:#EAE9E1;border-width:1px;border-style:solid;width:50px;'><input type='hidden' name='file" + i + "' value='" + file + "' /><div id='ilayer" + i + "' onmouseover='showMenu(this.id,false)'>" + PicStr(file, 20) + "</div>"; fileinfoList.Text += "<div id='ilayer" + i + "_menu' style='display:none'>" + PicStr(file) + "</div></td>\n"; fileinfoList.Text += "</tr>\n"; i++; } SubmitButton.Visible = fileList.Count != 0; } catch (IOException err) { base.RegisterStartupScript("", "<script>alert('" + err.Message + "');window.location.href='forum_identifymanage.aspx';</script>"); } #endregion }
public void BindData() { #region 绑定鉴定主题分类 identifygrid.AllowCustomPaging = false; identifygrid.TableHeaderName = "论坛鉴定列表"; identifygrid.DataKeyField = "identifyid"; identifygrid.BindData(Identifys.GetAllIdentify()); #endregion }