protected void ImageButton1_Click(object sender, ImageClickEventArgs e) { Yonetim yonet = new Yonetim(); yonet.baglantiAc(); yonet.stokEkle(urunAdDrop.SelectedValue, urunAdetDrop.Text, firmaText.Text, urunAdDrop.SelectedValue); }
protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["urunID"] == null) { Response.Redirect("Anasayfa.aspx"); } else { String UrunID = Request.QueryString["urunID"]; Yonetim goster = new Yonetim(); goster.urunGoster(UrunID); while (goster.dr.Read()) { urunAd.Text = goster.dr["URUN_ADI"].ToString(); urunMarka.Text = goster.dr["MARKA_ADI"].ToString(); urunModel.Text = goster.dr["MODEL_ADI"].ToString(); urunFiyat.Text = goster.dr["URUN_FIYAT"].ToString(); urunIndirim.Text = goster.dr["INDIRIM_ORANI"].ToString(); urunSatis.Text = goster.dr["INDIRIMLI_FIYAT"].ToString(); urunImage.ImageUrl = goster.dr["RESIM_YOL"].ToString(); } goster.baglantiKapat(); if (IsPostBack) { adet = Double.Parse(kacAdet.SelectedValue); Tutar = adet * (Double.Parse(urunSatis.Text)); toplamTutar.Text = Tutar.ToString(); } } }
protected void Button1_Click(object sender, EventArgs e) { Yonetim adres = new Yonetim(); adres.adresEkle(Session["kullaniciID"].ToString(), sokakText.Text, caddeText.Text, mahalleText.Text, kapiNoText.Text, daireNoText.Text, ilcetext.Text, sehirText.Text, postaKoduText.Text); Label9.Text = "Ekleme İşlemi Gerçekleştirilmiştir."; }
static void Main(string[] args) { Yonetim yonetim = new Yonetim(); InsaataBasla ınsaataBasla = new InsaataBasla(); Yonetim.InsaatHandler handler = ınsaataBasla.DuvarOr; }
protected void Page_Load(object sender, EventArgs e) { if (Session["kullanici"] != null) { Label giris = this.Master.FindControl("giris") as Label; giris.Text = "Hoşgeldin " + Session["kullanici"].ToString(); Label kayit = this.Master.FindControl("kayitLabel") as Label; kayit.Text = "Profilim"; } if (IsPostBack) { if (Session["kullanici"] == null) { Response.Redirect("Login.aspx"); } else { TextBox giris = this.Master.FindControl("giris") as TextBox; String UrunID = Request.QueryString["urunID"]; Yonetim sepetEkle = new Yonetim(); giris.Text = UrunID; sepetEkle.sepeteEkle(Session["kullanici"].ToString(), UrunID); } } }
protected void Button1_Click(object sender, EventArgs e) { Yonetim marka = new Yonetim(); marka.markaEkle(markaText.Text); Label2.Visible = true; Label2.Text = "Marka Eklenmiştir."; }
protected void Button1_Click(object sender, EventArgs e) { Yonetim model = new Yonetim(); model.modelEkle(markaDrop.SelectedValue, modelText.Text); Label3.Text = "Başarıyla eklenmiştir."; Label3.Visible = true; }
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Guncelle") { // butona tıklayınca olacaklar int index = Convert.ToInt32(e.CommandArgument); TableRow yorum = GridView1.Rows[index]; String yorumID = yorum.Cells[1].Text; Yonetim yorumlar = new Yonetim(); yorumlar.yorumOnay(yorumID); } }
protected void yorumButon_Click(object sender, EventArgs e) { if (Session["kullanici"] != null) { Yonetim yorum = new Yonetim(); String UrunID = Request.QueryString["urunID"]; yorum.yorumEkle(yorumText.Text, yorumBaslik.Text, UrunID, Session["kullaniciID"].ToString()); } else { Response.Redirect("Login.aspx"); } }
protected void Button1_Click(object sender, EventArgs e) { if (Session["kullaniciID"] == null) { Response.Redirect("Login.aspx"); } if (IsPostBack) { Yonetim yorum = new Yonetim(); String UrunID = Request.QueryString["urunID"]; //yorum.yorumSil(UrunID, Session["kullaniciID"].ToString()); Response.Redirect("YorumSil.aspx"); } }
protected void satinAl_Click(object sender, EventArgs e) { if (Session["kullaniciID"] != null) { String UrunID = Request.QueryString["urunID"]; Yonetim satinAl = new Yonetim(); Double adet = Double.Parse(kacAdet.SelectedValue); Double Tutar = adet * (Double.Parse(urunSatis.Text)); satinAl.SepettenSatınAl(Session["kullaniciID"].ToString(), UrunID, adet.ToString(), Tutar.ToString()); } else { Response.Redirect("Login.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { Yonetim kulGoster = new Yonetim(); kulGoster.kullaniciGoster(Session["kullaniciID"].ToString()); while (kulGoster.dr.Read()) { kullaniciAd.Text = kulGoster.dr["KULLANICI_AD"].ToString(); soyad.Text = kulGoster.dr["KULLANICI_SOYAD"].ToString(); ePosta.Text = kulGoster.dr["KULLANICI_EPOSTA"].ToString(); sifre.Text = kulGoster.dr["KULLANICI_SİFRE"].ToString(); cinsiyet.Items.Add(kulGoster.dr["KULLANICI_CINSIYET"].ToString()); yas.Text = kulGoster.dr["KULLANICI_YAS"].ToString(); telNo.Text = kulGoster.dr["KULLANICI_TELEFON_NO"].ToString(); } kulGoster.baglantiKapat(); }
protected void satinAl_Click(object sender, EventArgs e) { Yonetim sepetIslemi = new Yonetim(); foreach (GridViewRow item in GridView1.Rows) { if (((CheckBox)item.FindControl("secilenCheck")).Checked) { String secilenID = GridView1.DataKeys[item.RowIndex].Value.ToString(); //Double fiyat = Convert.ToDouble(GridView1.DataKeys[item.RowIndex].Value.ToString()); //sepetIslemi.SepetSil(Session["kullaniciID"].ToString(), secilenID); DropDownList drop = (DropDownList)item.FindControl("DropDownList1"); sepetIslemi.sepetToplam(Session["kullaniciID"].ToString(), secilenID); String adet = drop.SelectedValue; Double tutar = Double.Parse(adet) * sepetIslemi.tutar; sepetIslemi.SepettenSatınAl(Session["kullaniciID"].ToString(), secilenID, adet, tutar.ToString()); } } }
protected void urunEkleButon_Click(object sender, EventArgs e) { if (resimUpload.HasFile) { try { string filename = Path.GetFileName(resimUpload.FileName); resimUpload.SaveAs(Server.MapPath("~/Img/") + filename); } catch (System.Data.SqlClient.SqlException) { Response.Write("<script>alert('HATA OLUŞTU')</script>"); } } Yonetim urun = new Yonetim(); Random r = new Random(); String sayi = (r.Next() / 1000).ToString(); decimal fiyat = Convert.ToDecimal(fiyatText.Text); decimal indirimliFiyat = 0; urun.urunEkle(urunAdText.Text, markaDrop.Text, modelDrop.Text, fiyat, indirimliFiyat, indirimText.Text, "../../Img/" + resimUpload.FileName, kategoriDrop.SelectedValue, "0", sayi); }
protected void guncelle_Click(object sender, EventArgs e) { Yonetim guncelle = new Yonetim(); guncelle.kullaniciGuncelle(Session["kullaniciID"].ToString(), kullaniciAd.Text, soyad.Text, sifre.Text, ePosta.Text, "0", cinsiyet.Text, yas.Text, telNo.Text, "0"); }