<%@ page language="C#" autoeventwireup="true" validaterequest="false" inherits="QuestionsManage, App_Web__8atrd5t" 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="ie=7" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
             <script src="../js/artDialog3/artDialog.min.js"></script>
      <script>          (function($) { var d = $.dialog.defaults; d.skin = ['chrome']; })(art);</script>
    <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>

</head>
<body>
<div id="loading">
        <div style="position: absolute; top: 0px; left: 0px; width: 100%; height: 100%; background-color: #ffffff;
            z-index: 10; filter: alpha(opacity=90); opacity: 0.9;">
        </div>
        <div id="msg_area" style="z-index: 200; left: 289px; position: absolute; top: 202px;">
            <div id="msgPanel" style="z-index: 200;" height="24px" width="100px" bordercolor="#eeeeee"
                borderstyle="Solid" borderwidth="1px">
                <asp:Image ID="img" runat="server" ImageUrl="~/images/loading.gif" />
                <font style="font-size: 9pt;color:Gray;">loading...读取中......</font>
            </div>
        </div>
    </div>
    <form id="form1" runat="server">
    <asp:Panel ID="panelGrid" runat="server" Height="100%" class="table_box">
        <table cellpadding="0" cellspacing="0" Width="100%">
            <tr>
                <td class="right_bg">
                    <span class="right_title">
                        <img class="img_style" src="../Images/homen.gif" />
                        您的当前位置：<asp:Label ID="lblnum" runat="server" Text="Label"></asp:Label></span>
                </td>
            </tr>
            <tr>
                <td class="r_top_box">
                    <table cellspacing="0" class="r_top_title_box" cellpadding="0">
                        <tr>
                            <td style="width: 83px; height: 34px;" align="left">
                                &nbsp;&nbsp;查询条件：
                            </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 align="left">
                                <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="btnQuestionCenter" runat="server" Text="转到问题中心首页" 
                onclick="btnQuestionCenter_Click" />--%>
                                <asp:Button ID="btnAdd" runat="server" Text="我要提问" OnClick="btnAdd_Click" />
                                <%--<asp:Button ID="btnBatchDel" runat="server" Text="批量删除" 
                 onclick="btnBatchDel_Click" />--%>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td class="margintop5">
                    <table cellpadding="0" cellspacing="0" width="100%" height="100%">
                        <tr>
                            <td class="tree_box" style="height:100%;" valign="top">
                                <asp:TreeView ID="tree" runat="server" ShowLines="True" DataSourceID="XmlDataSource2"
                                    ExpandDepth="1" OnDataBound="tree_DataBound" OnSelectedNodeChanged="tree_SelectedNodeChanged"
                                    Width="170px" Height="100%">
                                    <LevelStyles>
                                        <asp:TreeNodeStyle Font-Underline="False" />
                                        <asp:TreeNodeStyle Font-Underline="False" />
                                    </LevelStyles>
                                    <SelectedNodeStyle 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="width:99%;">
                                <table cellpadding="0" cellspacing="0" width="100%" height="100%">
                                    <tr>
                                        <td>
                                            <asp:GridView ID="gvQuestion" runat="server" AutoGenerateColumns="False" DataKeyNames="ID" OnRowDataBound="gvQuestion_RowDataBound" OnRowEditing="gvQuestion_RowEditing"
                                                OnRowDeleting="gvQuestion_RowDeleting" Width="70%">
                                                <Columns>
                                                    <asp:BoundField DataField="ClassName" HeaderText="分类" HeaderStyle-Width="70px">
                                                        <HeaderStyle Width="70px" />
                                                    </asp:BoundField>
                                                    <asp:TemplateField HeaderText="标题">
                                                        <ItemStyle HorizontalAlign="Left"  />
                                                        <ItemTemplate>
                                                            <a target="_blank" href='QuestionInfo.aspx?id=<%#Eval("ID") %>&source=qm'>
                                                                <%# Common.CutString(Eval("Title").ToString(), 26).Replace("…", "")%></a>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:BoundField DataField="ClickRate" HeaderText="点击量" HeaderStyle-Width="60px">
                                                        <HeaderStyle Width="60px" />
                                                    </asp:BoundField>
                                                    <asp:TemplateField HeaderText="是否转化">
                                                        <ItemStyle HorizontalAlign="center" />
                                                        <ItemTemplate>
                                                            <%# Convert.ToBoolean( Eval("IsTransfer"))==true ?"是" :"否" %>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:BoundField DataField="CreateTime" HeaderText="创建时间"></asp:BoundField>
                                                </Columns>
                                             
                                            </asp:GridView>
                                        </td>
                                    </tr>
                                    <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>
                </td>
            </tr>
        </table>
    </asp:Panel>
    <asp:Panel ID="panelAdd_Edit" runat="server" Height="100%" Visible="false" CssClass="table_box">
        <table width="100%" cellpadding="0" cellspacing="0">
            <tr>
            <td class="right_bg">
                <span class="right_title">
                    <img src="../Images/homen.gif" class="img_style" />
                    您的当前位置：个人问题中心 &gt;
                    <asp:Label ID="lblNav" runat="server" Text=""></asp:Label></span>
            </td>
        </tr>
        <tr>
            <td class="r_top_box">
                <table cellspacing="0" cellpadding="5" class="r_top_title_box">
                <tr>
                    <td id="tab_title">
                        个人问题管理
                    </td>
                    <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>
            </td>
        </tr>
        <tr>
            <td style="padding-top:5px">
            <table border="0" cellpadding="0" cellspacing="1" width="100%" class="table_notitle">
                <tr>
                    <td align="right" bgcolor="#ffffff" class="td01">
                        分类:
                    </td>
                    <td bgcolor="#ffffff">
                        <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">
                        <asp:TextBox ID="txtName" runat="server" CssClass="input1" MaxLength="40" Width="500px"></asp:TextBox>&nbsp;<span
                            style="color: Red;">*</span>
                    </td>
                </tr>
                <tr>
                    <td align="right" bgcolor="#ffffff" class="td01">
                        内容:
                    </td>
                    <td bgcolor="#ffffff">
                        <asp:TextBox ID="txtDescription" runat="server" CssClass="input1" Height="129px"
                            TextMode="MultiLine" Width="500px"></asp:TextBox>&nbsp;<span style="color: Red;">*</span>
                    </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">
                    <table class="" cellpadding="5" height="400">
                        <tr>
                            <td class="tree_box">
                                    <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 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>
                            </td>
                        </tr>
                        <tr>
                            <td align="center">
                                <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>
                                保存成功！是否继续添加 r&gt;
                                <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>
     <script type="text/javascript">
         $("#loading").fadeOut()
</script>
</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>
