Files
g.hnyhua.cn/Mtxfw.shop/_Admin/main.aspx.cs

69 lines
3.0 KiB
C#
Raw Normal View History

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
namespace Mtxfw.shop._admin
{
public partial class main : Mtxfw.Utility.AdminPage
{
public Mtxfw.DAL.queue_window daoQueue = new Mtxfw.DAL.queue_window();
public Mtxfw.DAL.ConvertiblePaper daoConvert = new Mtxfw.DAL.ConvertiblePaper();
public Mtxfw.DAL.user_info daoUser = new Mtxfw.DAL.user_info();
Mtxfw.Utility.Config config = new Mtxfw.Utility.Config();
Mtxfw.DAL.order_info daoorder = new Mtxfw.DAL.order_info();
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
if (!IsPostBack)
{
AdminName.Text = this.IdentityName;
Lit_UCount.Text = GetStyle(daoUser.GetCount("uutype<>'0' And UserState='正常'").ToString());
System.Collections.IDictionaryEnumerator CacheEnum = Cache.GetEnumerator();
System.Text.StringBuilder sb = new System.Text.StringBuilder();
while (CacheEnum.MoveNext())
{
sb.Append(" [" + CacheEnum.Key.ToString() + "] ");
}
Lit_Cache.Text = sb.ToString();
/*if (config.webAddMoney != "")
{
if (Convert.ToDateTime(config.webAddMoney).ToString("yyyy-MM-dd", DateTimeFormatInfo.InvariantInfo) != DateTime.Now.ToString("yyyy-MM-dd", DateTimeFormatInfo.InvariantInfo))
{
DateTime dt = DateTime.Now.AddDays(15);
DataSet ds = daoorder.GetList("", "O_Payed='1' And O_received='0' And O_Return='0' And O_Returned = '0' And O_Returned = '0' And (Convert(Varchar(120),O_Payed_Date)<Convert(Varchar(120),CAST('" + dt + "' AS DATETIME))) Order By O_Payed_Date Desc");
if (ds.Tables[0].Rows.Count > 0)
{
foreach (DataRow drv in ds.Tables[0].Rows)
{
Mtxfw.DAL.MemberStatistics.JiangLiFP(drv["orderid"].ToString(), drv["pid"].ToString(), Convert.ToInt32(drv["UserID"].ToString()), Convert.ToDouble(drv["Totalprice"].ToString()));
}
}
ds.Clear();
}
}*/
}
Btn_Delete.Click += delegate(object s, EventArgs ex)
{
System.Collections.IDictionaryEnumerator CacheEnum = Cache.GetEnumerator();
while (CacheEnum.MoveNext())
{
Cache.Remove(CacheEnum.Key.ToString());
}
Response.Redirect(Request.Url.AbsolutePath);
};
}
protected string GetStyle(string value)
{
return "<span class='show'>" + value + "</span>";
}
}
}