Page
Page
using System.Collections.Generic;
using System.Configuration;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
}
catch
{
Response.Redirect("Sayfa1BK.aspx");
if(!(String.IsNullOrWhiteSpace(txtSifre.Text) ||
String.IsNullOrWhiteSpace(txtKullAdi.Text)))
{
SqlConnection sqlConnection = new SqlConnection(baglantiMetni);
SqlCommand sqlKomutuKullanicilar = new SqlCommand()
{
Connection = sqlConnection,
CommandType = CommandType.StoredProcedure,
CommandText = "SP_KullaniciVarMiBK"
};
sqlKomutuKullanicilar.Parameters.Add(pKAdi);
sqlKomutuKullanicilar.Parameters.Add(pSifre);
pKAdi.Value = txtKullAdi.Text;
pSifre.Value = txtSifre.Text;
sqlConnection.Open();
byte gelenVeri =
Convert.ToByte(sqlKomutuKullanicilar.ExecuteScalar());
sqlConnection.Close();
if (gelenVeri != 0)
{
Session["kAdi"] = txtKullAdi.Text;
Response.Redirect("Sayfa3BK.aspx");
}
else
{
lblMesaj.Text = "kAdi veya sifre yanlış tekrar dene.";
}
}
}
}