ClientListView.aspx
上传用户:xuming1973
上传日期:2014-02-27
资源大小:17511k
文件大小:9k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

C#

  1. <%@ Import namespace="UDS.Components"  %>
  2. <%@ Import namespace="System.Data.SqlClient"  %>
  3. <%@ Import namespace="System.Data"  %>
  4. <%@ Import namespace="System"%>
  5. <%@ Page language="c#" Codebehind="ClientListView.aspx.cs" AutoEventWireup="false" Inherits="UDS.SubModule.CM.ClientListView" %>
  6. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
  7. <HTML>
  8. <HEAD>
  9. <title>客户列表</title>
  10. <meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
  11. <meta content="C#" name="CODE_LANGUAGE">
  12. <meta content="JavaScript" name="vs_defaultClientScript">
  13. <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
  14. <LINK href="../../Css/BasicLayout.css" type="text/css" rel="stylesheet">
  15. <script runat="server" id="Script1">
  16. private string GetUpdateTime(DataRow[] row)
  17. {
  18. if(row.Length!=0)
  19. {
  20. return(row[0]["UpdateTime"].ToString());
  21. }
  22. else
  23. return ("");
  24. }
  25. private string GetCurStatus(string curstatus)
  26. {
  27. switch(curstatus.Split(',')[0])
  28. {
  29. case "trace":
  30. return ("跟踪");
  31. break;
  32. case "boot":
  33. return ("启动");
  34. break;
  35. case "commend":
  36. return ("产品推荐");
  37. break;
  38. case "requirement":
  39. return ("需求定义");
  40. break;
  41. case "submit":
  42. return ("方案提交");
  43. break;
  44. case "negotiate":
  45. return ("商务谈判");
  46. break;
  47. case "actualize":
  48. return ("项目实施");
  49. break;
  50. case "traceservice":
  51. return ("跟踪服务");
  52. break;
  53. case "last":
  54. return ("收尾款");
  55. break;
  56. }
  57. return("");
  58. }
  59. private string GetAddMan(DataRow[] row)
  60. {
  61. if(row.Length!=0)
  62. {
  63. return(row[0]["Realname"].ToString());
  64. }
  65. else
  66. return ("");
  67. }
  68. private string GetLinkmanTel(DataRow[] row)
  69. {
  70. if(row.Length!=0)
  71. {
  72. return(row[0]["Mobile"].ToString());
  73. }
  74. else
  75. return ("");
  76. }
  77. private string GetClientNameUrl(string clientid)
  78. {
  79. if(ViewState["NowTab"].ToString()=="client")
  80. {
  81. return("Client.aspx?ClientID="+clientid);
  82. }
  83. else
  84. {
  85. return("#");
  86. }
  87. }
  88. private string GetContactUrl(string clientid)
  89. {
  90. if((ViewState["NowTab"].ToString()=="client") && (Session["cm_permission"]=="administrator"))
  91. {
  92. return("ClientContact_thisWeek.aspx?ClientID="+clientid);
  93. }
  94. else
  95. {
  96. return("ClientHistoryContact.aspx?ClientID="+clientid);
  97. }
  98. }
  99. </script>
  100. <script>
  101. function selectAll()
  102. {
  103. var len=document.ClientListView.elements.length;
  104. var i;
  105.     for (i=0;i<len;i++){
  106. if (document.ClientListView.elements[i].type=="checkbox"){
  107.         document.ClientListView.elements[i].checked=!document.ClientListView.elements[i].checked;
  108.  }
  109. }
  110. }
  111. </script>
  112. </HEAD>
  113. <body leftMargin="0" topMargin="0">
  114. <form id="ClientListView" method="post" runat="server">
  115. <FONT face="宋体">
  116. <TABLE class="gbtext" id="Table1" cellSpacing="0" cellPadding="0" width="100%" border="0">
  117. <tr>
  118. <td vAlign="top" height="38">
  119. <TABLE borderColor="#111111" height="1" cellSpacing="0" cellPadding="0" width="100%" border="0"
  120. id="Table2">
  121. <TR height="30">
  122. <TD class="GbText" align="right" width="20" background="../../Images/treetopbg.jpg"
  123. bgColor="#c0d9e6"><FONT color="#003366" size="3"><IMG height="16" src="../../DataImages/ClientManage.gif" width="16"></FONT></TD>
  124. <TD class="GbText" align="right" width="60" background="../../Images/treetopbg.jpg"
  125. bgColor="#e8f4ff"><font color="#006699">我的客户</A></font></TD>
  126. <TD class="GbText" style="WIDTH: 146px; HEIGHT: 20px" align="right" background="../../Images/treetopbg.jpg"
  127. bgColor="#e8f4ff"><font color="#006699">查看视角</A>
  128. <asp:dropdownlist id="ddl_MySubordinate" runat="server" AutoPostBack="True"></asp:dropdownlist>&nbsp;</font></TD>
  129. <TD class="GbText" align="right" background="../../Images/treetopbg.jpg" bgColor="#e8f4ff"><FONT face="宋体"><asp:panel id="pnl" runat="server" Height="8px" Width="499px" Visible="true"><INPUT class="redbuttoncss" id="Button2" onclick="window.open('Stat/Contact_Client.aspx','_blank')"
  130. type="button" value=" 汇 总" name="Button1">&nbsp;<INPUT class="redbuttoncss" id="Button1" onclick="window.open('Search/ClientInfo.aspx','_blank')"
  131. type="button" value=" 查 询" name="Button1">&nbsp;<INPUT class="redbuttoncss" onclick="selectAll()" type="button" value="全 选"> 
  132. <asp:Button id="btn_Del" runat="server" CssClass="redbuttoncss" Text="删 除"></asp:Button>
  133. <asp:Button id="btn_AddClient" runat="server" CssClass="redbuttoncss" Text="添加客户"></asp:Button>
  134. <asp:Button id="btn_AddLinkman" runat="server" CssClass="redbuttoncss" Text="添加联络人"></asp:Button>
  135. <asp:Button id="btn_AddContact" runat="server" CssClass="redbuttoncss" Text="添加接触"></asp:Button></asp:panel></FONT></TD>
  136. </TR>
  137. </TABLE>
  138. </td>
  139. </tr>
  140. <TR>
  141. <TD>
  142. <TABLE class="gbtext" id="Table3" cellSpacing="0" cellPadding="0" width="100%" border="0">
  143. <TR>
  144. <TD id="TD1" vAlign="middle" align="center" width="90" background="../../images/maillistbutton2.gif"
  145. runat="server">&nbsp;<asp:linkbutton id="lbtn_MyClient" runat="server" CssClass="Newbutton">我的客户</asp:linkbutton><A href="ClientListView.aspx"></A></TD>
  146. <TD id="TD2" vAlign="middle" align="center" width="90" background="../../images/maillistbutton1.gif"
  147. runat="server">&nbsp;<asp:linkbutton id="lbtn_coClient" runat="server" CssClass="Newbutton">我的协同客户</asp:linkbutton></TD>
  148. <TD style="HEIGHT: 25px" align="right">&nbsp;</TD>
  149. <td style="HEIGHT: 25px" align="right"><asp:panel id="pnl_ClientInfo" runat="server">&nbsp;共 
  150.             <asp:Literal id="ltl_ClientCount" runat="server"></asp:Literal>位客户, 
  151.             一个月内共接触 
  152. <asp:Literal id="ltl_ContactTimes" runat="server"></asp:Literal>次 
  153. </asp:panel></td>
  154. </TR>
  155. </TABLE>
  156. </TD>
  157. </TR>
  158. <TR>
  159. <TD><asp:datagrid id="dgd_Client" runat="server" Width="100%" AutoGenerateColumns="False" AllowSorting="True"
  160. AllowPaging="True" BorderColor="#93BEE2" BorderWidth="1px" CellPadding="3" PageSize="15" DataKeyField="ID">
  161. <AlternatingItemStyle BackColor="#E8F4FF"></AlternatingItemStyle>
  162. <ItemStyle Font-Size="X-Small"></ItemStyle>
  163. <HeaderStyle ForeColor="White" BackColor="#337FB2"></HeaderStyle>
  164. <Columns>
  165. <asp:TemplateColumn>
  166. <HeaderStyle Width="20px"></HeaderStyle>
  167. <ItemStyle HorizontalAlign="Right"></ItemStyle>
  168. <ItemTemplate>
  169. <asp:CheckBox Runat="server" ID="cbx1"></asp:CheckBox>
  170. </ItemTemplate>
  171. </asp:TemplateColumn>
  172. <asp:BoundColumn Visible="False" DataField="ID" SortExpression="ID" HeaderText="编号"></asp:BoundColumn>
  173. <asp:TemplateColumn SortExpression="Name" HeaderText="客户名称">
  174. <ItemTemplate>
  175. <asp:HyperLink ID="hlk_ClientName" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Name") %>' NavigateUrl='<%# GetClientNameUrl(DataBinder.Eval(Container,"DataItem.ID").ToString())%>' Target=_blank>
  176. </asp:HyperLink>
  177. </ItemTemplate>
  178. </asp:TemplateColumn>
  179. <asp:BoundColumn DataField="Linkman" SortExpression="Linkman" HeaderText="联系人">
  180. <ItemStyle Font-Size="X-Small"></ItemStyle>
  181. </asp:BoundColumn>
  182. <asp:TemplateColumn HeaderText="电话">
  183. <HeaderStyle Font-Size="X-Small"></HeaderStyle>
  184. <ItemStyle Font-Size="X-Small"></ItemStyle>
  185. <ItemTemplate>
  186. <asp:Label runat="server" Text='<%# GetLinkmanTel(((DataRowView)Container.DataItem).Row.GetChildRows("ClientLinkmanID_Linkman")) %>'>
  187. </asp:Label>
  188. </ItemTemplate>
  189. </asp:TemplateColumn>
  190. <asp:BoundColumn DataField="updatetime1" SortExpression="updatetime1" HeaderText="更新时间"></asp:BoundColumn>
  191. <asp:TemplateColumn HeaderText="目前状态">
  192. <HeaderStyle Font-Size="X-Small"></HeaderStyle>
  193. <ItemStyle Font-Size="X-Small"></ItemStyle>
  194. <ItemTemplate>
  195. <asp:HyperLink id=HyperLink1 runat="server" Text='<%# GetCurStatus(DataBinder.Eval(Container,"DataItem.Curstatus").ToString()) %>' Target="_blank" NavigateUrl='<%# GetContactUrl(DataBinder.Eval(Container,"DataItem.ID").ToString())%>'>
  196. </asp:HyperLink>
  197. </ItemTemplate>
  198. </asp:TemplateColumn>
  199. <asp:TemplateColumn SortExpression="AddManID" HeaderText="添加人">
  200. <HeaderStyle HorizontalAlign="Right"></HeaderStyle>
  201. <ItemStyle Font-Size="X-Small" HorizontalAlign="Right"></ItemStyle>
  202. <ItemTemplate>
  203. <asp:Label runat="server" Text='<%# GetAddMan(((DataRowView)Container.DataItem).Row.GetChildRows("ClientAddMan_Staff")) %>' ID="Label1">
  204. </asp:Label>
  205. </ItemTemplate>
  206. </asp:TemplateColumn>
  207. </Columns>
  208. <PagerStyle NextPageText="上一页" PrevPageText="下一页" HorizontalAlign="Right" BackColor="#E8F4FF"
  209. Mode="NumericPages"></PagerStyle>
  210. </asp:datagrid></TD>
  211. </TR>
  212. </TABLE>
  213. </FONT>
  214. </form>
  215. </body>
  216. </HTML>