-
Notifications
You must be signed in to change notification settings - Fork 0
/
urunler-guncelle.aspx.cs
executable file
·61 lines (49 loc) · 1.69 KB
/
urunler-guncelle.aspx.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
using System;
using System.Data;
public partial class urunler_guncelle : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Class.Fonksiyonlar.SiteFonksiyonlari.SessionKontrol();
Class.Fonksiyonlar.SiteFonksiyonlari.BaslikYaz(baslik_getir, "shopping-cart.png", "Ürün İşlemleri");
if (!IsCallback && !IsPostBack)
{
if (Class.Fonksiyonlar.NumericKontrol((Class.Fonksiyonlar.SQLTemizle(Request.QueryString["id"]))))
{
VeriGetir();
}
else
{
tbl_gonder.Visible = false;
}
}
}
protected void VeriGetir()
{
string SQL = "SELECT * FROM urun USE INDEX (id) WHERE id='" + Class.Fonksiyonlar.SQLTemizle(Request.QueryString["id"])+ "'";
DataSet ds = Class.Fonksiyonlar.MySQL.DataSetGetir(SQL, "urun");
if (ds.Tables[0].Rows.Count > 0)
{
admin_id.Text = Class.Fonksiyonlar.SiteFonksiyonlari.AdminAdSoyadVeTipVerID(ds.Tables[0].Rows[0]["admin_id"].ToString()) + " - " + ds.Tables[0].Rows[0]["tarih"].ToString();
urun.Attributes.Add("value", ds.Tables[0].Rows[0]["urun"].ToString());
kod.Attributes.Add("value", ds.Tables[0].Rows[0]["kod"].ToString());
}
else
{
tbl_gonder.Visible = false;
}
}
protected void submit_Click(object sender, EventArgs e)
{
if (Class.Degiskenler.OturumVarmi == 1)
{
Guncelle();
}
}
protected void Guncelle()
{
string SQL = "UPDATE urun SET urun = '" + Class.Fonksiyonlar.SQLTemizle(Request.Form["urun"]) + "',kod = '" + Class.Fonksiyonlar.SQLTemizle(Request.Form["kod"]) + "' WHERE id = '" + Class.Fonksiyonlar.SQLTemizle(Request.QueryString["id"]) + "'";
Class.Fonksiyonlar.MySQL.ExecuteNonQuery(SQL);
Class.Fonksiyonlar.SiteFonksiyonlari.MesajYaz(mesaj_getir,"Bilgileriniz başarıyla güncellenmiştir.",1);
}
}