Your IP : 216.73.216.57


Current Path : C:/Inetpub/vhosts/yuksekkariyer.com/httpdocs/admin/
Upload Files:
Current File: C:/Inetpub/vhosts/yuksekkariyer.com/httpdocs/admin/TdLogin.aspx.cs

using System;
using System.Collections.Generic;
using System.Data.OleDb;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class Admin_TdLogin : System.Web.UI.Page
{
    private OleDbConnection vt = new baglanti().baglan();
    
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            pnlUyari.Visible = false;
        }

    }

    protected void btnGiris_OnServerClick(object sender, EventArgs e)
    {

        vt.Open();
        OleDbCommand sorqu = new OleDbCommand("SELECT * FROM Td_admin_login WHERE durum=1 AND emailadresi=@KULLANICIADI AND parola=@SIFRE", vt);
        sorqu.Parameters.Add("@KULLANICIADI", txtKullaniciAd.Text);
        sorqu.Parameters.Add("@SIFRE", txtSifre.Text);

        OleDbDataReader dr = sorqu.ExecuteReader();

        if (dr.HasRows)
        {
            if (dr.Read())
            {

                txtKullaniciAd.Text = dr["emailadresi"].ToString();
                txtSifre.Text = dr["parola"].ToString();
                Genel.Kullaniciid = 1;
                Response.Redirect("TdMedyaMenuAdminAyarlar.aspx");
            }

        }
        else
        {
            pnlUyari.Visible = true;
           
        }

        dr.Close();
        vt.Close();
    }
}