<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="login_project.aspx.cs" Inherits="Web.dc.admin.login_project" %>

<!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>OA标题页</title>
    <link href="../../css/admincss/skin.css" rel="stylesheet" type="text/css" />
</head>


<body>
 <form id="form1" runat="server" defaultfocus ="tbAddField" defaultbutton ="btAddProject">
<div>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
        <td   class ="top_bg_left "></td>
    <td  class ="top_bg_center " >
    <table style ="width :100%; height :31"  border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
      <tr>
      
<!--这里写页标题 -->
        <td style ="height :31px"><div class="titlebt">创建问卷</div></td>
      </tr>
    </table>
    </td> 
    <td class ="top_bg_right "></td>
  </tr>
  <tr>
    <td style ="background :url(../../css/admincss/images/mail_leftbg.gif); vertical-align :middle " >&nbsp;</td>
    <td style ="background-color :#F7F8F9; vertical-align :top " >
    <table style ="width :100%">
    <tr>
    <td><b>问卷：<asp:Label ID="lbTitle" runat="server"></asp:Label></b>
     <asp:Label ID="lbTitleid" runat="server" Visible="False"></asp:Label>
       <asp:Label ID="lbRange" runat="server" Visible="False"></asp:Label>
     (题量最大100道)<asp:Label ID="lbEditid" runat="server" Visible="False"></asp:Label>
        </td>
    <td style =" text-align :right ">
        <asp:Button ID="btNext" runat="server" Text="编辑好内容，启动问卷"  Visible ="false" 
            onclick="btNext_Click" /></td>
    </tr>
    </table>


<!--  一组内容模块开始   --> 
    <table class ="tablezong"   border="0"  cellpadding="0" cellspacing="0">

      <tr>
        <td colspan="2">

             
                                   
        <div style ="margin-top:15px">
                <table style ="width :100%">
                <tr>
                  <td class =" td_rightnoborder " style = "width :80px;">题干：</td>
                    <td >
                            <asp:TextBox ID="tbAddField" runat="server" Width ="600px" 
                                Height="40px" TextMode="MultiLine"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="tbAddField" Display="Dynamic" 
                    ErrorMessage="不能为空。" ValidationGroup="AddField" ForeColor="Red"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                    ControlToValidate="tbAddField" Display="Dynamic" 
                    ErrorMessage="请不要超过1000个字符。" 
                    ValidationExpression="^{1,1000}$" 
                    ValidationGroup="AddField" ForeColor="Red"></asp:RegularExpressionValidator>

                    </td>

                  

                </tr>
                <tr>  <td class =" td_rightnoborder ">
                    是否必填：</td>
                <td>
                    <asp:RadioButtonList ID="rblNecessary" runat="server"  
                        RepeatDirection="Horizontal" TextAlign="Left">
                        <asp:ListItem>是</asp:ListItem>
                        <asp:ListItem Selected="True">否</asp:ListItem>
                    </asp:RadioButtonList>
                    </td></tr>
                <tr>  <td class =" td_rightnoborder ">
                    是否可重复：</td>
                <td>
                    <asp:RadioButtonList ID="rblRepeat" runat="server" 
                        RepeatDirection="Horizontal">
                        <asp:ListItem Selected="True">是</asp:ListItem>
                        <asp:ListItem>否</asp:ListItem>
                    </asp:RadioButtonList>
                    </td></tr>
                <tr>  <td class =" td_rightnoborder ">
                    类型及内容：</td>
                <td>
                    <asp:RadioButtonList ID="rblColumntype" runat="server" 
                        RepeatDirection="Horizontal" AutoPostBack="True" 
                        onselectedindexchanged="rblColumntype_SelectedIndexChanged">
                        <asp:ListItem Selected="True">文本</asp:ListItem>
                        <asp:ListItem>单选</asp:ListItem>
                        <asp:ListItem>复选</asp:ListItem>
                        <asp:ListItem>下拉菜单</asp:ListItem>
                        <asp:ListItem>日期</asp:ListItem>
                    </asp:RadioButtonList>
                    <div id= "divItem" runat ="server" visible ="false" >
                    编辑选项，选项之间用“|”间隔，例如询问性别的选项可以是：男|女|保密<br/>

                                                <asp:TextBox ID="tbIteml" runat="server" Width ="600px" 
                                Height="40px" TextMode="MultiLine"></asp:TextBox>
                
                    
                    </div>
                    </td></tr>
                    <tr>  <td class =" td_rightnoborder ">填写说明：</td><td>
                            <asp:TextBox ID="tbRemarks" runat="server" Width ="600px" 
                                Height="40px" TextMode="MultiLine"></asp:TextBox>

                        </td></tr>
                    <tr><td>&nbsp;</td><td>
                <asp:Button ID="btAddProject" runat="server" Text="添加" 
                    ValidationGroup="AddField" onclick="btAddProject_Click" />   
                    <asp:Label ID="lbAddMessage" runat="server" ForeColor="Red"></asp:Label>                                  
                        </td></tr>
            </table>  
                </div>
        <asp:GridView ID="GridView1" runat="server" 
                 onrowdatabound="GridView1_RowDataBound" 
                BorderWidth="1px" CssClass="gv" 
                 cellspacing="1" AutoGenerateColumns="False" Width="100%" 
                onrowcreated="GridView1_RowCreated" OnSelectedIndexChanging="GridView1_SelectedIndexChanging">
            <RowStyle BorderWidth="1px" CssClass="gvrow" />
            <Columns>
            
             <asp:TemplateField> 
               <HeaderTemplate>  <asp:CheckBox ID="CheckBox2" Text ="全选" runat="server" AutoPostBack="True" 
                OnCheckedChanged="CheckBox2_CheckedChanged"  />    </HeaderTemplate>        
               <ItemTemplate><asp:CheckBox ID="CheckBox1" runat="server" /></ItemTemplate>               
               </asp:TemplateField>
                <asp:BoundField DataField="id" HeaderText="序号" ReadOnly="True" />
                <asp:BoundField DataField="projectname" HeaderText="问卷内容" ReadOnly="True" />
                <asp:BoundField DataField="necessary" HeaderText="是否必填" ReadOnly="True" />
                <asp:BoundField DataField="repeat" HeaderText="是否可重复" ReadOnly="True" />
                <asp:BoundField DataField="columntype" HeaderText="样式" ReadOnly="True" />
                 <asp:BoundField DataField="Items" HeaderText="选项" ReadOnly="True" />
                <asp:BoundField DataField="remarks" HeaderText="填写说明" ReadOnly="True" />
                <asp:TemplateField HeaderText="顺序">
                    <ItemTemplate>
                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("columnorder") %>' Width ="36px"  Font-Strikeout="False"></asp:TextBox>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:CommandField HeaderText="修改" SelectText="修改" ShowSelectButton="True" />
            </Columns>
            <HeaderStyle BorderWidth="1px" CssClass="gvhead" />
        </asp:GridView>
      <div runat="server" id="divOrdernote">排序说明：在0-1000之间的顺序值显示为题号；如果开始位置的题目不需要显示题号，可以将顺序值设成负整数；如果结束位置的题目不显示题号，可以将顺序值设为大于1000的整数。</div>
        </td>
      </tr>
      <tr>
      <td class =" td_leftnoborder ">  <asp:Button ID="Button1" runat="server" onclick="btDelAll_Click" Text="批量删除" Visible ="false"  /> </td>

      <td class ="  td_rightnoborder  "> 
          <asp:Button ID="btPaixu" runat="server" Text="排序" onclick="btPaixu_Click"  Visible = "false" /></td>

      </tr>
    </table>
<!-- 一组内容模块结束 -->


   
    </td>
    <td  style =" background-image:url(../../css/admincss/images/mail_rightbg.gif )" >
    </td>
  </tr>
  <tr>
<td  class ="buttom_bg_left "></td>
  <td   class ="buttom_bg_center " ></td>
    <td  class ="buttom_bg_right " ></td>
  </tr>
</table>
    </div>
    </form>
</body>
</html>
