Beispiel #1
0
    protected void ImgSrs_Click(object sender, EventArgs e)
    {
        int money = StringDelHTML.PriceToIntUp(price.Text.Trim());
        //插入全球分红,每日
        DateTime dt = System.DateTime.Now;

        if (dt.Hour > 10)//每天10点以后的数据
        {
            DataTable table = tj.GetUserByLevel(_level);
            if (table.Rows.Count > 0)
            {
                if (tj.InsertFenHongLastDay(table, _level, money, true))
                {
                    ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('分红成功')</script>");
                }
                else
                {
                    ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('您已提交过昨日的分红')</script>");
                }
            }
            else
            {
                ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('无可分红对象')</script>");
            }
        }
        else
        {
            ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('每日10点后才能提交分红')</script>");
        }
    }