<%@ page language="C#" autoeventwireup="true" inherits="general_MyOffice_CantactList, CrmCommand" %>
<%@ Register TagPrefix="C1WebGrid" Namespace="C1.Web.C1WebGrid" Assembly="C1.Web.C1WebGrid.2" %>


<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
    <script src="../../Javascript/CheckALL.js" type="text/javascript"></script>
    <script language=javascript type="text/javascript">
                   function check()
                   {
                      if(!ChkOk('form1','item'))
                      {
                          return false;
                       
                      }
                      else
                      {
                      
                        return confirm('确定删除选择的联系人吗?');
                      }
                   }
                   </script>
</head>
<body class ="bodycolor" leftmargin="0" topmargin="0">
    <form id="form1" runat="server" >
       <CENTER>	<table style="width: 640px" cellspacing="0" cellpadding="0">
	<tr>
		<td>
                    <img align="absMiddle" src="../images/notify_new.gif" width="18" height="18" /><span class="big3"> 新建联系人(<asp:Label
                        ID="Label1" runat="server" Text="默认"></asp:Label>)</span></td>
	</tr>
	<tr>
		<td align="center">
            <asp:Button ID="Button2" runat="server" CssClass="BigButton" OnClick="Button2_Click"
                Text="新建联系人" /></td>
	</tr>
	<tr>
		<td>
                    <img align="absMiddle" src="../images/notify_new.gif" width="18" height="18" /><span class="big3"> 管理联系人(<asp:Label
                        ID="Label2" runat="server" Text="默认"></asp:Label>)</span>
                </td>
	</tr>
	<tr>
		<td align="center">
      <C1WebGrid:C1WebGrid ID="C1WebGrid1" runat="server"  AllowSorting="True"
            AutoGenerateColumns="False" CallbackOptions="Paging, Selection, Sorting"
            DataKeyField="GroupID" AllowColSizing=true HScrollBarStyle=Automatic VScrollBarStyle=Always
            OnSortingCommand="C1WebGrid1_SortingCommand" SkinID="gridviewSkin"  width="640px"  Height=450px OnItemCommand="C1WebGrid1_ItemCommand"  >
            <Columns>
             <C1WebGrid:C1TemplateColumn ><HeaderTemplate>
                    <input id="all" type="checkbox"  value="全选" onclick="CheckAll('form1','item','all')" /></HeaderTemplate> <ItemTemplate > <input id="item" type="checkbox" runat=server value='<%#Eval("AddressBookID") %>'  /><ItemStyle width=20px HorizontalAlign="Center" Wrap="True" /></ItemTemplate></C1WebGrid:C1TemplateColumn>  
                <C1WebGrid:C1BoundColumn DataField="Name" HeaderText="姓名"  Fixed=true SortExpression="Name">
                    <ItemStyle  Width="50px" />
                   
                </C1WebGrid:C1BoundColumn>
               
                 <C1WebGrid:C1TemplateColumn HeaderText="性别"><ItemTemplate><%#Eval("Sex").ToString()=="1"?"女":"男" %></ItemTemplate>
       
                 </C1WebGrid:C1TemplateColumn>
                  <C1WebGrid:C1BoundColumn DataField="BirthDay" HeaderText="生日" DataFormatString="{0:d}"  SortExpression="BirthDay">
                  <ItemStyle HorizontalAlign="Center" />
                </C1WebGrid:C1BoundColumn>
                <C1WebGrid:C1BoundColumn DataField="Company" HeaderText="公司名称"  SortExpression="Company">
                <ItemStyle HorizontalAlign="Center" Width="250px" />
                </C1WebGrid:C1BoundColumn>
                <C1WebGrid:C1BoundColumn DataField="Email" HeaderText="电子邮件"  SortExpression="Email">
                <ItemStyle HorizontalAlign="Center" />
                </C1WebGrid:C1BoundColumn>
                 <C1WebGrid:C1BoundColumn DataField="MobileTel" HeaderText="联系电话"  SortExpression="MobileTel">
                <ItemStyle HorizontalAlign="Center" />
                </C1WebGrid:C1BoundColumn>
                <C1WebGrid:C1BoundColumn DataField="Address" HeaderText="联系地址"  SortExpression="Address">
                <ItemStyle HorizontalAlign="Center" />
                </C1WebGrid:C1BoundColumn>
              <C1WebGrid:C1TemplateColumn HeaderText="备注">
                <ItemStyle Width="250px" />
                <ItemTemplate>
                    <asp:Label     ID="Lkb" Text='<%# Server.HtmlDecode(Eval

("Remark").ToString()).Length > 20 ? Server.HtmlDecode(Eval

("Remark").ToString()).Substring(0, 19) + "..." : Server.HtmlDecode

(Eval("Remark").ToString())%>'  ToolTip='<%# Server.HtmlDecode(Eval

("Remark").ToString())%>' runat="server"></asp:Label>
 
                </ItemTemplate>
            </C1WebGrid:C1TemplateColumn>
            
                    
            </Columns>
            
        </C1WebGrid:C1WebGrid>
        </td>
	</tr>
	<tr>
		<td align="center"> <input id="Button5" class="BigButton" onclick="CheckOk('form1','item','Contact_Add.aspx','670px','565px')"
                type="button" value="编辑联系人" /><asp:Button ID="Button1" runat="server" CssClass="BigButton" Text="删除联系人" OnClientClick="return check();javascript:return confirm('确认删除吗!');" OnClick="Button1_Click" /></td>
	</tr>
</table>
</CENTER>
    </form>
</body>
</html>
