sellman.aspx
上传用户:jdb8708888
上传日期:2013-05-29
资源大小:19971k
文件大小:7k
源码类别:

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="sellman.aspx.cs" AutoEventWireup="false" Inherits="UDS.SubModule.CM.Stat.sellman" %>
  6. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
  7. <HTML>
  8. <HEAD>
  9. <title>sellman</title>
  10. <meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
  11. <meta name="CODE_LANGUAGE" Content="C#">
  12. <meta name="vs_defaultClientScript" content="JavaScript">
  13. <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
  14. <LINK href="../../../Css/BasicLayout.css" type="text/css" rel="stylesheet">
  15. <script language="JavaScript" src="../../../Css/meizzDate.js"></script>
  16. <script language="javascript">
  17. function fillstring(str)
  18. {
  19. if(str.length==1)
  20. {
  21. str = "0" + str; 
  22. }
  23. return(str);
  24. }
  25. function quickseldate(type)
  26. {
  27. var begintime,endtime;
  28. var oneminute = 60*1000;
  29. var onehour   = 60*oneminute;
  30. var oneday    = 24*onehour;
  31. var oneweek   = 7*oneday;
  32. var todayDate = new Date();
  33. var date = todayDate.getDate();
  34. var month= todayDate.getMonth() +1;
  35. var year= todayDate.getYear();
  36. var day = todayDate.getDay();
  37. if(navigator.appName == "Netscape")
  38. {
  39. year = 1900 + year;
  40. }
  41. //-->
  42. if(type=="day")
  43. {
  44. begintime = year.toString() + "-" + fillstring(month.toString()) + "-" + fillstring(date.toString());
  45. endtime = begintime;
  46. }
  47. else if(type=="week")
  48. {
  49. var daytoMon = day-1;
  50. if(day==0) 
  51. daytoMon = 6;
  52. todayDate.setTime(todayDate.getTime()-daytoMon*oneday);
  53. date = todayDate.getDate();
  54. month= todayDate.getMonth() +1;
  55. year= todayDate.getYear();
  56. day = todayDate.getDay();
  57. begintime = year.toString() + "-" + fillstring(month.toString()) + "-" + fillstring(date.toString());
  58. todayDate.setTime(todayDate.getTime()+6*oneday);
  59. date = todayDate.getDate();
  60. month= todayDate.getMonth() +1;
  61. year= todayDate.getYear();
  62. endtime = year.toString() + "-" + fillstring(month.toString()) + "-" + fillstring(date.toString());
  63. }
  64. else if(type=="month")
  65. {
  66. var dateto1 = date-1;
  67. todayDate.setTime(todayDate.getTime()-dateto1*oneday);
  68. date = todayDate.getDate();
  69. month= todayDate.getMonth() +1;
  70. year= todayDate.getYear();
  71. day = todayDate.getDay();
  72. begintime = year.toString() + "-" + fillstring(month.toString()) + "-" + fillstring(date.toString());
  73. todayDate.setMonth(month);
  74. todayDate.setTime(todayDate.getTime()-oneday);
  75. date = todayDate.getDate();
  76. month= todayDate.getMonth() +1;
  77. year= todayDate.getYear();
  78. endtime = year.toString() + "-" + fillstring(month.toString()) + "-" + fillstring(date.toString());
  79. }
  80. document.getElementById("tbx_begintime").value = begintime;
  81. document.getElementById("tbx_endtime").value = endtime;
  82. }
  83. </script>
  84. </HEAD>
  85. <body MS_POSITIONING="GridLayout">
  86. <form id="sellman" method="post" runat="server">
  87. <FONT face="宋体">
  88. <TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="1">
  89. <TR>
  90. <TD>开始时间
  91. <asp:TextBox id="tbx_begintime" onfocus="setday(this);" runat="server" ReadOnly="True"></asp:TextBox>
  92. <asp:RequiredFieldValidator id="RequiredFieldValidator1" runat="server" ErrorMessage="*" Display="Dynamic" ControlToValidate="tbx_begintime"></asp:RequiredFieldValidator>结束时间
  93. <asp:TextBox id="tbx_endtime" onfocus="setday(this);" runat="server" ReadOnly="True"></asp:TextBox>
  94. <asp:RequiredFieldValidator id="RequiredFieldValidator2" runat="server" ErrorMessage="*" ControlToValidate="tbx_endtime"></asp:RequiredFieldValidator>
  95. <asp:RadioButton id="rbtn_thisweek" onclick="quickseldate('week');" runat="server" GroupName="quickselect" Text="本周"></asp:RadioButton>
  96. <asp:RadioButton id="rbtn_thismonth" onclick="quickseldate('month');" runat="server" GroupName="quickselect" Text="本月"></asp:RadioButton>
  97. <asp:Button id="btn_OK" runat="server" Text="确定"></asp:Button></TD>
  98. </TR>
  99. <TR>
  100. <TD>
  101. <asp:DataGrid id="dgrd_sellman" runat="server" AutoGenerateColumns="False" AllowPaging="True" Width="100%">
  102. <Columns>
  103. <asp:TemplateColumn HeaderText="销售人员姓名">
  104. <ItemTemplate>
  105. <%# ((DataRowView)Container.DataItem).Row.GetChildRows("staffid_realname")[0]["realname"].ToString()%>
  106. </ItemTemplate>
  107. </asp:TemplateColumn>
  108. <asp:TemplateColumn HeaderText="接触次数">
  109. <ItemTemplate>
  110. <a href='<%# "sellmancontact.aspx?SellmanID=" + ((DataRowView)Container.DataItem)["sellmanid"].ToString() + "&Begintime=" + begintime.ToShortDateString() + "&Endtime=" + endtime.ToShortDateString() + "&type=all"%>' target=_blank>
  111. <%# ((DataRowView)Container.DataItem).Row.GetChildRows("sellman_contact").Length%>
  112. </a>
  113. </ItemTemplate>
  114. </asp:TemplateColumn>
  115. <asp:TemplateColumn HeaderText="拜访次数">
  116. <ItemTemplate>
  117. <a href='<%# "sellmancontact.aspx?SellmanID=" + ((DataRowView)Container.DataItem)["sellmanid"].ToString() + "&Begintime=" + begintime.ToShortDateString() + "&Endtime=" + endtime.ToShortDateString() + "&type=callin"%>' target=_blank>
  118. <%# ((DataRowView)Container.DataItem).Row.GetChildRows("sellman_callincontact").Length%>
  119. </a>
  120. </ItemTemplate>
  121. </asp:TemplateColumn>
  122. <asp:TemplateColumn HeaderText="新发现客户">
  123. <ItemTemplate>
  124. <a href='<%# "sellmanclient.aspx?SellmanID=" + ((DataRowView)Container.DataItem)["sellmanid"].ToString() + "&Begintime=" + begintime.ToShortDateString() + "&Endtime=" + endtime.ToShortDateString() + "&type=all"%>' target=_blank >
  125. <%# ((DataRowView)Container.DataItem).Row.GetChildRows("sellman_newclient").Length%>
  126. </a>
  127. </ItemTemplate>
  128. </asp:TemplateColumn>
  129. <asp:TemplateColumn HeaderText="新增3星以上客户">
  130. <ItemTemplate>
  131. <a href='<%# "sellmanclient.aspx?SellmanID=" + ((DataRowView)Container.DataItem)["sellmanid"].ToString() + "&Begintime=" + begintime.ToShortDateString() + "&Endtime=" + endtime.ToShortDateString() + "&type=3stars"%>' target=_blank>
  132. <%# ((DataRowView)Container.DataItem).Row.GetChildRows("sellman_new3client").Length%>
  133. </a>
  134. </ItemTemplate>
  135. </asp:TemplateColumn>
  136. <asp:TemplateColumn HeaderText="发生费用">
  137. <ItemTemplate>
  138. <a href='<%# "sellmanfee.aspx?SellmanID=" + ((DataRowView)Container.DataItem)["sellmanid"].ToString() + "&Begintime=" + begintime.ToShortDateString() + "&Endtime=" + endtime.ToShortDateString() %>' target=_blank>
  139. <%# ((DataRowView)Container.DataItem)["Fee"].ToString()%>
  140. </a>
  141. </ItemTemplate>
  142. </asp:TemplateColumn>
  143. </Columns>
  144. <PagerStyle HorizontalAlign="Right" Mode="NumericPages"></PagerStyle>
  145. </asp:DataGrid></TD>
  146. </TR>
  147. </TABLE>
  148. </FONT>
  149. </form>
  150. </body>
  151. </HTML>