flow_show.aspx
上传用户:xrffrp
上传日期:2022-03-25
资源大小:22155k
文件大小:14k
源码类别:

OA系统

开发平台:

ASP/ASPX

  1. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="flow_show.aspx.cs" Inherits="web_approvel_flow_flow_show" %>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" >
  4. <head runat="server">
  5.     <title>无标题页</title>
  6.     <link href="../../../css/style.css" rel="stylesheet" type="text/css" />
  7.     <script type="text/javascript" language="javascript">
  8.         function selectDepartment()
  9.         {
  10.             var url = "../../personnel/department/department_select_chk.aspx";
  11.             var features = "width=1030,height=720,top=0,left=0,location=no,toolbar=no,status=no,resizable=yes,scrollbars=yes";
  12.             var selectDepartment = open(url, 'selectDepartment', features);
  13.             selectDepartment.focus();
  14.         }
  15.         function SelectEmployee()
  16.         {
  17.             var url = "../../personnel/curricula_vitae/employee_select_single_index.aspx";
  18.             var features = "width=500,height=400,top=100,left=200,location=no,toolbar=no,status=no,resizable=yes,scrollbars=yes";
  19.             var selectEmployee = open(url, 'selectEmployee', features);
  20.             selectEmployee.focus();
  21.         }
  22.         function setValue(value, text)
  23.         {
  24.             document.all.TxtOperator.value=text;
  25.             document.all.OperatorId.value=value;
  26.         }
  27.     </script>
  28. </head>
  29. <body>
  30.     <form id="form1" runat="server">
  31.     <div>
  32.     <center>
  33.         <asp:Table ID="TblFlowMain" runat="server" Style="position: relative" Width="500px">
  34.             <asp:TableHeaderRow ID="TableHeaderRow1" runat="server" BackColor="LightGray">
  35.                 <asp:TableHeaderCell ID="TableHeaderCell1" ColumnSpan="4" HorizontalAlign="Left" runat="server">添加表單屬性</asp:TableHeaderCell>
  36.             </asp:TableHeaderRow>
  37.             <asp:TableRow ID="TableRow1" runat="server">
  38.                 <asp:TableCell ID="TableCell1" BorderWidth="1px" runat="server">
  39.                     <asp:Label ID="Label2" runat="server" Text="名稱" BorderStyle="None"></asp:Label></asp:TableCell>
  40.                 <asp:TableCell ID="TableCell2" BorderWidth="1px" HorizontalAlign="Left" runat="server">
  41.                     <asp:TextBox ID="TxtName" Enabled="false" runat="server" Width="350px"></asp:TextBox>
  42.                     <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="名稱不能為空" ControlToValidate="TxtName"></asp:RequiredFieldValidator></asp:TableCell>
  43.             </asp:TableRow>
  44.             <asp:TableRow ID="TableRow2" runat="server">
  45.                 <asp:TableCell ID="TableCell3" BorderWidth="1px" runat="server">
  46.                     <asp:Label ID="Label3" runat="server" Text="描述" BorderStyle="None"></asp:Label></asp:TableCell>
  47.                 <asp:TableCell ID="TableCell4" BorderWidth="1px" HorizontalAlign="Left" runat="server">
  48.                     <asp:TextBox ID="TxtDescription" runat="server" Enabled="false" Width="350px" Rows="3" TextMode="MultiLine"></asp:TextBox></asp:TableCell>
  49.             </asp:TableRow>
  50.             <asp:TableRow>
  51.                 <asp:TableCell BorderWidth="1px">
  52.                     <asp:Label ID="Label5" runat="server" Text="適用類別" BorderStyle="None"></asp:Label></asp:TableCell>
  53.                 <asp:TableCell BorderWidth="1px" HorizontalAlign="Left">
  54.                     <asp:RadioButtonList ID="RbType" runat="server" Enabled="false" RepeatDirection="Horizontal">
  55.                         <asp:ListItem Text="台幹" Value="1" Selected="True"></asp:ListItem>
  56.                         <asp:ListItem Text="中幹" Value="2"></asp:ListItem>
  57.                         <asp:ListItem Text="台幹和中幹" Value="3"></asp:ListItem>
  58.                     </asp:RadioButtonList></asp:TableCell>
  59.             </asp:TableRow>
  60.             <asp:TableRow ID="TableRow3" runat="server">
  61.                 <asp:TableCell ID="TableCell5" BorderWidth="1px" runat="server">
  62.                     <asp:Label ID="Label4" runat="server" Text="適用部門"></asp:Label></asp:TableCell>
  63.                 <asp:TableCell ID="TableCell6" BorderWidth="1px" HorizontalAlign="Left" runat="server">
  64.                     <asp:Button runat="server" ID="BtnSelect" OnClientClick="selectDepartment()" Text="選擇" Visible="false" />
  65.                     <asp:Label ID="LblDepartments" runat="server" BorderStyle="None"></asp:Label>
  66.                     <asp:HiddenField ID="DepartmentIds" runat="server" />
  67.                 </asp:TableCell>
  68.             </asp:TableRow>
  69.             <asp:TableRow ID="TableRow4" runat="server">
  70.                 <asp:TableCell ID="TableCell7" BorderWidth="1px" ColumnSpan="2" runat="server">
  71.                     <asp:Button ID="BtnEdit" runat="server" Text="修改" OnClick="BtnEdit_Click" Visible="true"/>
  72.                     <asp:Button ID="BtnOk" runat="server" Text="儲存" OnClick="BtnOk_Click" Visible="false"/></asp:TableCell>
  73.             </asp:TableRow>
  74.         </asp:Table>
  75.         </center>
  76.         <center>
  77.             &nbsp;</center>
  78.         <center>
  79.             <asp:GridView ID="FlowList" runat="server"
  80.                 AutoGenerateColumns="False" BackColor="White" BorderColor="#CCCCCC" BorderStyle="None"
  81.                 BorderWidth="1px" CellPadding="3" DataSourceID="SqlDataSource1" OnRowCreated="FlowList_RowCreated"
  82.                 OnRowDataBound="FlowList_RowDataBound" Style="position: relative" Width="550px" OnRowCommand="FlowList_RowCommand">
  83.                 <FooterStyle BackColor="White" ForeColor="#000066" />
  84.                 <RowStyle ForeColor="Black" />
  85.                 <Columns>
  86.                     <asp:BoundField DataField="name" HeaderText="名稱" />
  87.                     <asp:TemplateField HeaderText="辦理人">
  88.                         <ItemTemplate>
  89.                             <asp:Label ID="Label1" runat="server" Style="position: relative" Text='<%# Eval("operator") %>'></asp:Label>
  90.                         </ItemTemplate>
  91.                     </asp:TemplateField>
  92.                     <asp:TemplateField HeaderText="簽核類別">
  93.                         <ItemTemplate>
  94.                             <asp:Label ID="LblApplyType" runat="server" Style="position: relative"></asp:Label>
  95.                         </ItemTemplate>
  96.                     </asp:TemplateField>
  97.                     <asp:BoundField DataField="number" HeaderText="編號" SortExpression="number" />
  98.                     <asp:BoundField DataField="next_number" HeaderText="下一步編號" SortExpression="next_number" />
  99.                     <asp:TemplateField HeaderText="最大天數">
  100.                         <ItemTemplate>
  101.                             <asp:Label ID="LblMaxDay" runat="server" Style="position: relative"></asp:Label>
  102.                         </ItemTemplate>
  103.                     </asp:TemplateField>
  104.                     <asp:BoundField DataField="larger_next" HeaderText="超過最大天數跳轉編號" SortExpression="larger_next" />
  105.                     <asp:TemplateField>
  106.                         <ItemTemplate>
  107.                             <asp:LinkButton ID="BtnEdit" runat="server" CommandName="EditData" Style="position: relative">編輯</asp:LinkButton>
  108.                         </ItemTemplate>
  109.                     </asp:TemplateField>
  110.                 </Columns>
  111.                 <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Left" />
  112.                 <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
  113.                 <HeaderStyle BackColor="Menu" Font-Bold="True" ForeColor="Black" />
  114.             </asp:GridView>
  115.             &nbsp;
  116.             <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:oaConnection %>"
  117.                 SelectCommand="select f.id, f.name, e.emp_name operator, f.number, f.next_number, f.larger_than, f.larger_next from OA_FLOW_DETAIL f inner join OA_EMPLOYEE e on f.operator_id=e.id where f.main_id=@main_id">
  118.                 <SelectParameters>
  119.                     <asp:QueryStringParameter DefaultValue="0" Name="main_id" QueryStringField="f_id" />
  120.                 </SelectParameters>
  121.             </asp:SqlDataSource><br />
  122.             <asp:Panel ID="PnlDetail" runat="server" Style="position: relative" Width="500px" Visible="false">
  123.                 <asp:Table ID="TblFlow" runat="server" Width="500px">
  124.                     <asp:TableHeaderRow ID="TableHeaderRow2" runat="server">
  125.                         <asp:TableHeaderCell ID="TableHeaderCell2" HorizontalAlign="Left" runat="server" BackColor="LightGray" ColumnSpan="2">流程表單</asp:TableHeaderCell>
  126.                     </asp:TableHeaderRow>
  127.                     <asp:TableRow ID="TableRow5" runat="server">
  128.                         <asp:TableCell ID="TableCell8" BorderWidth="1px" runat="server">
  129.                             <asp:Label ID="Label1" runat="server" Text="流程名稱"></asp:Label>
  130.                         </asp:TableCell>
  131.                         <asp:TableCell ID="TableCell9" BorderWidth="1px" HorizontalAlign="Left" runat="server">
  132.                             <asp:TextBox ID="TxtDetailName" runat="server"></asp:TextBox>
  133.                             <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
  134.                                 ErrorMessage="名稱不能為空" ControlToValidate="TxtName" Display="None"></asp:RequiredFieldValidator>
  135.                         </asp:TableCell>
  136.                     </asp:TableRow>
  137.                     <asp:TableRow ID="TableRow6" runat="server">
  138.                         <asp:TableCell ID="TableCell10" BorderWidth="1px" runat="server">
  139.                             <asp:Label ID="Label6" runat="server" Text="類別"></asp:Label>
  140.                         </asp:TableCell>
  141.                         <asp:TableCell ID="TableCell11" BorderWidth="1px" HorizontalAlign="Left" runat="server">          
  142.                             <asp:DropDownList ID="DdlType" runat="server">
  143.                                 <asp:ListItem Text="會簽" Value="1"></asp:ListItem>
  144.                                 <asp:ListItem Text="審批" Value="2" Selected="True"></asp:ListItem>
  145.                             </asp:DropDownList>
  146.                         </asp:TableCell>
  147.                     </asp:TableRow>
  148.                     <asp:TableRow ID="TableRow7" runat="server">
  149.                         <asp:TableCell ID="TableCell12" BorderWidth="1px" runat="server">
  150.                             <asp:Label ID="Label7" runat="server" Text="編號"></asp:Label>
  151.                         </asp:TableCell>
  152.                         <asp:TableCell ID="TableCell13" BorderWidth="1px" HorizontalAlign="Left" runat="server">
  153.                             <asp:TextBox ID="TxtNumber" runat="server"></asp:TextBox>
  154.                             <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
  155.                                 ErrorMessage="編號不能為空" ControlToValidate="TxtNumber" Display="None"></asp:RequiredFieldValidator>
  156.                         </asp:TableCell>
  157.                     </asp:TableRow>
  158.                     <asp:TableRow ID="TableRow8" runat="server">
  159.                         <asp:TableCell ID="TableCell14" BorderWidth="1px" runat="server">
  160.                             <asp:Label ID="Label8" runat="server" Text="辦理人"></asp:Label>
  161.                         </asp:TableCell>
  162.                         <asp:TableCell ID="TableCell15" BorderWidth="1px" HorizontalAlign="Left" runat="server">
  163.                             <asp:TextBox ID="TxtOperator" runat="server" Enabled="False"></asp:TextBox>
  164.                             <asp:HiddenField ID="OperatorId" runat="server" />
  165.                             <input type="button" value="選擇" onclick="SelectEmployee()" />
  166.                         </asp:TableCell>
  167.                     </asp:TableRow>
  168.                     <asp:TableRow ID="TableRow9" runat="server">
  169.                         <asp:TableCell ID="TableCell16" BorderWidth="1px" runat="server">
  170.                             <asp:Label ID="Label9" runat="server" Text="下一步編號"></asp:Label>
  171.                         </asp:TableCell>
  172.                         <asp:TableCell ID="TableCell17" BorderWidth="1px" HorizontalAlign="Left" runat="server">
  173.                             <asp:TextBox ID="TxtNextNumber" runat="server"></asp:TextBox>
  174.                         </asp:TableCell>
  175.                     </asp:TableRow>
  176.                     <asp:TableRow ID="TableRow10" runat="server">
  177.                         <asp:TableCell ID="TableCell18" BorderWidth="1px" runat="server">
  178.                             <asp:Label ID="Label10" runat="server" Text="最大天數"></asp:Label>
  179.                         </asp:TableCell>
  180.                         <asp:TableCell ID="TableCell19" BorderWidth="1px" HorizontalAlign="Left" runat="server">
  181.                             <asp:TextBox ID="TxtLargerThan" runat="server"></asp:TextBox>
  182.                         </asp:TableCell>
  183.                     </asp:TableRow>
  184.                     <asp:TableRow ID="TableRow11" runat="server">
  185.                         <asp:TableCell ID="TableCell20" BorderWidth="1px" runat="server">
  186.                             <asp:Label ID="Label11" runat="server" Text="超過最大天數跳轉編號"></asp:Label>
  187.                         </asp:TableCell>
  188.                         <asp:TableCell ID="TableCell21" BorderWidth="1px" HorizontalAlign="Left" runat="server">
  189.                             <asp:TextBox ID="TxtLargerNext" runat="server"></asp:TextBox>
  190.                         </asp:TableCell>
  191.                     </asp:TableRow>
  192.                     <asp:TableRow ID="TableRow12" runat="server">
  193.                         <asp:TableCell ID="TableCell22" BorderWidth="1px" ColumnSpan="2" runat="server">
  194.                             <asp:Button ID="Button1" runat="server" Text="儲存" OnClick="BtnDetailOk_Click" />&nbsp;
  195.                             <asp:Button ID="BtnCancel" runat="server" Text="取消" OnClick="BtnCancel_Click" />
  196.                         </asp:TableCell>
  197.                     </asp:TableRow>
  198.                 </asp:Table><br />
  199.                 <asp:ValidationSummary ID="ValidationSummary1" runat="server" />
  200.             </asp:Panel>
  201.         </center>
  202.     </div>
  203.     </form>
  204. </body>
  205. </html>