예제 #1
0
    protected void btnSifreDegis_Click(object sender, EventArgs e)
    {
        fiesta.AdminUser ad = (fiesta.AdminUser)Session["AdminUser"];
        int sonuc           = 0;

        if (txtYeniSifre1.Text != txtYeniSifre2.Text)
        {
            sonuc = -1;
        }
        int sn = uye.SifreDegistir(ad.userId, txtEPosta.Text, txtEskiSifre.Text, txtYeniSifre1.Text);

        if (sn <= 0)
        {
            sonuc = -2;
        }
        else
        {
            sonuc = sn;
        }
        switch (sonuc)
        {
        case 0: ScriptManager.RegisterClientScriptBlock(Page, this.Page.GetType(), "kl", "alert('Bir hata oluştu lütfen tekrar deneyiniz!');", true); break;

        case -1: ScriptManager.RegisterClientScriptBlock(Page, this.Page.GetType(), "kl", "alert('Şifreler uyuşmamakta, lütfen kontrol ediniz!');", true); break;

        case -2: ScriptManager.RegisterClientScriptBlock(Page, this.Page.GetType(), "kl", "alert('Bir hata oluştu lütfen Sistem yöneticinize başvurun!');", true); break;

        default: ScriptManager.RegisterClientScriptBlock(Page, this.Page.GetType(), "kl", "alert('Şifreniz başarı ile değiştirildi.');", true); break;
        }
    }
예제 #2
0
    protected void BTN_Kaydet_Click(object sender, EventArgs e)
    {
        fiesta.AdminUser ad = (fiesta.AdminUser)Session["AdminUser"];
        int sonuc           = uye.UpdateProfil(ad.userId, txtEPosta.Text, txtAd.Text, txtSoyad.Text);

        if (sonuc > 0)
        {
            ScriptManager.RegisterClientScriptBlock(Page, this.Page.GetType(), "kl", "alert('İşlem başarılı');", true);
        }
        else
        {
            ScriptManager.RegisterClientScriptBlock(Page, this.Page.GetType(), "kl", "alert('İşlem sırasında  hata oluştu');", true);
        }
    }
예제 #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         if (Session["AdminUser"] != null)
         {
             fiesta.AdminUser ad = (fiesta.AdminUser)Session["AdminUser"];
             ltOnUser.Text  = ad.name + " " + ad.surname;
             ltJobName.Text = ad.roleAd;
         }
         else
         {
             Response.Redirect("Login.aspx");
         }
     }
 }
예제 #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            pnlSifre.Visible = false;

            if (Session["AdminUser"] != null)
            {
                fiesta.AdminUser ad = (fiesta.AdminUser)Session["AdminUser"];
                txtAd.Text     = ad.name;
                txtSoyad.Text  = ad.surname;
                txtEPosta.Text = ad.username;
            }
            else
            {
                Response.Redirect("Login.aspx");
            }
        }
    }
예제 #5
0
 protected void cmdLogin_Click(object sender, EventArgs e)
 {
     if (txtPassword.Text != "" && txtUsername.Text != "")
     {
         fiesta.AdminUser ad = fiesta.process.Login(txtUsername.Text, txtPassword.Text);
         if (ad.userId == -1)
         {
             ltError.Text = "<br /><span class='alert-error'>Kullanıcı bulunamadı, bilgileriniz kontrol ediniz.</span>";
         }
         else
         {
             Session["AdminUser"] = ad;
             Response.Redirect("SiparisListesi.aspx");
         }
     }
     else
     {
         ltError.Text = "<br /><span class='alert-error'>Lütfen kullanıcı adı ve parolanızı giriniz.</span>";
     }
 }