到期日期.如果日期到期,则在1周前系统应发出警报消息. [英] For Expire Date. If date come to expire then before 1 week system should give Alert message.

查看:54
本文介绍了到期日期.如果日期到期,则在1周前系统应发出警报消息.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有效期.如果日期到期,则系统应在1周前发出警报消息.

For Expire Date. If date come to expire then before 1 week system should give Alert message.

推荐答案

尝试此操作

在login.aspx =>中page_load

try this

in login.aspx => page_load

//global declaration

public static string d1 = DateTime.Now.ToString("dd");
public static string d2 = DateTime.Now.AddDays(8).ToString("dd");

    //page_load
    int span = Convert.ToInt32(d2) - Convert.ToInt32(d1);

    if (span == 8)
    {
        ScriptManager.RegisterStartupScript(Page, this.GetType(), "alert", "window.alert('You have only one day to expire support');", true);
    }
    else
    {
        ScriptManager.RegisterStartupScript(Page, this.GetType(), "alert", "window.alert('You have expire support of this contract');", true);
        return;
    }


这篇关于到期日期.如果日期到期,则在1周前系统应发出警报消息.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆