<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EmployFileEdit.aspx.cs"
    Inherits="OAWeb.hrm.employ.EmployFileEdit" Theme="Default" %>

<!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>编辑人员信息</title>
    <link href="../../App_Themes/Default/default.css" rel="stylesheet" type="text/css" />
    <link href="/css/global.css" rel="Stylesheet" />
    <script type="text/javascript" src="/js/jquery-1.8.0.min.js"></script>
    <script language="javascript" type="text/javascript" src="/js/My97DatePicker/WdatePicker.js"></script>
    <script src="/js/artDialog/artDialog.js?skin=default" type="text/javascript"></script>
    <script src="/js/artDialog/plugins/iframeTools.source.js" type="text/javascript"></script>
    <script src="/js/jquery.form.js" type="text/javascript"></script>
    <script type="text/javascript" src="/js/jquery.form.extend.js"></script>
    <style>
        td
        {
            padding: 3px;
        }
    </style>
    <script language="javascript" type="text/javascript">
        function OpenEditDialog(id) {

            OpenDialog("/hrm/Employ/ContractEdit.aspx?ContractId=" + id, "编辑合同");
            return false;
        }

        function ChangeDiv(value) {
            if (value == 1) {
                $("#TbEdit").show();
                $("#DivContract").hide();
            } else {
                $("#TbEdit").hide();
                $("#DivContract").show();
            }
        }
       
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div style="width: 700px; height: 500px; overflow-y: scroll">
        <p align="center" style="height: 25px; background-color: #e6e6e6; padding:5px;">
            <b><a href="javascript:void(0)" onclick="ChangeDiv(1)">职员基本信息</a></b> <b style="margin-left: 30px">
                <a href="javascript:void(0)" onclick="ChangeDiv(2)">劳动合同</a></b>
        </p>
        <table cellspacing="0" cellpadding="3" width="100%" border="1" style="border-collapse: collapse"
            id="TbEdit">
            <tr>
                <td align="left" class="st13pt" colspan="4">
                    <strong><span style="color: #003399">基本信息:</span></strong>
                </td>
            </tr>
            <tr>
                <td width="139" align="right" class="st12pt">
                    OA账号：
                </td>
                <td width="324" align="left" class="st12pt">
                    <asp:TextBox ID="txtUserName" runat="server" Width="84%" MaxLength="100"></asp:TextBox>
                </td>
                <td width="140" align="right" class="st12pt">
                    OA密码：&nbsp;
                </td>
                <td width="325" align="left" class="st12pt">
                    <asp:TextBox ID="txtPassword" runat="server" Width="84%" MaxLength="100"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td width="139" align="right" class="st12pt">
                    <span style="color: #ff0033">*</span>真实姓名：
                </td>
                <td width="324" align="left" class="st12pt">
                    <asp:TextBox ID="txtRealName" runat="server" Width="84%" MaxLength="10"></asp:TextBox>
                </td>
                <td width="140" align="right" class="st12pt">
                    <span style="color: #ff0033">*</span>出生日期：
                </td>
                <td width="325" align="left" class="st12pt">
                    <asp:TextBox ID="txtBirthDate" runat="server" onfocus="WdatePicker()" Width="145px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td width="139" align="right" class="st12pt">
                    身份证：&nbsp;
                </td>
                <td width="320" align="left" class="st12pt">
                    <asp:TextBox ID="txtIDcard" runat="server" Width="84%"></asp:TextBox>
                </td>
                <td width="140" align="right" class="st12pt">
                    婚姻状况：
                </td>
                <td width="382" align="left" class="st12pt">
                    <asp:DropDownList ID="ddlMarriage" runat="server">
                        <asp:ListItem Value="未婚">未婚</asp:ListItem>
                        <asp:ListItem Value="已婚">已婚</asp:ListItem>
                        <asp:ListItem Value="离异">离异</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td width="139" align="right" class="st12pt">
                    身高：
                </td>
                <td width="324" align="left" class="st12pt">
                    <asp:TextBox ID="txtHeight" runat="server" Width="84%" MaxLength="20"></asp:TextBox>
                </td>
                <td width="140" align="right" class="st12pt">
                    民族：&nbsp;
                </td>
                <td width="325" align="left" class="st12pt">
                    <asp:TextBox ID="txtNationality" runat="server" MaxLength="10" Width="93%"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td width="139" align="right" class="st12pt">
                    <span style="color: #ff0033"><span style="color: #000000">性别：</span></span>
                </td>
                <td width="320" align="left" class="st12pt">
                    <asp:DropDownList ID="ddlSex" runat="server">
                        <asp:ListItem>男</asp:ListItem>
                        <asp:ListItem>女</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td width="140" align="right" class="st12pt">
                    健康状况：
                </td>
                <td width="382" align="left" class="st12pt">
                    <asp:TextBox ID="txtHealth" runat="server" Width="84%" MaxLength="20"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td width="139" align="right" class="st12pt">
                    <span style="color: #ff0033"></span>毕业学校：&nbsp;
                </td>
                <td width="324" align="left" class="st12pt">
                    <asp:TextBox ID="txtSchool" runat="server" Width="84%" MaxLength="20"></asp:TextBox>
                </td>
                <td width="140" align="right" class="st12pt">
                    <span style="color: #ff0033">*</span>毕业时间：&nbsp;
                </td>
                <td width="325" align="left" class="st12pt">
                    <asp:TextBox ID="txtGraduationDate" runat="server" onfocus="WdatePicker()" Width="145px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td width="139" align="right" class="st12pt">
                    文凭学历：&nbsp;
                </td>
                <td width="320" align="left" class="st12pt">
                    <asp:DropDownList ID="ddlDiplomaID" runat="server">
                        <asp:ListItem Value="0">请选择</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td width="140" align="right" class="st12pt">
                    专业：&nbsp;
                </td>
                <td width="382" align="left" class="st12pt">
                    <asp:TextBox ID="txtSpecialName" runat="server" Width="84%"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td width="139" align="right" class="st12pt">
                    外语水平：
                </td>
                <td width="320" align="left" class="st12pt">
                    <asp:TextBox ID="txtForeignlanguage" runat="server" Width="84%" MaxLength="20"></asp:TextBox>
                </td>
                <td width="140" align="right" class="st12pt">
                    政治面貌：
                </td>
                <td width="382" align="left" class="st12pt">
                    <asp:TextBox ID="txtPolitical" runat="server" Width="84%" MaxLength="100"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td width="139" align="right" class="st12pt">
                    兴趣爱好：
                </td>
                <td width="320" align="left" class="st12pt">
                    <asp:TextBox ID="txtHobbies" runat="server" Width="84%" MaxLength="20"></asp:TextBox>
                </td>
                <td width="140" align="right" class="st12pt">
                    技能专长：
                </td>
                <td width="382" align="left" class="st12pt">
                    <asp:TextBox ID="txtTechnical" runat="server" Width="84%" MaxLength="100"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="left" class="st13pt" colspan="4">
                    <strong><span style="color: #003399">岗位部门:</span></strong>
                </td>
            </tr>
            <tr>
                <td width="139" align="right" class="st12pt">
                    职务：
                </td>
                <td width="324" align="left" class="st12pt">
                    <asp:DropDownList ID="ddlDutieID" runat="server">
                        <asp:ListItem Value="0">请选择</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td width="140" align="right" class="st12pt">
                    所在部门：&nbsp;
                </td>
                <td width="325" align="left" class="st12pt">
                    <asp:DropDownList ID="ddlDeptID" runat="server">
                        <asp:ListItem Value="0">请选择</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td width="139" align="right" class="st12pt">
                    类型：
                </td>
                <td width="324" align="left" class="st12pt">
                    <asp:DropDownList ID="ddlState" runat="server">
                        <asp:ListItem Value="1">在职</asp:ListItem>
                        <asp:ListItem Value="2">离退</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td width="140" align="right" class="st12pt">
                    工号：&nbsp;
                </td>
                <td width="325" align="left" class="st12pt">
                    <asp:TextBox ID="txtWorkNumber" runat="server" Width="84%" MaxLength="100"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="left" class="st13pt" colspan="4">
                    <strong><span style="color: #003399">联系方式:</span></strong>
                </td>
            </tr>
            <tr>
                <td width="139" align="right" class="st12pt">
                    户籍地址：
                </td>
                <td width="324" align="left" class="st12pt">
                    <asp:TextBox ID="txtRegAddress" runat="server" Width="84%"></asp:TextBox>
                </td>
                <td width="140" align="right" class="st12pt">
                    邮政编码：&nbsp;
                </td>
                <td width="325" align="left" class="st12pt">
                    <asp:TextBox ID="txtPostCode" runat="server" Width="84%"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td width="139" align="right" class="st12pt">
                    通讯地址：
                </td>
                <td width="324" align="left" class="st12pt">
                    <asp:TextBox ID="txtMailAddress" runat="server" Width="84%"></asp:TextBox>
                </td>
                <td width="140" align="right" class="st12pt">
                    QQ：&nbsp;
                </td>
                <td width="325" align="left" class="st12pt">
                    <asp:TextBox ID="txtQQ" runat="server" Width="84%"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td width="139" align="right" class="st12pt">
                    Email：
                </td>
                <td width="320" align="left" class="st12pt">
                    <asp:TextBox ID="txtEmail" runat="server" Width="84%" MaxLength="100"></asp:TextBox>
                </td>
                <td width="140" align="right" class="st12pt">
                    手机：
                </td>
                <td width="382" align="left" class="st12pt">
                    <asp:TextBox ID="txtMobile" runat="server" Width="84%" MaxLength="20"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td width="139" align="right" class="st12pt">
                    &nbsp;联系电话：&nbsp;
                </td>
                <td width="324" align="left" class="st12pt">
                    <asp:TextBox ID="txtTelephone" runat="server" Width="84%" MaxLength="20"></asp:TextBox>
                </td>
                <td width="140" align="right" class="st12pt">
                </td>
                <td width="325" align="left" class="st12pt">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td width="139" align="right" class="st12pt" style="height: 81px">
                    教育情况：
                </td>
                <td width="815" colspan="3" align="left" class="st12pt" style="height: 81px">
                    <asp:TextBox ID="txtEducation" runat="server" Height="122px" TextMode="MultiLine"
                        Width="99%"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td width="139" align="right" class="st12pt" style="height: 81px">
                    工作经历：
                </td>
                <td width="815" colspan="3" align="left" class="st12pt" style="height: 81px">
                    <asp:TextBox ID="txtWorkExperience" runat="server" Height="122px" TextMode="MultiLine"
                        Width="99%"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td width="139" align="right" class="st12pt" style="height: 81px">
                    培训经历：
                </td>
                <td width="815" colspan="3" align="left" class="st12pt" style="height: 81px">
                    <asp:TextBox ID="txtTrain" runat="server" Height="122px" TextMode="MultiLine" Width="99%"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td width="139" align="right" class="st12pt" style="height: 81px">
                    社会情况：
                </td>
                <td width="815" colspan="3" align="left" class="st12pt" style="height: 81px">
                    <asp:TextBox ID="txtSociety" runat="server" Height="122px" TextMode="MultiLine" Width="99%"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td width="139" align="right" class="st12pt" style="height: 81px">
                    资格证书：
                </td>
                <td width="815" colspan="3" align="left" class="st12pt" style="height: 81px">
                    <asp:TextBox ID="txtCertificate" runat="server" Height="122px" TextMode="MultiLine"
                        Width="99%"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td width="139" align="right" class="st12pt" style="height: 81px">
                    自我评价：
                </td>
                <td width="815" colspan="3" align="left" class="st12pt" style="height: 81px">
                    <asp:TextBox ID="txtSelfAppraisal" runat="server" Height="122px" TextMode="MultiLine"
                        Width="99%"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td width="139" align="right" class="st12pt" style="height: 81px">
                    备注：
                </td>
                <td width="815" colspan="3" align="left" class="st12pt" style="height: 81px">
                    <asp:TextBox ID="txtRemark" runat="server" Height="122px" TextMode="MultiLine" Width="99%"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="right" class="st12pt" width="139">
                </td>
                <td align="left" class="st12pt" colspan="3" width="815">
                </td>
            </tr>
            <tr>
                <td align="center" valign="top" class="st12pt" colspan="4">
                    <input id="btnSave" type="button" value=" 保 存 " class="btn_77px" />
                    <input id="btnClose" type="button" value=" 返 回 " onclick="art.dialog.close();return false;"
                        class="btn_77px" />
                </td>
            </tr>
        </table>
        <div class="list" id="DivContract" style="display: none">
            <asp:GridView ID="gvEmployList" runat="server" AutoGenerateColumns="False" DataKeyNames="Id"
                OnRowDataBound="gvEmployList_RowDataBound" Width="100%" PageSize="20" CellSpacing="0"
                CssClass="table_list" GridLines="None">
                <HeaderStyle CssClass="title" Wrap="False" />
                <Columns>
                    <asp:TemplateField Visible="false">
                        <HeaderTemplate>
                            <asp:CheckBox ID="chkAll" runat="server" onclick="SelectAll(this);" />
                        </HeaderTemplate>
                        <ItemTemplate>
                            <input id="chkItem" name="chkItem" type="checkbox" value="<%# Eval("Id") %>" />
                        </ItemTemplate>
                        <ItemStyle Width="20px" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="合同类别">
                        <ItemTemplate>
                            <asp:Label ID="lblContractType" runat="server"></asp:Label>
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:BoundField DataField="WorkNumber" HeaderText="工号">
                        <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="姓名">
                        <ItemTemplate>
                            <%# Eval("RealName") %>
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="签订日期">
                        <ItemTemplate>
                            <asp:Label ID="lblSignedDate" runat="server"></asp:Label>
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="试用期限">
                        <ItemTemplate>
                            <asp:Label ID="lblProbationDate" runat="server" Text=""></asp:Label>
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="合同期限">
                        <ItemTemplate>
                            <asp:Label ID="lblExpireDate" runat="server" Text=""></asp:Label>
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="操作">
                        <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle HorizontalAlign="Center" Width="145px" />
                        <ItemTemplate>
                            <asp:LinkButton ID="Edit" runat="server" CausesValidation="false" CommandName="lbtEdit">编辑</asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
        </div>
    </div>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#btnSave").click(function () {
                $("#form1").ajaxSubmit({
                    url: "/hrm/employ/EmployFileEdit.aspx?op=Save&EmployID=<%=EmployID %>&Id=<%=Id %>",
                    success: function (result) {
                        if (result.indexOf("url:") > -1) {
                            window.location.href = result.replace("url:", "");
                            return;
                        }
                        if (result == "ok") {
                            alert("保存成功");
                            CloseReload();
                        } else {
                            alert(result);
                        }
                    }
                });
                return false;
            })
        });
    </script>
    </form>
</body>
</html>
