コード例 #1
0
 protected void Button3_Click(object sender, EventArgs e)
 {
     if (HiddenField1.Value != "")
     {
         Yoneticiler y = yb.Get(Convert.ToInt32(HiddenField1.Value));
         y.AdSoyad = txtguncellekullaniciadi.Text;
         y.Sifre   = txtguncellesifre.Text;
         y.YetkiID = Convert.ToInt32(DropDownList2.SelectedValue);
         yb.Guncelle(y);
         txtkullaniciadi.Text        = txtsifresi.Text = "";
         DropDownList2.SelectedIndex = 0;
         yukle();
     }
     else
     {
         Response.Redirect("..\\Login.aspx");
     }
 }
コード例 #2
0
 protected void btnguncelle_Click(object sender, EventArgs e)
 {
     if (Session["admin"] != null)
     {
         Yoneticiler yeni = Session["admin"] as Yoneticiler;
         if (yeni.Sifre == txtsifre.Text)
         {
             yeni.AdSoyad = txtad.Text;
             yeni.Sifre   = txtyenisifretekrar.Text;
             YoneticilerBLL bll = new YoneticilerBLL();
             bll.Guncelle(yeni);
         }
         else
         {
             txtsifre.Text = "";
             lblhata.Text  = "Sifreniz yanlış girdiniz!!!";
         }
     }
     else
     {
         Response.Redirect("~/Login.aspx");
     }
 }