approvel_flow.aspx
资源名称:web.rar [点击查看]
上传用户:xrffrp
上传日期:2022-03-25
资源大小:22155k
文件大小:11k
源码类别:
OA系统
开发平台:
ASP/ASPX
- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="approvel_flow.aspx.cs" Inherits="web_personnel_curricula_vitae_approvel_flow" %>
- <!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 runat="server">
- <title>无标题页</title>
- <script language="javascript" type="text/javascript">
- function SelectEmployee()
- {
- var url = "../../personnel/curricula_vitae/employee_select_single_index.aspx";
- var features = "width=500,height=400,top=100,left=200,location=no,toolbar=no,status=no,resizable=yes,scrollbars=yes";
- var selectEmployee = open(url, 'selectEmployee', features);
- selectEmployee.focus();
- }
- function setValue(value, text)
- {
- document.all.FlowWizard$TxtOperator.value=text;
- document.all.FlowWizard$OperatorId.value=value;
- }
- </script>
- <link href="../../../css/style.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <form id="form1" runat="server">
- <div>
- <center>
- </center>
- <center>
- <asp:GridView ID="MainList" runat="server" AutoGenerateColumns="False" BackColor="White"
- BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3" DataKeyNames="id"
- DataSourceID="SqlDataSource3" Style="position: relative" Width="600px" OnRowCommand="MainList_RowCommand" OnRowCreated="MainList_RowCreated" OnRowDataBound="MainList_RowDataBound">
- <FooterStyle BackColor="White" ForeColor="#000066" />
- <RowStyle ForeColor="#000066" />
- <Columns>
- <asp:TemplateField HeaderText="適用職位">
- <ItemTemplate>
- <asp:LinkButton ID="LbPosition" CommandName="EditData" runat="server" Style="position: relative"></asp:LinkButton>
- </ItemTemplate>
- </asp:TemplateField>
- <asp:CommandField ShowDeleteButton="True" >
- <ControlStyle ForeColor="Black" />
- </asp:CommandField>
- </Columns>
- <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
- <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
- <HeaderStyle BackColor="Desktop" Font-Bold="True" ForeColor="White" />
- </asp:GridView>
- <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:oaConnection %>"
- DeleteCommand="delete from OA_FLOW_MAIN where id=@id" SelectCommand="select id from OA_FLOW_MAIN where department_id=@department_id">
- <SelectParameters>
- <asp:SessionParameter DefaultValue="0" Name="department_id" SessionField="p_department_id" />
- </SelectParameters>
- <DeleteParameters>
- <asp:Parameter Name="id" />
- </DeleteParameters>
- </asp:SqlDataSource>
- <br />
- <asp:Button ID="BtnAddMain" runat="server" Text="新增流程" OnClick="BtnAddMain_Click" />
- </center>
- <center>
- <br />
- <asp:Wizard ID="FlowWizard" runat="server" BackColor="#EFF3FB" BorderColor="#B5C7DE"
- BorderWidth="1px" Font-Names="Verdana" Font-Size="1em" Style="position: relative"
- Width="600px" ActiveStepIndex="1" Height="450px" OnNextButtonClick="FlowWizard_NextButtonClick" OnFinishButtonClick="FlowWizard_FinishButtonClick" Visible="False">
- <StepStyle Font-Size="0.9em" ForeColor="#333333" />
- <WizardSteps>
- <asp:WizardStep runat="server" Title="第一步" StepType="Start">
- <asp:Table ID="TblFlowMain" runat="server" Style="position: relative" Width="450px">
- <asp:TableHeaderRow runat="server">
- <asp:TableHeaderCell ColumnSpan="2" HorizontalAlign="Left" runat="server">新增表單流程</asp:TableHeaderCell>
- </asp:TableHeaderRow>
- <asp:TableRow runat="server">
- <asp:TableCell BorderWidth="1px" runat="server">部門</asp:TableCell>
- <asp:TableCell BorderWidth="1px" HorizontalAlign="Left" Width="350px" runat="server">
- <asp:TextBox ID="TxtDepartment" runat="server" Enabled="False"></asp:TextBox>
- </asp:TableCell>
- </asp:TableRow>
- <asp:TableRow runat="server">
- <asp:TableCell BorderWidth="1px" runat="server">職位</asp:TableCell>
- <asp:TableCell BorderWidth="1px" HorizontalAlign="Left" runat="server">
- <asp:CheckBoxList Width="350px" ID="ChkPosition" runat="server" DataSourceID="SqlDataSource1" DataTextField="name" DataValueField="id">
- </asp:CheckBoxList>
- </asp:TableCell>
- </asp:TableRow>
- </asp:Table>
- </asp:WizardStep>
- <asp:WizardStep runat="server" Title="第二步" StepType="Finish">
- <asp:GridView ID="DetailList" runat="server" AutoGenerateColumns="False" BackColor="White"
- BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3" DataKeyNames="id"
- DataSourceID="SqlDataSource2" OnRowDataBound="DetailList_RowDataBound" Style="position: relative"
- Width="450px" OnRowCommand="DetailList_RowCommand" OnRowCreated="DetailList_RowCreated">
- <Columns>
- <asp:BoundField DataField="number" HeaderText="序號" SortExpression="number" />
- <asp:BoundField DataField="emp_name" HeaderText="辦理人" SortExpression="emp_name" />
- <asp:TemplateField>
- <ItemTemplate>
- <asp:LinkButton ID="LbEdit" CommandName="EditData" runat="server" Style="position: relative">編輯</asp:LinkButton>
- </ItemTemplate>
- <ControlStyle ForeColor="Highlight" />
- </asp:TemplateField>
- <asp:CommandField ShowDeleteButton="True" >
- <ControlStyle ForeColor="Highlight" />
- </asp:CommandField>
- </Columns>
- <FooterStyle BackColor="White" ForeColor="#000066" />
- <HeaderStyle BackColor="Desktop" Font-Bold="True" ForeColor="White" />
- <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
- <RowStyle ForeColor="#000066" />
- <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
- </asp:GridView>
- <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:oaConnection %>"
- 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">
- <DeleteParameters>
- <asp:Parameter Name="id" />
- </DeleteParameters>
- <SelectParameters>
- <asp:ControlParameter ControlID="MainId" DefaultValue="0" Name="main_id" PropertyName="Value" />
- </SelectParameters>
- </asp:SqlDataSource>
- <br />
- <asp:HiddenField ID="DetailId" Value="0" runat="server" />
- <asp:Table ID="TblDetail" runat="server" Style="position: relative; left: 1px; top: 7px;" Width="450px">
- <asp:TableHeaderRow runat="server">
- <asp:TableHeaderCell HorizontalAlign="Left" ColumnSpan="2" BorderWidth="1px" runat="server">流程步骤</asp:TableHeaderCell>
- </asp:TableHeaderRow>
- <asp:TableRow runat="server">
- <asp:TableCell BorderWidth="1px" Width="100px" runat="server">序號(數字)</asp:TableCell>
- <asp:TableCell BorderWidth="1px" HorizontalAlign="Left" runat="server">
- <asp:TextBox ID="TxtNumber" runat="server"></asp:TextBox>
- </asp:TableCell>
- </asp:TableRow>
- <asp:TableRow runat="server">
- <asp:TableCell BorderWidth="1px" runat="server">辦理人</asp:TableCell>
- <asp:TableCell BorderWidth="1px" HorizontalAlign="Left" runat="server">
- <asp:TextBox ID="TxtOperator" runat="server" Enabled="False"></asp:TextBox>
- <asp:HiddenField ID="OperatorId" runat="server" Value="0" />
- <input type="button" value="選擇" onclick="SelectEmployee()" />
- </asp:TableCell>
- </asp:TableRow>
- <asp:TableRow runat="server">
- <asp:TableCell BorderWidth="1px" ColumnSpan="2" runat="server">
- <asp:Button ID="BtnAdd" runat="server" Text="新增" OnClick="BtnAdd_Click" />
- <asp:Button ID="BtnSaveDetail" runat="server" Text="儲存" OnClick="BtnSaveDetail_Click" />
- </asp:TableCell>
- </asp:TableRow>
- </asp:Table><br />
- <asp:Label ID="LblError" runat="server" Style="position: relative" ForeColor="Red"></asp:Label>
- </asp:WizardStep>
- </WizardSteps>
- <SideBarButtonStyle BackColor="Desktop" Font-Names="Verdana" ForeColor="White" />
- <NavigationButtonStyle BackColor="White" BorderColor="Desktop" BorderStyle="Solid"
- BorderWidth="1px" Font-Names="Verdana" Font-Size="1em" ForeColor="#284E98" />
- <SideBarStyle BackColor="Desktop" Font-Size="1em" VerticalAlign="Top" Width="100px" />
- <HeaderStyle BackColor="#284E98" BorderColor="#EFF3FB" BorderStyle="Solid" BorderWidth="2px"
- Font-Bold="True" Font-Size="1.1em" ForeColor="White" HorizontalAlign="Center" />
- </asp:Wizard>
- <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:oaConnection %>"
- SelectCommand="SELECT [id], [name] FROM [OA_EMPLOYEE_POSITION] ORDER BY [sequence]">
- </asp:SqlDataSource>
- <asp:HiddenField ID="MainId" runat="server" Value="0" />
- <asp:HiddenField ID="DepartmentId" runat="server" Value="0" />
- <asp:HiddenField ID="PositionIds" runat="server" />
- </center>
- </div>
- </form>
- </body>
- </html>