<%@ page language="C#" autoeventwireup="true" validaterequest="false" inherits="QuestionsManage, App_Web_tnkwl-px" stylesheettheme="Themes" theme="Themes" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="cc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
   <title>个人问题管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    <link href="../css/layout.css" rel="stylesheet" type="text/css" />
    <link href="../css/layerDiv.css" rel="stylesheet" type="text/css" />
    <script src="../js/LayerDiv.js" type="text/javascript"></script>
<script src="../js/calendar.js" type="text/javascript"></script>
<script src="../js/common.js" type="text/javascript"></script>
<script type="text/javascript" src="../js/jquery.js"></script>
    <script type="text/javascript" src="../js/jquery.pngFix.pack.js"></script>
    <script type="text/javascript" src="../js/WebValidator.js"></script>
    <script type="text/javascript" src="../js/InterfaceContrl.js"></script>
        
<script language="javascript">
    function CheckAll()
    {
        var cked = false;
        cked = document.getElementById("chkSelAll").checked;
        for (var i = 0; i < document.getElementsByTagName("*").length; i++)
        {
            var e = document.getElementsByTagName("*")[i];
            try
            {
                if (e.name.substring(e.name.length - 6, e.name.length) == "chkSel")
                {
                    e.checked = cked;
                }
            }
            catch (exception)
            {
            }
        }
    }

    function CheckSelect()
    {
        var count = 0;
        for (var i = 0; i < document.getElementsByTagName("*").length; i++)
        {
            var e = document.getElementsByTagName("*")[i];
            try
            {
                if (e.name.substring(e.name.length - 6, e.name.length) == "chkSel")
                {
                    if (e.checked == true)
                    {
                        count++;
                    }
                }
            }
            catch (exception)
            {
            }
        }
        if (count == 0)
        {
            alert("请选择您要删除的项！");
            return false;
        }
        else
        {
            return confirm('您确定要删除所选项吗?');
        }
    }
</script> 
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .gvOverflow
        {
            table-layout:fixed;
        }
        .tdOverflow
        {
            overflow:hidden;         
            word-break:keep-all;
            text-overflow:clip;   
            white-space:nowrap;                              
        }
        html
        {
           overflow-x: hidden;
        }
    </style>
 </head>
<body>
<form id="form1" runat="server">
<asp:Panel ID="panelGrid" runat="server" Width="100%" height="100%">      
         
     <table width="100%" height="100%" cellpadding="0" cellspacing="0">
        <tr>
            <td>            
               <div class="right_postion_bg">
<span class="s_potion_font"><img src="../Images/homen.gif" class="pic_style" />  当前的位置：知识管理 &gt; 问题管理</span>
</div> 
<table width="100%" cellpadding="0" cellspacing="0" bgcolor="white" style="border:solid 1px #cccccc; border-bottom:none; border-top:none;">
    <tr>
        <td style="width: 83px; height: 34px;" align="right">
            查询条件：
        </td>
        <td style="width: 100px; height: 34px;">
            <asp:DropDownList ID="ddlFieldName" runat="server" Width="95px" Height="22px">
                <asp:ListItem Value="Title">标题</asp:ListItem>                
            </asp:DropDownList>
        </td>
        <td style="width: 148px; height: 34px;">
            <asp:TextBox ID="txtFieldValue" runat="server" Width="135px" MaxLength="50"></asp:TextBox>
        </td>
         <td align="left" width="100">
             <asp:Button ID="btnSearch" runat="server" Text="查 询" onclick="btnSearch_Click" />             
        </td>
        <td width="">            
            <asp:RadioButtonList ID="rblStatus" runat="server" RepeatDirection="Horizontal" style="cursor:pointer;"
                AutoPostBack="True" onselectedindexchanged="rblStatus_SelectedIndexChanged">
            <asp:ListItem Value="End">已解决</asp:ListItem>
            <asp:ListItem Value="NotEnd">未解决</asp:ListItem>
            <asp:ListItem Value="All" Selected="True">全部</asp:ListItem>
            </asp:RadioButtonList>
        </td><td align="right">
            <asp:Button ID="btnBatchDel" runat="server" onclick="btnBatchDel_Click" 
                Text="批量删除" />
        </td>
    </tr>
</table>
            </td>
        </tr>
        <tr>
            <td height="100%">
                <div class="box">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
    <tr>
        <td align="left" id="ClassArea" runat="server" width="200" valign="top" style="overflow:auto;background-color:White;">          
            <asp:TreeView ID="tree" runat="server" ShowLines="True" DataSourceID="XmlDataSource1"  ExpandDepth="1" OnDataBound="tree_DataBound" OnSelectedNodeChanged="tree_SelectedNodeChanged">
                <LevelStyles>
                  <asp:TreeNodeStyle Font-Underline="False" />
                  <asp:TreeNodeStyle Font-Underline="False" />
                </LevelStyles>
                <SelectedNodeStyle BackColor="Gainsboro" ForeColor="" />
                <NodeStyle ForeColor="Black" />
                <RootNodeStyle HorizontalPadding="0px" />
                <DataBindings>
                  <asp:TreeNodeBinding DataMember="Item" TextField="ClassName" ValueField="ID" />
                  <asp:TreeNodeBinding DataMember="Root" TextField="ClassName" ValueField="ID" />
                </DataBindings>
              </asp:TreeView>
             <asp:XmlDataSource ID="XmlDataSource1" runat="server" EnableCaching="False"></asp:XmlDataSource>
        </td>
        <td valign="top" style="border:0;">
            <asp:GridView ID="gvQuestion" runat="server" AutoGenerateColumns="False" DataKeyNames="ID" CssClass="gvOverflow"
            OnRowDataBound="gvQuestion_RowDataBound" OnRowEditing="gvQuestion_RowEditing" OnRowDeleting="gvQuestion_RowDeleting">
                   <Columns>
                   <asp:TemplateField>
                      <HeaderTemplate>
                             全选<input id="chkSelAll" name="chkSelAll" onclick="javascript:CheckAll();" type="checkbox">
                      </HeaderTemplate>
                      <HeaderStyle Width="60" />
                      <ItemStyle />
                      <ItemTemplate>
                           <asp:CheckBox ID="chkSel" runat="server" />
                       </ItemTemplate>
                   </asp:TemplateField>   
                    <asp:BoundField DataField="ClassName" HeaderText="分类" HeaderStyle-Width="70px" >                    
                        <HeaderStyle Width="70px" />
                       </asp:BoundField>
                    <asp:TemplateField HeaderText="标题">
                        <ItemStyle HorizontalAlign="Left" CssClass="tdOverflow" />
		                <ItemTemplate>
		                    <a target="_blank" href='QuestionInfo.aspx?id=<%#Eval("ID") %>&source=qma'><%# Common.CutString(Eval("Title").ToString(), 26).Replace("…", "")%></a>
		                </ItemTemplate>
		             </asp:TemplateField>
		             <%--<asp:BoundField DataField="UserName" HeaderText="创建者" HeaderStyle-Width="90px" >
                       </asp:BoundField>--%>
		             <asp:BoundField DataField="ClickRate" HeaderText="点击量" 
                           HeaderStyle-Width="60px" >
		                 <HeaderStyle Width="60px" />
                       </asp:BoundField>
                       <asp:TemplateField HeaderText="是否转化">
                        <ItemStyle HorizontalAlign="Left" CssClass="tdOverflow" />
		                <ItemTemplate>
		                    <%# Convert.ToBoolean( Eval("IsTransfer"))==true ?"是" :"否" %>
		                </ItemTemplate>
		             </asp:TemplateField>
		             <asp:BoundField DataField="CreateTime" HeaderText="创建时间" >
                       </asp:BoundField>		             
		             <%--<asp:CommandField ShowEditButton="True" EditText="编辑" CancelText="取消" UpdateText="更新"  ControlStyle-CssClass="gridBtn" ControlStyle-ForeColor="Blue" >
                    <HeaderStyle Width="40" />
                  </asp:CommandField>
                  <asp:CommandField ShowDeleteButton="True" DeleteText="删除"  ControlStyle-CssClass="gridBtn" ControlStyle-ForeColor="Blue" >
                    <HeaderStyle Width="40" />
                  </asp:CommandField>  --%>              
             </Columns>
             <EmptyDataRowStyle BackColor="#E0E0E0" />
            <EmptyDataTemplate>
            </EmptyDataTemplate>
            </asp:GridView>    
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td class="page_bg_left">
                              <cc1:AspNetPager ID="myAspNetPager" runat="server" AlwaysShow="True" CssClass="cut_pager" PageSize="10"
                                FirstPageText="首页&nbsp;&nbsp;" HorizontalAlign="Right" InputBoxStyle="width:20px;" 
                                LastPageText="尾页" NextPageText="&nbsp;&nbsp;下一页&nbsp;&nbsp;" NumericButtonTextFormatString="  {0}"
                                OnPageChanging="AspNetPager1_PageChanging" PrevPageText="上一页"  ShowCustomInfoSection="Left" CustomInfoTextAlign="Left"
                                ShowInputBox="Always">
                            </cc1:AspNetPager>
            </td>
          </tr>
        </table>                                
        </td>
    </tr>
</table>

</div>                
            </td>
        </tr>
        <tr>
            <td>
               
            </td>
        </tr>
    </table>
    
</asp:Panel>

<asp:Panel ID="panelAdd_Edit" runat="server" Width="100%" Height="100%" Visible="false" CssClass="">

<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" style="table-layout:fixed; overflow:scroll; background-color:White;">
  <tr>
    <td>
        <div class="right_postion_bg">
        <span class="s_potion_font"><img src="../Images/homen.gif" class="pic_style" />  当前的位置：[个人问题管理]-[<asp:Label ID="lblNav" runat="server" Text=""></asp:Label>
    </div>
    </td>
  </tr>
  <tr>
    <td> <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="white">
      <tr>
        <td>
        <!--表格--->
        
 <div class="box">
<table width="100%" cellpadding="0" cellspacing="0">
    <tr>
         <td align="right">
<asp:Button ID="btnSave" runat="server" Text="保存" onclick="btnSave_Click" />
             <asp:Button ID="btnAddGoOn" runat="server" Text="继续添加" Visible="false"
                 onclick="btnAddGoOn_Click" />
<asp:Button ID="btnReturn" runat="server" Text="返回" onclick="btnReturn_Click" />        
</td>
    </tr>
</table>
</div>

<div class="box_nob">

<table border="0" cellpadding="5" cellspacing="1" width="100%" class="table_notitle">
    <tr>
        <td colspan="4" align="center" class="td02">
            个人问题管理</td>
    </tr>
    <tr>
        <td align="right" bgcolor="#ffffff" class="td01">
            分类: </td>
        <td bgcolor="#ffffff" colspan="3">
            <asp:Label ID="lblClassName" runat="server" Text=""></asp:Label>
            <asp:Button ID="btnSelectClas" runat="server" onclick="btnSelectClas_Click" 
                Text="选择分类" />
        </td>
    </tr>
    <tr>
        <td align="right" bgcolor="#ffffff" class="td01">
            标题:</td>
        <td bgcolor="#ffffff" colspan="3">
            <asp:TextBox ID="txtName" runat="server" CssClass="input1" MaxLength="40" 
                Width="500px"></asp:TextBox>
            <%--<span style="color:Red; font-size:12px;">*</span>--%>
        </td>
    </tr>
    <tr>
        <td align="right" bgcolor="#ffffff" class="td01">
            内容: </td>
        <td bgcolor="#ffffff" colspan="3">
            <asp:TextBox ID="txtDescription" runat="server" CssClass="input1" 
                Height="129px" TextMode="MultiLine" Width="500px"></asp:TextBox>
        </td>
    </tr>
    </table>
</div>


        <!--表格--->
        </td>
      </tr>
    </table></td>
  </tr>
</table>

</asp:Panel>        
<div id="LayerShow" runat="server" style="width: 400px; top:8%; overflow: auto; padding-left: 10px; padding-right:10px; padding-top:10px; display:none; background-color:#fff;">
<div id="m_onlineuser" class="b2">
            <div class="rct">
                <div class="l tl1">
                </div>
                <div class="r tr1">
                </div>
            </div>
            
            <div class="cnt f14">
                <div style="color: #666" align="center">
                    <table class="" cellpadding="5" height="400">
                <tr>
                    <td>
                    <div style="overflow:auto; height:400px;">
                        <asp:TreeView ID="TreeView1" runat="server" ShowLines="True" DataSourceID="XmlDataSource2" ExpandDepth="1" OnDataBound="tree_DataBound1" OnSelectedNodeChanged="tree_SelectedNodeChanged1">
                <LevelStyles>
                  <asp:TreeNodeStyle Font-Underline="False" />
                  <asp:TreeNodeStyle Font-Underline="False" />
                </LevelStyles>
                <SelectedNodeStyle BackColor="Gainsboro" ForeColor="" />
                <NodeStyle ForeColor="Black" />
                <RootNodeStyle HorizontalPadding="0px" />
                <DataBindings>
                  <asp:TreeNodeBinding DataMember="Item" TextField="ClassName" ValueField="ID" />
                  <asp:TreeNodeBinding DataMember="Root" TextField="ClassName" ValueField="ID" />
                </DataBindings>
              </asp:TreeView>
             <asp:XmlDataSource ID="XmlDataSource2" runat="server" EnableCaching="False"></asp:XmlDataSource>
                    </div>
                        
             </td>
                </tr>
                <tr>
                    <td>
                    <asp:Button ID="btnSelectClass" runat="server" Text="确定" onclick="btnSelectClass_Click" />
                    <asp:Button ID="btnCancel" runat="server" Text="取消" onclick="btnCancel_Click" />
                    </td>
                </tr>
            </table>
                
             
    
                </div>
            </div>
            <div class="rcb">
                <div class="l bl1">
                </div>
                <div class="r br1">
                </div>
            </div>
        </div>
</div> 

<div id="LayerOKConfirm" runat="server" style="width: 300px;z-index: 2; height:200px; overflow: auto; padding-left: 10px; padding-right:10px; padding-top:10px; display:none; background-color:#fff; position:absolute; left:20%; top:15%;">
    <div id="Div3" class="b2">
            <div class="rct">
                <div class="l tl1">
                </div>
                <div class="r tr1">
                </div>
            </div>            
            <div class="cnt f14">
                <div style="color: #666" align="center">
                <table class="style1">
                    <tr>
                        <td>
                            保存成功！是否继续添加 </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Button ID="btnYes" runat="server" Text="是" onclick="btnYes_Click" />
                            <asp:Button ID="btnNo" runat="server" Text="否" onclick="btnNo_Click" />
                        </td>
                    </tr>
                </table>
                </div>
            </div>
            <div class="rcb">
                <div class="l bl1">
                </div>
                <div class="r br1">
                </div>
            </div>
        </div>    
</div>  
                        
          <div id = "LayerAll" runat="server"></div>
          
<asp:TextBox ID="txtClassID" runat="server" Visible="false"></asp:TextBox>
<asp:TextBox ID="txtProductID" runat="server" Visible="false"></asp:TextBox>
  </form>
</body>
<script language="javascript" type="text/javascript">
    $(document).ready(function()
    {
        Validator();
    });
    function Validator()
    {
        $('#<%= btnSave.ClientID %>').bind('click', function()
        {

            return GetValidatorMessage();
        });
        $("#<%=txtDescription.ClientID %>").textlimit(2000);
    }
    </script>
</html>
