protected void Page_Load(object sender, EventArgs e)
        {
            iletisimID = Request.QueryString["iletisimID"];
            islem      = Request.QueryString["islem"];

            if (islem == "sil")
            {
                string sil = "Delete From Iletisim Where iletisimID= '" + iletisimID + "'";
                ConnectionQuerry.ExecuteQueries(sil);
            }



            SqlConnection cnn   = new SqlConnection(ConfigurationManager.ConnectionStrings[0].ConnectionString);
            string        sorgu = "Select * From Iletisim ";
            SqlCommand    cmd   = new SqlCommand(sorgu, cnn);

            cnn.Open();

            SqlDataReader dr = cmd.ExecuteReader();

            DataList1.DataSource = dr;
            DataList1.DataBind();
            cnn.Close();
        }
Exemplo n.º 2
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            string sil = "Delete from Araba where Marka= '" + DropDownList1.Text + "'";

            ConnectionQuerry.ExecuteQueries(sil);
            Response.Redirect("AraçGöster.aspx");
        }
Exemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["kullaniciadi"] == null)
            {
                Response.Redirect("Giris.aspx");
            }
            arabaID = Request.QueryString["arabaID"];
            islem   = Request.QueryString["islem"];
            if (islem == "sil")
            {
                string sil = "Delete from Araba where arabaID='" + arabaID + "'";
                ConnectionQuerry.ExecuteQueries(sil);
            }

            SqlConnection cnn = new SqlConnection(ConfigurationManager.ConnectionStrings[0].ConnectionString);

            string     sorgu = "Select * From Araba ";
            SqlCommand cmd   = new SqlCommand(sorgu, cnn);

            cnn.Open();

            SqlDataReader dr = cmd.ExecuteReader();

            DataList1.DataSource = dr;
            DataList1.DataBind();
            cnn.Close();
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            if (DropDownList1.Text != "")
            {
                string Sil = "Delete From Duyurular Where Baslik= '" + DropDownList1.Text + "'";
                ConnectionQuerry.ExecuteQueries(Sil);
                Response.Redirect("DuyuruSil.aspx");

                Label2.Visible = true;
                Label2.Text    = "Duyuru Başarıyla Silinmiştir.";
            }
        }
Exemplo n.º 5
0
 protected void btnkaydet_Click(object sender, EventArgs e)
 {
     if (FileUpload1.HasFile == false)
     {
         txtfiyat.Text = "Resim seçiniz.";
     }
     else
     {
         FileUpload1.SaveAs(Server.MapPath("/arabaresim/") + FileUpload1.FileName);
         string sorgu = "insert into Araba(Marka,Model,Fiyat,VitesTürü,Yakıt,KoltukSayısı,Klima,Resimler,Segment) Values('" + txtmarka.Text + "','" + txtmodel.Text + "','" + txtfiyat.Text + "','" + DropDownList1.Text + "','" + DropDownList2.Text + "','" + DropDownList4.Text + "','" + DropDownList3.Text + "','/arabaresim/" + FileUpload1.FileName + "','" + DropDownList5.Text + "')";
         ConnectionQuerry.ExecuteQueries(sorgu);
     }
 }
Exemplo n.º 6
0
        protected void Button1_Click1(object sender, EventArgs e)
        {
            if (fl_duyururesim.HasFile == false)
            {
                Label1.Text = "Resim seçiniz.";
            }
            else
            {
                fl_duyururesim.SaveAs(Server.MapPath("/duyururesim/") + fl_duyururesim.FileName);
                string sorgu = "insert into Duyurular(duyuruBaslik,duyuruKonu,duyuruIcerik,duyuruResim) Values('" + txt_duyurubaslik.Text.ToString() + "','" + txt_duyurukonu.Text.ToString() + "','" + txt_duyuruicerik.Text.ToString() + "','/duyururesim/" + fl_duyururesim.FileName + "')";

                ConnectionQuerry.ExecuteQueries(sorgu);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            Panel2.Visible = false;

            if (Session["kullaniciadi"] == null)
            {
                Response.Redirect("Giris.aspx");
            }

            duyuruID = Request.QueryString["duyuruID"];
            islem    = Request.QueryString["islem"];

            if (islem == "sil")
            {
                string sil = "Delete from Duyurular where duyuruID='" + duyuruID + "'";
                ConnectionQuerry.ExecuteQueries(sil);
            }

            SqlConnection cnn   = new SqlConnection(ConfigurationManager.ConnectionStrings[0].ConnectionString);
            string        sorgu = "Select * From Duyurular ";
            SqlCommand    cmd   = new SqlCommand(sorgu, cnn);

            cnn.Open();

            SqlDataReader dr = cmd.ExecuteReader();

            DataList1.DataSource = dr;
            DataList1.DataBind();
            cnn.Close();


            if (islem == "göster")
            {
                Panel1.Visible = false;
                Panel2.Visible = true;


                SqlConnection cnn1   = new SqlConnection(ConfigurationManager.ConnectionStrings[0].ConnectionString);
                string        sorgu1 = "Select * From Duyurular  where duyuruID = '" + duyuruID + "'";
                SqlCommand    cmd1   = new SqlCommand(sorgu1, cnn1);
                cnn1.Open();

                SqlDataReader dr1 = cmd1.ExecuteReader();
                DataList2.DataSource = dr1;
                DataList2.DataBind();
                cnn1.Close();
            }
        }