示例#1
0
    protected void btnLogin_Click(object sender, EventArgs e)
    {
        string usr    = txtKullaniciAdi.Text;
        string pswd   = txtPswd.Text;
        User   result = GgDbProvider.GetUserByUsernameAndPassword(usr, pswd);

        if (result != default(User))
        {
            Session["Oturum"] = result;
            if (Session["URL"] as string == "siparis")
            {
                Response.Redirect("UrunSiparis.aspx");
            }
            else if (Session["URL"] as string == "siparislerim")
            {
                Response.Redirect("Siparislerim.aspx");
            }
            else if (Session["URL"] as string == "gelensiparis")
            {
                Response.Redirect("GelenSiparis.aspx");
            }
            else
            {
                Response.Redirect("Urunlerr.aspx");
            }
        }
        else
        {
            panelDanger.Visible = true;
            Session["Oturum"]   = null;
        }
    }
示例#2
0
    protected void lbLogin_Click(object sender, EventArgs e)
    {
        string usr    = txtLoginUsername.Text;
        string pswd   = txtLoginPasswd.Text;
        User   result = GgDbProvider.GetUserByUsernameAndPassword(usr, pswd);

        if (result != default(User))
        {
            Session["Oturum"] = result;
            Response.Redirect("Urunlerr.aspx");
        }
        else
        {
            panelDanger.Visible = true;
            Session["Oturum"]   = null;
        }
    }