Exemple #1
0
    void btnLogIn_ServerClick(object sender, EventArgs e)
    {
        LoginResponse lr = Logins.LoginCommonAllPages((SunamoPage)this.Page, login.Text, heslo.Text, true, true, Request.RawUrl);

        switch (lr.type)
        {
        case LoginResponseType.Redirect:
            ((SunamoPage)Page).WriteToDebugWithTime(lr.value);
            break;

        case LoginResponseType.Warning:
            JavaScriptInjection.alert(lr.value, this.Page);
            break;

        case LoginResponseType.Alert:
            JavaScriptInjection.alert(lr.value, this.Page);
            break;

        default:
            throw new Exception("Neimplementovaná větěv v btnLogIn_ServerClick");
        }
    }