<%@ page language="C#" autoeventwireup="true" inherits="general_ClientManage_ClientContactList, CrmCommand" %>

<%@ Register TagPrefix="C1WebGrid" Namespace="C1.Web.C1WebGrid" Assembly="C1.Web.C1WebGrid.2" %>


<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head" runat="server">
   <script src="../../Javascript/CheckALL.js"  language=javascript></script>
   <script>
   function CheckForm(formName,chkName,str,width,heigth)
   {
       if(!CheckOk(formName,chkName,str,width,heigth))
       {
          
          return false;
       }
       else
       {
         return  confirm('确定要删除吗？');
       }
   }
   function OpenWin(str)
   {
      var id=document.getElementById("HidCid").value;
     
      var url=str+"?id="+id;
    
         if(id !="")
         {
          
           var R=  window.showModalDialog(url,"newwindow","dialogWidth=610px;dialogHeight=440px");
           
              if(R == "ok")
              {
                  location.reload();
              }
               
         }
       return false;
   
   }
     function ShowWin(id)
   {
    
     
      var url="TractInfo.aspx?id="+id;
    
         if(id !="")
         {
          
           var R=  window.showModalDialog(url,"newwindow","dialogWidth=600px;dialogHeight=300px");
           
              if(R == "ok")
              {
                  location.href="TractInfo.aspx?id="+id;
              }
             
               
         }
       return false;
   
   }
     function CheckEdit(formName,chkName,str,width,heigth)
   {
       var R= CheckOk(formName,chkName,str,width,heigth)
         if(R == "ok")
              {
                  location.reload();
              }
     
          return false;
      
      
   }
   </script>
    <title>无标题页</title>
</head>
<body>
    <form id="form1" runat="server">
   <div  id="pnlMain">
    	
<table style="width: 100%" cellspacing="0" cellpadding="0">
			<TR>
						<TD class="Big"><IMG height="18" src="../images/notify_new.gif" width="18" align="absMiddle"><SPAN class="big3">
								联系人列表：</SPAN>
						</TD>
					</TR>
		<tr>
		<td><TABLE class="small" cellSpacing="1" cellPadding="2" width="750" align="center" border="0" >
					<TR>
					<td align=center noWrap class="TableData" valign=top  height=300>
				 <c1webgrid:c1webgrid   SkinId="gridviewSkin" Width=700px   ID="C1WebGrid1" 

   runat="server" AutoGenerateColumns="False"  AllowPaging=true  

PageSize=10 OnItemCreated="C1WebGrid1_ItemCreated" OnPageIndexChanging="C1WebGrid1_PageIndexChanging"   >
        <Columns>
         <C1WebGrid:C1TemplateColumn HeaderText="全选"><HeaderTemplate>
                    <input id="all" type="checkbox"  value="全选" onclick="CheckAll

('form1','item','all')" /></HeaderTemplate>  <ItemStyle Width="22px" /> <ItemTemplate > <input id="item" type="checkbox" 

runat="server" value='<%#Eval("Contact_Id") %>'/></ItemTemplate></C1WebGrid:C1TemplateColumn>
  
          
            <C1WebGrid:C1BoundColumn  DataField="Contact_RelName" HeaderText="联系人姓名" /> 
             <C1WebGrid:C1BoundColumn  DataField="Contact_Sex" HeaderText="联系人性别" /> 
             <C1WebGrid:C1BoundColumn  DataField="Contact_Duty" HeaderText="职务" /> 
            <C1WebGrid:C1BoundColumn  DataField="Contact_OfficeTel" HeaderText="办公电话" /> 
            <C1WebGrid:C1BoundColumn  DataField="Contact_Mobile" HeaderText="手机" /> 
            <C1WebGrid:C1BoundColumn  DataField="Contact_Email" HeaderText="E-Mail" />
            
        			</Columns> 
    
        </c1webgrid:c1webgrid>
    </td>
    </TR> 
          </TABLE>
</td>
	</tr>
	<tr>
		<td><TABLE class="small" cellSpacing="0" cellPadding="0" width="100%">
								<TR><td class="TableData" noWrap style="height: 24px" align="center">&nbsp;&nbsp;<input id="Button1" type="button"  class="BigButton" value="新增联系人" onclick="return OpenWin('AddClientContact.aspx')" style="width: 90px" /> &nbsp;&nbsp;<asp:Button ID="Button2" OnClientClick=" return  CheckEdit('form1','item','EditContact.aspx','530px','380px')" class="BigButton" runat="server" Text="编辑联系人"  Width="90px" />&nbsp;&nbsp;<asp:Button ID="BtnCancel" OnClientClick=" return  CheckForm('form1','item','','','')" class="BigButton" runat="server" Text="删除联系人" OnClick="BtnDel_Click" Width="90px" /></td></tr>
    </TABLE></td>
	</tr>
</table>
 
    </div>
      <input id="HidCid" runat=server  type="hidden" />
    </form>
</body>
</html>

