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

OA系统

开发平台:

ASP/ASPX

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