//} protected void Button1_Click(object sender, EventArgs e) { //CheckBox evsahibi = (CheckBox)FindControl("evsahibi"); //CheckBox muteahhit = (CheckBox)FindControl("muteahhit"); //int kullaniciTipi = 3; //if (evsahibi.Checked) //{ kullaniciTipi = 0; } //else if (muteahhit.Checked) //{ kullaniciTipi = 1; } //else if (evsahibi.Checked && muteahhit.Checked) //{ kullaniciTipi = 2; } //else { } //string cepTel = TextBox4.Text; //string evTel = TextBox5.Text; //string isTel = TextBox6.Text; //string il = illerDrpDwn.SelectedValue.ToString(); //string ilce = ilcelerDrpDwn.SelectedValue.ToString(); kullanici kull = new kullanici(); kull = kull.getUser(TextBox3.Text); string txt1Enc = Convert.ToBase64String(System.Text.Encoding.ASCII.GetBytes(kull.email)); Response.Redirect("updateUserDetails.aspx?e=" +txt1Enc); }
//} protected void Button1_Click(object sender, EventArgs e) { //CheckBox evsahibi = (CheckBox)FindControl("evsahibi"); //CheckBox muteahhit = (CheckBox)FindControl("muteahhit"); //int kullaniciTipi = 3; //if (evsahibi.Checked) //{ kullaniciTipi = 0; } //else if (muteahhit.Checked) //{ kullaniciTipi = 1; } //else if (evsahibi.Checked && muteahhit.Checked) //{ kullaniciTipi = 2; } //else { } //string cepTel = TextBox4.Text; //string evTel = TextBox5.Text; //string isTel = TextBox6.Text; //string il = illerDrpDwn.SelectedValue.ToString(); //string ilce = ilcelerDrpDwn.SelectedValue.ToString(); kullanici kull = new kullanici(); kull = kull.getUser(TextBox3.Text); string txt1Enc = Convert.ToBase64String(System.Text.Encoding.ASCII.GetBytes(kull.email)); Response.Redirect("updateUserDetails.aspx?e=" + txt1Enc); }
protected void Button1_Click(object sender, EventArgs e) { CheckBox evsahibi = (CheckBox)FindControl("evsahibi"); CheckBox muteahhit = (CheckBox)FindControl("muteahhit"); int kullaniciTipi = 3; if (evsahibi.Checked && muteahhit.Checked) { kullaniciTipi = 2; } else if (muteahhit.Checked) { kullaniciTipi = 1; } else if (evsahibi.Checked) { kullaniciTipi = 0; } else { } string email = TextBox3.Text; string name = TextBox1.Text; string surName = TextBox2.Text; string cepTel = TextBox4.Text; string evTel = TextBox5.Text; string isTel = TextBox6.Text; string il = illerDrpDwn.SelectedValue.ToString(); string ilce = ilcelerDrpDwn.SelectedValue.ToString(); kullanici kull = new kullanici(); kull = kull.getUser(TextBox3.Text); kull.updateUserDetails(kull.id,name, surName, email, kullaniciTipi, cepTel, evTel, isTel, il, ilce); string txt1Enc = Convert.ToBase64String(System.Text.Encoding.ASCII.GetBytes(kull.email)); Response.Redirect("loggeddef.aspx?e=" + txt1Enc); }
protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["e"] == null) { Response.Redirect("Default.aspx"); } else { string email = Request.QueryString["e"]; byte[] encodedByte = Convert.FromBase64String(email); string base64Encoded = Encoding.UTF8.GetString(encodedByte); kullanici kull = new kullanici(); kullanici kull1 = new kullanici(); kull = kull.getUser(base64Encoded); kull1 = kull1.getUserDetails(base64Encoded); TextBox1.Text = kull.name; TextBox2.Text = kull.surName; TextBox3.Text = kull.email; TextBox4.Text = kull1.cellPhone; TextBox5.Text = kull1.homePhone; TextBox6.Text = kull1.workPhone; CheckBox chkEv = (CheckBox)FindControl("evsahibi"); CheckBox chkMut = (CheckBox)FindControl("muteahhit"); if (kull1.userType == 0) { chkEv.Checked = true; chkMut.Checked = false; } else if (kull1.userType == 1) { chkMut.Checked = true; chkEv.Checked = false; } else if (kull1.userType == 2) { chkEv.Checked = true; chkMut.Checked = true; } illerDrpDwn.Items.Add(kull1.city); ilcelerDrpDwn.Items.Add(kull1.district); } }
protected void Unnamed1_Click(object sender, EventArgs e) { TextBox txt = (TextBox)FindControl("TextBox1"); TextBox txt1 = (TextBox)FindControl("TextBox2"); if (txt.Text=="" || txt1.Text =="") { Label lblWarning = (Label)FindControl("Label1"); lblWarning.ForeColor = System.Drawing.Color.Red; lblWarning.Text = "Eposta ve/veya şifre alanlarını boş bıraktınız."; return; } string email = txt.Text; string txt1Enc = Convert.ToBase64String(System.Text.Encoding.ASCII.GetBytes(txt1.Text)); kullanici kull = new kullanici(); kull = kull.getUser(email); // SqlConnection sqlConn = new SqlConnection(ConfigurationManager.ConnectionStrings["kentDon"].ConnectionString); // SqlCommand check = new SqlCommand("SELECT eposta, sifre FROM kullanici WHERE eposta=@email", sqlConn); // check.Parameters.AddWithValue("@email", email); // sqlConn.Open(); // SqlDataReader reader = check.ExecuteReader(); //reader.Read() && if (kull.pass == txt1Enc) { string emailEnc = Convert.ToBase64String(System.Text.Encoding.ASCII.GetBytes(kull.email)); Response.Redirect("loggeddef.aspx?e=" + emailEnc); } else { Label lblWarning = (Label)FindControl("Label1"); lblWarning.ForeColor = System.Drawing.Color.Red; lblWarning.Text = "Eposta veya şifreniz hatalıdır lütfen tekrar deneyiniz."; } }
protected void Unnamed1_Click(object sender, EventArgs e) { TextBox txt = (TextBox)FindControl("TextBox1"); TextBox txt1 = (TextBox)FindControl("TextBox2"); if (txt.Text == "" || txt1.Text == "") { Label lblWarning = (Label)FindControl("Label1"); lblWarning.ForeColor = System.Drawing.Color.Red; lblWarning.Text = "Eposta ve/veya şifre alanlarını boş bıraktınız."; return; } string email = txt.Text; string txt1Enc = Convert.ToBase64String(System.Text.Encoding.ASCII.GetBytes(txt1.Text)); kullanici kull = new kullanici(); kull = kull.getUser(email); // SqlConnection sqlConn = new SqlConnection(ConfigurationManager.ConnectionStrings["kentDon"].ConnectionString); // SqlCommand check = new SqlCommand("SELECT eposta, sifre FROM kullanici WHERE eposta=@email", sqlConn); // check.Parameters.AddWithValue("@email", email); // sqlConn.Open(); // SqlDataReader reader = check.ExecuteReader(); //reader.Read() && if (kull.pass == txt1Enc) { string emailEnc = Convert.ToBase64String(System.Text.Encoding.ASCII.GetBytes(kull.email)); Response.Redirect("loggeddef.aspx?e=" + emailEnc); } else { Label lblWarning = (Label)FindControl("Label1"); lblWarning.ForeColor = System.Drawing.Color.Red; lblWarning.Text = "Eposta veya şifreniz hatalıdır lütfen tekrar deneyiniz."; } }
protected void Button1_Click(object sender, EventArgs e) { CheckBox evsahibi = (CheckBox)FindControl("evsahibi"); CheckBox muteahhit = (CheckBox)FindControl("muteahhit"); int kullaniciTipi = 3; if (evsahibi.Checked && muteahhit.Checked) { kullaniciTipi = 2; } else if (muteahhit.Checked) { kullaniciTipi = 1; } else if (evsahibi.Checked) { kullaniciTipi = 0; } else { } string email = TextBox3.Text; string name = TextBox1.Text; string surName = TextBox2.Text; string cepTel = TextBox4.Text; string evTel = TextBox5.Text; string isTel = TextBox6.Text; string il = illerDrpDwn.SelectedValue.ToString(); string ilce = ilcelerDrpDwn.SelectedValue.ToString(); kullanici kull = new kullanici(); kull = kull.getUser(TextBox3.Text); kull.updateUserDetails(kull.id, name, surName, email, kullaniciTipi, cepTel, evTel, isTel, il, ilce); string txt1Enc = Convert.ToBase64String(System.Text.Encoding.ASCII.GetBytes(kull.email)); Response.Redirect("loggeddef.aspx?e=" + txt1Enc); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request.QueryString["e"] == null) { Response.Redirect("loggeddef.aspx"); } illerDrpDwn.Items.Clear(); iller iller = new iller(); List <string> illers = iller.getIller(); illerDrpDwn.DataSource = illers; illerDrpDwn.DataBind(); illerDrpDwn.Items.Insert(0, "Lütfen seçiniz"); string email = Request.QueryString["e"]; byte[] encodedByte = Convert.FromBase64String(email); string base64Encoded = Encoding.UTF8.GetString(encodedByte); //kullanici kull = new kullanici(); //kull = kull.getUser(base64Encoded); //TextBox1.Text = kull.name; //TextBox2.Text = kull.surName; //TextBox3.Text = kull.email; kullanici kull = new kullanici(); kullanici kull1 = new kullanici(); kull = kull.getUser(base64Encoded); kull1 = kull1.getUserDetails(base64Encoded); TextBox1.Text = kull.name; TextBox2.Text = kull.surName; TextBox3.Text = kull.email; TextBox3.Enabled = false; TextBox4.Text = kull1.cellPhone; TextBox5.Text = kull1.homePhone; TextBox6.Text = kull1.workPhone; CheckBox chkEv = (CheckBox)FindControl("evsahibi"); CheckBox chkMut = (CheckBox)FindControl("muteahhit"); if (kull1.userType == 0) { chkEv.Checked = true; chkMut.Checked = false; } else if (kull1.userType == 1) { chkMut.Checked = true; chkEv.Checked = false; } else if (kull1.userType == 2) { chkEv.Checked = true; chkMut.Checked = true; } foreach (string il in illers) { if (il == kull1.city) { illerDrpDwn.SelectedValue = il; } } ilcelerDrpDwn.Items.Clear(); iller ilceler = new iller(); List <string> ilcelers = ilceler.getIlceler(kull1.city); ilcelerDrpDwn.DataSource = ilcelers; ilcelerDrpDwn.DataBind(); foreach (string ilce in ilcelers) { if (ilce == kull1.district) { ilcelerDrpDwn.SelectedValue = ilce; } } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request.QueryString["e"] == null) { Response.Redirect("loggeddef.aspx"); } illerDrpDwn.Items.Clear(); iller iller = new iller(); List<string> illers = iller.getIller(); illerDrpDwn.DataSource = illers; illerDrpDwn.DataBind(); illerDrpDwn.Items.Insert(0, "Lütfen seçiniz"); string email = Request.QueryString["e"]; byte[] encodedByte = Convert.FromBase64String(email); string base64Encoded = Encoding.UTF8.GetString(encodedByte); //kullanici kull = new kullanici(); //kull = kull.getUser(base64Encoded); //TextBox1.Text = kull.name; //TextBox2.Text = kull.surName; //TextBox3.Text = kull.email; kullanici kull = new kullanici(); kullanici kull1 = new kullanici(); kull = kull.getUser(base64Encoded); kull1 = kull1.getUserDetails(base64Encoded); TextBox1.Text = kull.name; TextBox2.Text = kull.surName; TextBox3.Text = kull.email; TextBox3.Enabled = false; TextBox4.Text = kull1.cellPhone; TextBox5.Text = kull1.homePhone; TextBox6.Text = kull1.workPhone; CheckBox chkEv = (CheckBox)FindControl("evsahibi"); CheckBox chkMut = (CheckBox)FindControl("muteahhit"); if (kull1.userType == 0) { chkEv.Checked = true; chkMut.Checked = false; } else if (kull1.userType == 1) { chkMut.Checked = true; chkEv.Checked = false; } else if (kull1.userType == 2) { chkEv.Checked = true; chkMut.Checked = true; } foreach (string il in illers) { if (il == kull1.city) illerDrpDwn.SelectedValue = il; } ilcelerDrpDwn.Items.Clear(); iller ilceler = new iller(); List<string> ilcelers = ilceler.getIlceler(kull1.city); ilcelerDrpDwn.DataSource = ilcelers; ilcelerDrpDwn.DataBind(); foreach (string ilce in ilcelers) { if (ilce == kull1.district) ilcelerDrpDwn.SelectedValue = ilce; } } }