Exemple #1
0
    protected void btLogin_Click(object sender, EventArgs e)
    {
        //เช็คจำนวนผู้ใช้-----------------------------------------------------------
        ClientLimit cl = new ClientLimit();

        cl.ClearTimeOut();
        if (cl.UserCount >= cl.UserLimit)
        {
            lblError.Text = "จำนวนผู้เข้าใช้งานเต็ม";
            return;
        }
        //--------------------------------------------------------------------
        if (UserProvider.ValidateUser(txtUserName.Text, Text.Encrypt(txtPassword.Text), false, false) == true)
        {
            if (string.IsNullOrEmpty(Request.QueryString["returnUrl"]))
            {
                btc.UpdateStatusActivity();
                Response.Redirect(FormsAuthentication.DefaultUrl);
            }
            else
            {
                btc.UpdateStatusActivity();
                Response.Redirect(Request.QueryString["returnUrl"]);
            }
        }
        else
        {
            lblError.Text = "User Name หรือ Password ผิดพลาด";
        }
    }
Exemple #2
0
    protected void btUndo_Click(object sender, EventArgs e)
    {
        int i = 0;

        //Update Status ¡ÅѺä»ÂѧäÁè»Ô´¡Ô¨¡ÃÃÁ
        i = Conn.Update("Activity", "Where ActivityCode = '" + ddlActivity.SelectedValue + "'", "Status, CloseAcDate", "0", DBNull.Value);
        btc.UpdateStatusActivity();
        Response.Redirect("CostsView2Edit.aspx?ckmode=5&Cr=" + i);
    }