<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Role_Edit.aspx.cs" Inherits="TotCms.Web.Office.Role.Role_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");
        $("#dialog-win").dialog({
          autoOpen: false,
          height: 350,
          width: 450,
          modal: true,
          buttons: {
            "关闭窗口": function () {
              $(this).dialog("close");
            }
          },
          close: function () {

          }
        });

        $("#selclass").click(function () {
          $("#dialog-win").dialog("open");
        });
      });
      function CloseFrame() {
        $("#dialog-win").dialog("close");
      }
      function ReturnValue(v, t) {
        $('#tbStaffs').val(t);
        $('#tbStaffId').val(v);
        CloseFrame();
      }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div id="dialog-win" title="选择员工">
	    <iframe src="../Staff/Staff_Select.aspx" width="420" 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">修改角色</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">
      &nbsp;<asp:TextBox ID="tbStaffs" runat="server" CssClass="input_middle"></asp:TextBox>
          <asp:TextBox ID="tbStaffId" runat="server" CssClass="hidden"></asp:TextBox>
          <input id="selclass" name="selclass" type="button" value="请选择" class="selclass" />&nbsp;<asp:ListView ID="lvList" runat="server" ItemPlaceholderID="items"
        onitemdeleting="lvList_ItemDeleting" 
        onitemcommand="lvList_ItemCommand" 
        onitemcanceling="lvList_ItemCanceling" 
        DataKeyNames="id">
        <LayoutTemplate>
          <table cellpadding="0" cellspacing="1" border="0" width="100%" class="border">            
          <tr class="suphead">
              <td>姓名</td>              
              <td>操作</td>
          </tr>
          <asp:PlaceHolder runat="server" ID="items"></asp:PlaceHolder>
          </table>
        </LayoutTemplate>
        <AlternatingItemTemplate>
          <tr class="alterlines">
          <td><%# Eval("UserName")%></td>          
          <td>
              <asp:Button ID="DeleteButton" runat="server" CommandName="Delete" 
                  Text="删除" OnClientClick="return confirm('确定删除吗?')" />
          </td>
          </tr>
        </AlternatingItemTemplate>
        <EmptyDataTemplate>
            暂时没有数据.
        </EmptyDataTemplate>

        <ItemTemplate>
            <tr class="lines">
            <td><%# Eval("UserName")%></td>            
            <td>
                    <asp:Button ID="DeleteButton" runat="server" CommandName="Delete" 
                        Text="删除" OnClientClick="return confirm('确定删除吗?')" />
            </td>
            </tr>
        </ItemTemplate>
        
    </asp:ListView>
   </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="location.href='Manage.aspx';" /></td>
    </tr>
  </table>
    </form>
</body>
</html>
