コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["UserId"] == null)
            {
                Response.Redirect("../Login.aspx");
            }

            if (!IsPostBack)
            {
                BusinessLayer.SMS.SMSTrigger objTrigger = new BusinessLayer.SMS.SMSTrigger();
                Hidden1.Value = (objTrigger.IsMessageSentToday() == true) ? "1" : "0";

                if (Hidden1.Value == "1")
                {
                    btnSend.Style.Add("display", "none");
                }
                else
                {
                    btnSend.Style.Add("display", "block");
                }

                ddlDays.SelectedValue  = DateTime.Now.Day.ToString();
                ddlMonth.SelectedValue = DateTime.Now.Month.ToString();
                ddlYear.SelectedValue  = DateTime.Now.Year.ToString();

                BStrMssg();
            }
        }
コード例 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["UserId"] == null)
     {
         Response.Redirect("../Login.aspx");
     }
     if (!IsPostBack)
     {
         BusinessLayer.SMS.SMSTrigger objTrigger = new BusinessLayer.SMS.SMSTrigger();
         btnUnlock.Enabled = (objTrigger.IsMessageSentToday() == true) ? true : false;
     }
 }