ContactedClient.aspx
上传用户:cha0314
上传日期:2014-03-02
资源大小:12522k
文件大小:4k
源码类别:

C#编程

开发平台:

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="ContactedClient.aspx.cs" AutoEventWireup="false" Inherits="UDS.SubModule.CM.Stat.ContactedClient" %>
  6. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
  7. <HTML>
  8. <HEAD>
  9. <title>ContactedClient</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 language="C#" runat="server">
  16. private string GetLinkMan(DataRow[] row)
  17. {
  18. if(row.Length!=0)
  19. {
  20. return(row[0]["Name"].ToString());
  21. }
  22. else
  23. return ("");
  24. }
  25. private string GetCurStatus(string curstatus)
  26. {
  27. switch(curstatus.Split(',')[0].ToString())
  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. </script>
  69. </HEAD>
  70. <body MS_POSITIONING="GridLayout">
  71. <form id="ContactedClient" method="post" runat="server">
  72. <FONT face="宋体">
  73. <TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="1">
  74. <TR>
  75. <TD>共接触
  76. <asp:Literal id="ltl_Client" runat="server"></asp:Literal>位客户</TD>
  77. </TR>
  78. <TR>
  79. <TD>
  80. <asp:DataGrid id="dgrd_Client" runat="server" AllowPaging="True" AutoGenerateColumns="False" Width="100%"
  81. CellPadding="3" BorderWidth="1px" BorderColor="#93BEE2">
  82. <AlternatingItemStyle BackColor="#E8F4FF"></AlternatingItemStyle>
  83. <ItemStyle Font-Size="X-Small"></ItemStyle>
  84. <HeaderStyle ForeColor="White" BackColor="#337FB2"></HeaderStyle>
  85. <Columns>
  86. <asp:BoundColumn DataField="ID" HeaderText="编号"></asp:BoundColumn>
  87. <asp:TemplateColumn HeaderText="客户名称">
  88. <ItemTemplate>
  89. <asp:HyperLink id=HyperLink1 runat="server" Target="_blank" NavigateUrl='<%# "../Client.aspx?ClientID="+DataBinder.Eval(Container,"DataItem.ID")%>' Text='<%# DataBinder.Eval(Container, "DataItem.Name") %>'>
  90. </asp:HyperLink>
  91. </ItemTemplate>
  92. <EditItemTemplate>
  93. <asp:TextBox id=TextBox1 runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Name") %>'>
  94. </asp:TextBox>
  95. </EditItemTemplate>
  96. </asp:TemplateColumn>
  97. <asp:BoundColumn DataField="ContactTimes" HeaderText="接触次数"></asp:BoundColumn>
  98. <asp:BoundColumn DataField="BargainPrognosis" HeaderText="成交预估"></asp:BoundColumn>
  99. <asp:BoundColumn DataField="UpdateTime" HeaderText="更新时间"></asp:BoundColumn>
  100. <asp:TemplateColumn HeaderText="接触状态">
  101. <ItemTemplate>
  102. <%# GetCurStatus(DataBinder.Eval(Container.DataItem,"CurStatus").ToString()) %>
  103. </ItemTemplate>
  104. </asp:TemplateColumn>
  105. <asp:TemplateColumn HeaderText="添加人">
  106. <ItemTemplate>
  107. <%# GetAddMan(((DataRowView)Container.DataItem).Row.GetChildRows("StaffID_Staff")) %>
  108. </ItemTemplate>
  109. </asp:TemplateColumn>
  110. </Columns>
  111. <PagerStyle HorizontalAlign="Right" Mode="NumericPages"></PagerStyle>
  112. </asp:DataGrid></TD>
  113. </TR>
  114. </TABLE>
  115. </FONT>
  116. </form>
  117. </body>
  118. </HTML>