127 lines
5.9 KiB
C#
127 lines
5.9 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using System.Data;
|
|
using System.Data.SqlClient;
|
|
namespace Mtxfw.VipSite
|
|
{
|
|
public partial class Admin_Member_Networkmap1 : Mtxfw.Utility.MemberBase
|
|
{
|
|
public Mtxfw.Utility.Config config = new Mtxfw.Utility.Config("");
|
|
public Mtxfw.DAL.user_info daoUser = new Mtxfw.DAL.user_info();
|
|
protected string strID = "0", SJ = "", SJ2 = "", sUserName = "", sycUserName="", SuperiorsIDS = "", strFrist = "", strUrl = "";
|
|
public int gtype = 0, InitID = 68;
|
|
protected override void OnLoad(EventArgs e)
|
|
{
|
|
base.OnLoad(e);
|
|
string hostname = Request.Url.Host;
|
|
|
|
if (gtype == 1)
|
|
{
|
|
InitID = 69;
|
|
}
|
|
else if (gtype == 2)
|
|
{
|
|
InitID = 70;
|
|
}
|
|
else if (gtype == 3)
|
|
{
|
|
InitID = 71;
|
|
}
|
|
else if (gtype == 4)
|
|
{
|
|
InitID = 72;
|
|
}
|
|
else if (gtype == 5)
|
|
{
|
|
InitID = 73;
|
|
}
|
|
try
|
|
{
|
|
if (Session["IFPassword"] == null)
|
|
{
|
|
Response.Redirect("/Member_IFPassword.aspx?Url=/Admin_Member_Networkmap1.aspx");
|
|
}
|
|
if (IFStores != 1)
|
|
{
|
|
Mtxfw.Utility.Tools.Message("您没有权限!", "/gl.aspx");
|
|
}
|
|
if (!String.IsNullOrEmpty(Request.QueryString["SJ"]))
|
|
{
|
|
SJ = Request.QueryString["SJ"].ToString();
|
|
}
|
|
if (!String.IsNullOrEmpty(Request.QueryString["SJ2"]))
|
|
{
|
|
SJ2 = Request.QueryString["SJ2"].ToString();
|
|
}
|
|
if (!IsPostBack)
|
|
{
|
|
Page.Title = "推荐图谱查询 - " + config.webName;
|
|
strID = InitID.ToString();
|
|
|
|
if (!String.IsNullOrEmpty(Request.QueryString["id"]))
|
|
{
|
|
strID = Request.QueryString["id"].ToString();
|
|
}
|
|
if (!String.IsNullOrEmpty(Request.QueryString["UserName"]))
|
|
{
|
|
SqlDataReader Dr = daoUser.GetUserId(gtype, Request.QueryString["UserName"].ToString());
|
|
if (Dr.Read())
|
|
{
|
|
strID = Dr["Id"].ToString();
|
|
}
|
|
Dr.Close();
|
|
}
|
|
Mtxfw.Model.user_info model = daoUser.GetModel(int.Parse(strID));
|
|
if (model != null)
|
|
{
|
|
if (model.SuperiorsID > 0)
|
|
{
|
|
Mtxfw.Model.user_info model2 = daoUser.GetModel(model.SuperiorsID);
|
|
if (model2 != null)
|
|
{
|
|
sycUserName = model2.UserName;
|
|
}
|
|
}
|
|
sUserName = model.UserName;
|
|
SuperiorsIDS = model.SuperiorsIDS;
|
|
|
|
string strtime = new Mtxfw.DAL.user_Results_jl2().Getzd("min(addtime)", "utype=8 and utype2=0 and IFDelete=0 And MemberId=" + model.Id + "").ToString();
|
|
string struLevel = Mtxfw.Utility.Common.GetuLevelname(model.uLevel);
|
|
//struLevel += " " + Mtxfw.Utility.Common.GetuLevel4name(model.uLevel4);
|
|
string ListType = "<img src='images/tree/SortEnd_Folder_Open.gif' align=\"left\">";
|
|
int ccount = model.tjcount;
|
|
int acount = model.temcount;
|
|
int jdcount = daoUser.GetCount("SuperiorsID=" + model.Id + " and userstate='正常'");
|
|
if (jdcount > 0)
|
|
{
|
|
ListType = "<img src='images/tree/SortEnd_Folder_Open.gif' border=0 align=\"left\" style=\"cursor:pointer;\" title='点击展开' alt='点击展开' id='img" + model.Id + "' onclick=\"EndSortChange('" + model.Id + "|0','divTable');\">";
|
|
}
|
|
Double zyj = model.umoney18;
|
|
if (SJ != "" && SJ2 != "")
|
|
{
|
|
string strzd = new Mtxfw.DAL.user_Results_jl2().Getzd("sum(Addmoney)", "utype=8 and utype2=0 and IFDelete=0 and (addtime between '" + SJ + " 00:00:00' and '" + SJ2 + " 23:59:59') And MemberId in(select b.id from user_info b where b.IFStores=0 And b.userstate='正常' and b.uLevel14=1 and b.ContactIDS like '%," + model.Id + ",%')").ToString();
|
|
if (strzd != "")
|
|
{
|
|
zyj = Convert.ToDouble(strzd);
|
|
}
|
|
}
|
|
string UserName = model.UserName;
|
|
if (model.uLevel8 == 1)
|
|
{
|
|
UserName = "<font color='#ff0000'>" + model.UserName + "</span>";
|
|
}
|
|
strFrist = "<tr id=\"tr" + model.Id + "|0\" onmouseover=\"this.bgColor='#fdff7e'\" onmouseout='this.bgColor=\"#ffffff\"'><td class='lefttd'>" + ListType + UserName + "</td><td>" + model.RealName + "</td><td>" + struLevel + "</td><td>第0代</td><td>" + ccount + "</td><td>" + acount + "</td><td>" + zyj.ToString() + "</td><td>" + model.RegTime + "</td></tr> ";//<td>" + acount + "</td>
|
|
}
|
|
}
|
|
|
|
}
|
|
catch (Exception err)
|
|
{
|
|
Mtxfw.Utility.Common.WriteHtml("/weixin/Admin_Member_Networkmap2err.txt", err.ToString());
|
|
}
|
|
}
|
|
}
|
|
} |