Files
g.hnyhua.cn/Mtxfw.shop/js.aspx.cs
2026-02-07 15:48:27 +08:00

129 lines
4.9 KiB
C#

using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Mtxfw.VipSite
{
public partial class js : System.Web.UI.Page
{
Utility.Config config=new Utility.Config();
protected void Page_Load(object sender, EventArgs e)
{
DateTime dt = DateTime.Now;
DayOfWeek day = dt.DayOfWeek;
string dayString = day.ToString();
if (dt.Hour >= 23 && dt.Minute >= 30)
{
int Countr = 0;
try
{
Countr = new Mtxfw.DAL.user_jjfp().GetCount("TType=1 And DateDiff(day,addtime,getdate())=0");
if (Countr == 0)
{
string sids = "";
Mtxfw.DAL.MemberStatistics.UpdteData(sids, config);
Mtxfw.DAL.MemberStatistics.Statistics(sids, 0, config);
}
}
catch (Exception ex)
{
Model.User_Errlog mo = new Model.User_Errlog();
mo.DLID = 0;
mo.ErrType = "服务奖结算";
mo.addtime = DateTime.Now;
mo.ErrBody = ex.ToString();
mo.ErrBody2 = ex.Message;
new DAL.User_Errlog().Add(mo);
}
try
{
Countr = new Mtxfw.DAL.user_Results_jl3().GetCount("utype='5' And DateDiff(day,addtime,getdate())=0");
if (Countr == 0)
{
Mtxfw.DAL.MemberStatistics.JiangLiJS(1);
Mtxfw.DAL.MemberStatistics.ChouJiangJS();
Model.user_Results_jl3 mjl3 = new Model.user_Results_jl3();
mjl3.addtime = DateTime.Now;
mjl3.utype = "5";
new DAL.user_Results_jl3().Add(mjl3);
}
}
catch (Exception ex)
{
Model.User_Errlog mo = new Model.User_Errlog();
mo.DLID = 0;
mo.ErrType = "商城结算";
mo.addtime = DateTime.Now;
mo.ErrBody = ex.ToString();
mo.ErrBody2 = ex.Message;
new DAL.User_Errlog().Add(mo);
}
}
bool b = true;
if (config.webJSType == "week")
{
if (dayString != "Saturday")
{
b = false;
}
}
if (b)
{
if (dt.Hour >= 23 && dt.Minute >= 30)
{
int Countr = new Mtxfw.DAL.user_jjfp().GetCount("TType=2 And DateDiff(" + config.webJSType + ",addtime,getdate())=0");
if (Countr == 0)
{
try
{
Mtxfw.DAL.MemberStatistics.FHJStatistics(config);
}
catch (Exception ex)
{
Model.User_Errlog mo = new Model.User_Errlog();
mo.DLID = 0;
mo.ErrType = "消费福利结算";
mo.addtime = DateTime.Now;
mo.ErrBody = ex.ToString();
mo.ErrBody2 = ex.Message;
new DAL.User_Errlog().Add(mo);
}
}
Countr = new Mtxfw.DAL.user_jjfp().GetCount("TType=3 And DateDiff(" + config.webJSType + ",addtime,getdate())=0");
if (Countr == 0)
{
try
{
Mtxfw.DAL.MemberStatistics.JJJStatistics(config);
}
catch (Exception ex)
{
Model.User_Errlog mo = new Model.User_Errlog();
mo.DLID = 0;
mo.ErrType = "董事分红结算";
mo.addtime = DateTime.Now;
mo.ErrBody = ex.ToString();
mo.ErrBody2 = ex.Message;
new DAL.User_Errlog().Add(mo);
}
}
if (dt.Minute >= 30)
{
Countr = new Mtxfw.DAL.user_jjfp().GetCount("TType=4 And DateDiff(" + config.webJSType + ",addtime,getdate())=0");
if (Countr == 0)
{
Mtxfw.DAL.MemberStatistics.Statistics();
}
}
}
}
}
}
}