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

OA系统

开发平台:

ASP/ASPX

  1. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="approvel_flow.aspx.cs" Inherits="web_personnel_curricula_vitae_approvel_flow" %>
  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.     <script language="javascript" type="text/javascript">
  7.         function SelectEmployee()
  8.         {
  9.             var url = "../../personnel/curricula_vitae/employee_select_single_index.aspx";
  10.             var features = "width=500,height=400,top=100,left=200,location=no,toolbar=no,status=no,resizable=yes,scrollbars=yes";
  11.             var selectEmployee = open(url, 'selectEmployee', features);
  12.             selectEmployee.focus();
  13.         }
  14.         function setValue(value, text)
  15.         {
  16.             document.all.FlowWizard$TxtOperator.value=text;
  17.             document.all.FlowWizard$OperatorId.value=value;
  18.         }
  19.     </script>
  20.     <link href="../../../css/style.css" rel="stylesheet" type="text/css" />
  21. </head>
  22. <body>
  23.     <form id="form1" runat="server">
  24.     <div>
  25.     <center>
  26.         &nbsp;</center>
  27.         <center>
  28.             <asp:GridView ID="MainList" runat="server" AutoGenerateColumns="False" BackColor="White"
  29.                 BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3" DataKeyNames="id"
  30.                 DataSourceID="SqlDataSource3" Style="position: relative" Width="600px" OnRowCommand="MainList_RowCommand" OnRowCreated="MainList_RowCreated" OnRowDataBound="MainList_RowDataBound">
  31.                 <FooterStyle BackColor="White" ForeColor="#000066" />
  32.                 <RowStyle ForeColor="#000066" />
  33.                 <Columns>
  34.                     <asp:TemplateField HeaderText="適用職位">
  35.                         <ItemTemplate>
  36.                             <asp:LinkButton ID="LbPosition" CommandName="EditData" runat="server" Style="position: relative"></asp:LinkButton>
  37.                         </ItemTemplate>
  38.                     </asp:TemplateField>
  39.                     <asp:CommandField ShowDeleteButton="True" >
  40.                         <ControlStyle ForeColor="Black" />
  41.                     </asp:CommandField>
  42.                 </Columns>
  43.                 <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
  44.                 <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
  45.                 <HeaderStyle BackColor="Desktop" Font-Bold="True" ForeColor="White" />
  46.             </asp:GridView>
  47.             <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:oaConnection %>"
  48.                 DeleteCommand="delete from OA_FLOW_MAIN where id=@id" SelectCommand="select id from OA_FLOW_MAIN where department_id=@department_id">
  49.                 <SelectParameters>
  50.                     <asp:SessionParameter DefaultValue="0" Name="department_id" SessionField="p_department_id" />
  51.                 </SelectParameters>
  52.                 <DeleteParameters>
  53.                     <asp:Parameter Name="id" />
  54.                 </DeleteParameters>
  55.             </asp:SqlDataSource>
  56.     
  57.         <br />
  58.             <asp:Button ID="BtnAddMain" runat="server" Text="新增流程" OnClick="BtnAddMain_Click" />
  59.         </center>
  60.         <center>
  61.         <br />
  62.         <asp:Wizard ID="FlowWizard" runat="server" BackColor="#EFF3FB" BorderColor="#B5C7DE"
  63.             BorderWidth="1px" Font-Names="Verdana" Font-Size="1em" Style="position: relative"
  64.             Width="600px" ActiveStepIndex="1" Height="450px" OnNextButtonClick="FlowWizard_NextButtonClick" OnFinishButtonClick="FlowWizard_FinishButtonClick" Visible="False">
  65.             <StepStyle Font-Size="0.9em" ForeColor="#333333" />
  66.             <WizardSteps>
  67.                 <asp:WizardStep runat="server" Title="第一步" StepType="Start">
  68.                     <asp:Table ID="TblFlowMain" runat="server" Style="position: relative" Width="450px">
  69.                         <asp:TableHeaderRow runat="server">
  70.                             <asp:TableHeaderCell ColumnSpan="2" HorizontalAlign="Left" runat="server">新增表單流程</asp:TableHeaderCell>
  71.                         </asp:TableHeaderRow>
  72.                         <asp:TableRow runat="server">
  73.                             <asp:TableCell BorderWidth="1px" runat="server">部門</asp:TableCell>
  74.                             <asp:TableCell BorderWidth="1px" HorizontalAlign="Left" Width="350px" runat="server">
  75.                                 <asp:TextBox ID="TxtDepartment" runat="server" Enabled="False"></asp:TextBox>
  76.                             </asp:TableCell>
  77.                         </asp:TableRow>
  78.                         <asp:TableRow runat="server">
  79.                             <asp:TableCell BorderWidth="1px" runat="server">職位</asp:TableCell>
  80.                             <asp:TableCell BorderWidth="1px" HorizontalAlign="Left" runat="server">
  81.                                 <asp:CheckBoxList Width="350px" ID="ChkPosition" runat="server" DataSourceID="SqlDataSource1" DataTextField="name" DataValueField="id">
  82.                                 </asp:CheckBoxList>
  83.                             </asp:TableCell>
  84.                         </asp:TableRow>
  85.                     </asp:Table>
  86.                 </asp:WizardStep>
  87.                 <asp:WizardStep runat="server" Title="第二步" StepType="Finish">
  88.                     <asp:GridView ID="DetailList" runat="server" AutoGenerateColumns="False" BackColor="White"
  89.                         BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3" DataKeyNames="id"
  90.                         DataSourceID="SqlDataSource2" OnRowDataBound="DetailList_RowDataBound" Style="position: relative"
  91.                         Width="450px" OnRowCommand="DetailList_RowCommand" OnRowCreated="DetailList_RowCreated">
  92.                         <Columns>
  93.                             <asp:BoundField DataField="number" HeaderText="序號" SortExpression="number" />
  94.                             <asp:BoundField DataField="emp_name" HeaderText="辦理人" SortExpression="emp_name" />
  95.                             <asp:TemplateField>
  96.                                 <ItemTemplate>
  97.                                     <asp:LinkButton ID="LbEdit" CommandName="EditData" runat="server" Style="position: relative">編輯</asp:LinkButton>
  98.                                 </ItemTemplate>
  99.                                 <ControlStyle ForeColor="Highlight" />
  100.                             </asp:TemplateField>
  101.                             <asp:CommandField ShowDeleteButton="True" >
  102.                                 <ControlStyle ForeColor="Highlight" />
  103.                             </asp:CommandField>
  104.                         </Columns>
  105.                         <FooterStyle BackColor="White" ForeColor="#000066" />
  106.                         <HeaderStyle BackColor="Desktop" Font-Bold="True" ForeColor="White" />
  107.                         <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
  108.                         <RowStyle ForeColor="#000066" />
  109.                         <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
  110.                     </asp:GridView>
  111.                     <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:oaConnection %>"
  112.                         DeleteCommand="delete from OA_FLOW_DETAIL where id=@id" SelectCommand="select d.id, d.number, e.emp_name from OA_FLOW_DETAIL d inner join OA_EMPLOYEE e on d.operator_id=e.id where main_id=@main_id order by d.number">
  113.                         <DeleteParameters>
  114.                             <asp:Parameter Name="id" />
  115.                         </DeleteParameters>
  116.                         <SelectParameters>
  117.                             <asp:ControlParameter ControlID="MainId" DefaultValue="0" Name="main_id" PropertyName="Value" />
  118.                         </SelectParameters>
  119.                     </asp:SqlDataSource>
  120.                     <br />
  121.                     <asp:HiddenField ID="DetailId" Value="0" runat="server" />
  122.                     <asp:Table ID="TblDetail" runat="server" Style="position: relative; left: 1px; top: 7px;" Width="450px">
  123.                         <asp:TableHeaderRow runat="server">
  124.                             <asp:TableHeaderCell HorizontalAlign="Left" ColumnSpan="2" BorderWidth="1px" runat="server">流程步骤</asp:TableHeaderCell>
  125.                         </asp:TableHeaderRow>
  126.                         <asp:TableRow runat="server">
  127.                             <asp:TableCell BorderWidth="1px" Width="100px" runat="server">序號(數字)</asp:TableCell>
  128.                             <asp:TableCell BorderWidth="1px" HorizontalAlign="Left" runat="server">
  129.                                 <asp:TextBox ID="TxtNumber" runat="server"></asp:TextBox>
  130.                             </asp:TableCell>
  131.                         </asp:TableRow>
  132.                         <asp:TableRow runat="server">
  133.                             <asp:TableCell BorderWidth="1px" runat="server">辦理人</asp:TableCell>
  134.                             <asp:TableCell BorderWidth="1px" HorizontalAlign="Left" runat="server">
  135.                                 <asp:TextBox ID="TxtOperator" runat="server" Enabled="False"></asp:TextBox>
  136.                                 <asp:HiddenField ID="OperatorId" runat="server" Value="0" />
  137.                                 <input type="button" value="選擇" onclick="SelectEmployee()" />
  138.                             </asp:TableCell>
  139.                         </asp:TableRow>
  140.                         <asp:TableRow runat="server">
  141.                             <asp:TableCell BorderWidth="1px" ColumnSpan="2" runat="server">
  142.                                 <asp:Button ID="BtnAdd" runat="server" Text="新增" OnClick="BtnAdd_Click" />
  143.                                 <asp:Button ID="BtnSaveDetail" runat="server" Text="儲存" OnClick="BtnSaveDetail_Click" />
  144.                             </asp:TableCell>
  145.                         </asp:TableRow>
  146.                     </asp:Table><br />
  147.                     <asp:Label ID="LblError" runat="server" Style="position: relative" ForeColor="Red"></asp:Label>
  148.                 </asp:WizardStep>
  149.             </WizardSteps>
  150.             <SideBarButtonStyle BackColor="Desktop" Font-Names="Verdana" ForeColor="White" />
  151.             <NavigationButtonStyle BackColor="White" BorderColor="Desktop" BorderStyle="Solid"
  152.                 BorderWidth="1px" Font-Names="Verdana" Font-Size="1em" ForeColor="#284E98" />
  153.             <SideBarStyle BackColor="Desktop" Font-Size="1em" VerticalAlign="Top" Width="100px" />
  154.             <HeaderStyle BackColor="#284E98" BorderColor="#EFF3FB" BorderStyle="Solid" BorderWidth="2px"
  155.                 Font-Bold="True" Font-Size="1.1em" ForeColor="White" HorizontalAlign="Center" />
  156.         </asp:Wizard>
  157.         <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:oaConnection %>"
  158.             SelectCommand="SELECT [id], [name] FROM [OA_EMPLOYEE_POSITION] ORDER BY [sequence]">
  159.         </asp:SqlDataSource>
  160.         <asp:HiddenField ID="MainId" runat="server" Value="0" />
  161.         <asp:HiddenField ID="DepartmentId" runat="server" Value="0" />
  162.         <asp:HiddenField ID="PositionIds" runat="server" />
  163.         </center>
  164.     </div>
  165.     </form>
  166. </body>
  167. </html>