<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Dept_Edit.aspx.cs" Inherits="TotCms.Web.Office.Dept.Dept_Edit" %>
<!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="../style/global.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../js/common.js"></script>
    <script src="../../js/jquery-1.5.1.min.js" type="text/javascript"></script>
    <script src="../../js/jquery-ui-1.8.10/js/jquery-ui-1.8.10.custom.min.js" type="text/javascript"></script>
    <link href="../../js/jquery-ui-1.8.10/css/ui-lightness/jquery-ui-1.8.10.custom.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
    $(function() {
      $("#dialog:ui-dialog").dialog("destroy");
        //dept window
      $("#dialog-dept").dialog({
            autoOpen: false,
            height: 350,
            width: 400,
            modal: true,
            buttons: {
                "确定": function () {
                    $(this).dialog("close");                 
                },
                "取消": function () {
                    $(this).dialog("close");
                }
            },
            close: function () {
                
            }
        });

        $( "#selclass").click(function() {
          $("#dialog-dept").dialog("open");
        });

        // staff window
        $("#dialog-staff").dialog({
          autoOpen: false,
          height: 390,
          width: 450,
          modal: true,
          buttons: {
            "确定": function () {
              $(this).dialog("close");
            },
            "取消": function () {
              $(this).dialog("close");
            }
          },
          close: function () {

          }
        });

        $("#staff_btn").click(function () {
          $("#dialog-staff").dialog("open");
        });
      });

  function CloseFrame() {
    $("#dialog-dept").dialog("close");
  }
  function ReturnValue(v, t) {
    $('#tbStaffs').val(t);
    $('#tbStaffId').val(v);
    $("#dialog-staff").dialog("close");
  }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div id="dialog-dept" title="选择部门" style="display:none;">
	    <iframe src="GetTree.aspx" width="100%" height="350" frameborder="0" scrolling="auto"></iframe>	
    </div>
    <div id="dialog-staff" title="选择员工">
	    <iframe src="../Staff/Staff_Select.aspx" width="100%" height="350" frameborder="0" scrolling="auto"></iframe>	
    </div>
    <table style="width:100%;" border="0" cellpadding="0" cellspacing="1" 
      class="border">
      <tr class="suphead">
        <td colspan="2"><asp:Label ID="lbTitle" runat="server"></asp:Label>
        </td>
    </tr>
    <tr>
      <td class="fields_text">
          名称：</td>
      <td class="fields_input">
        <asp:TextBox ID="tbTitle" runat="server"></asp:TextBox>
          <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
          ControlToValidate="tbTitle" ErrorMessage="名称不能为空" SetFocusOnError="True"></asp:RequiredFieldValidator>
          </td>
    </tr>
    <tr>
      <td class="fields_text">
          上级：</td>
      <td class="fields_input">
        <asp:TextBox ID="CategoryId" runat="server" CssClass="hidden"></asp:TextBox>
          <asp:TextBox ID="CategoryTitle" runat="server" ReadOnly="True"></asp:TextBox>
          &nbsp;<input id="selclass" name="selclass" type="button" value="请选择" class="selclass" />
      </td>
    </tr>
    <tr>
      <td class="fields_text">
          电话：</td>
      <td class="fields_input">
        <asp:TextBox ID="tbTel" runat="server" CssClass="input_middle"></asp:TextBox>
          </td>
    </tr>
    <tr>
      <td class="fields_text">
          负责人：</td>
      <td class="fields_input">
          <asp:TextBox ID="tbStaffs" runat="server" CssClass="input_middle"></asp:TextBox>
          <asp:TextBox ID="tbStaffId" runat="server" CssClass="hidden"></asp:TextBox>
          <input id="staff_btn" name="staff_btn" type="button" value="请选择" class="selclass" />
      </td>
    </tr>
    <tr>
      <td class="fields_text">
          传真：</td>
      <td class="fields_input">
        <asp:TextBox ID="tbFax" runat="server" CssClass="input_middle"></asp:TextBox>
          </td>
    </tr>
    <tr>
      <td class="fields_text">
          邮编：</td>
      <td class="fields_input">
        <asp:TextBox ID="tbPostCode" runat="server">0</asp:TextBox>
          </td>
    </tr>
    <tr>
      <td class="fields_text">
          地区：</td>
      <td class="fields_input">
          <asp:TextBox ID="tbProvince" runat="server"></asp:TextBox>
          省<asp:TextBox ID="tbCity" runat="server"></asp:TextBox>
          市<asp:TextBox ID="tbDistrict" runat="server"></asp:TextBox>
          区</td>
    </tr>
    <tr>
      <td class="fields_text">
          地址：</td>
      <td class="fields_input">
          <asp:TextBox ID="tbAddress" runat="server"></asp:TextBox>
          </td>
    </tr>
    <tr>
      <td colspan="2" align="center">
        <asp:Button ID="Button1" runat="server" Text="确定" onclick="Button1_Click" />
        <input id="Button2" type="reset" value="取 消" onclick="javascript:history.back();" /></td>
    </tr>
  </table>
    </form>
</body>
</html>
