private void arayuzBilgiDuzenle_Click(object sender, EventArgs e) { arayuzayar.SelectedIndex = 2; EUSERS item = BLLUSERS.kullanici_ismi(UserIDNo); ARkullaniciadi.Text = item.Username; ARadi.Text = item.Name; ARsoyadi.Text = item.Surname; ARemail.Text = item.Email; int temp = item.Mode; if (temp == 0) { ARpozisyon.Text = "Normal kullanici"; } else if (temp == 1) { ARpozisyon.Text = "Calisan uye"; } else if (temp == 2) { ARpozisyon.Text = "Admin"; } ECARD item2 = BLLCARD.show_Card_item(UserIDNo); ARbakiye.Text = item2.FakeBalance.ToString(); EADDRESS item3 = BLLADDRESS.show_Address_item(UserIDNo); ARcadde.Text = item3.Cadde; ARsokak.Text = item3.Street; ARil.Text = item3.City; ARilce.Text = item3.Town; ARno.Text = item3.Num.ToString(); }
private void kullanici_arayuz_bilgi() { EUSERS item = BLLUSERS.kullanici_ismi(UserIDNo); Akullaniciadi.Text = item.Username; Aadi.Text = item.Name; Asoyadi.Text = item.Surname; Aemail.Text = item.Email; int temp = item.Mode; if (temp == 0) { Apozisyon.Text = "Normal kullanici"; } else if (temp == 1) { Apozisyon.Text = "Calisan uye"; } else if (temp == 2) { Apozisyon.Text = "Admin"; } ECARD item2 = BLLCARD.show_Card_item(UserIDNo); Abakiye.Text = item2.FakeBalance.ToString(); EADDRESS item3 = BLLADDRESS.show_Address_item(UserIDNo); Acadde.Text = item3.Cadde; Asokak.Text = item3.Street; Ail.Text = item3.City; Ailce.Text = item3.Town; Ano.Text = item3.Num.ToString(); }
public static ECARD show_Card_item(int a) { ECARD item = new ECARD(); try { SqlCommand com = new SqlCommand("show_card_item", FCONNECTION.conn); com.CommandType = CommandType.StoredProcedure; if (com.Connection.State != ConnectionState.Open) { com.Connection.Open(); } com.Parameters.AddWithValue("UsersID", a); SqlDataReader rdr = com.ExecuteReader(); if (rdr.HasRows) { while (rdr.Read()) { item.CardNo = Convert.ToInt32(rdr["CardNo"]); item.CCV = Convert.ToInt32(rdr["CCV"]); item.SKT = Convert.ToInt32(rdr["SKT"]); item.FakeBalance = Convert.ToInt32(rdr["FakeBalance"]); } } com.Connection.Close(); rdr.Close(); } catch { } return(item); }
public static int update_Card(ECARD item) { int satir = -1; try { SqlCommand com = new SqlCommand("update_Card", FCONNECTION.conn); com.CommandType = CommandType.StoredProcedure; if (com.Connection.State != ConnectionState.Open) { com.Connection.Open(); } com.Parameters.AddWithValue("CardNo", item.CardNo); com.Parameters.AddWithValue("SKT", item.SKT); com.Parameters.AddWithValue("CCV", item.CCV); com.Parameters.AddWithValue("FakeBalance", item.FakeBalance); com.Parameters.AddWithValue("UsersID", item.UsersID); satir = com.ExecuteNonQuery(); com.Connection.Close(); } catch { satir = -1; } return(satir); }
private void kart_ekle_buton_Click(object sender, EventArgs e) { arayuzayar.SelectedIndex = 1; ECARD item = BLLCARD.show_Card_item(UserIDNo); Card_No.Text = item.CardNo.ToString(); SKT.Text = item.SKT.ToString(); CCV.Text = item.CCV.ToString(); Fake_Balance.Text = item.FakeBalance.ToString(); }
private void CardEkle_Click(object sender, EventArgs e) { int var1_yok0 = BLLCARD.Card_kontrol(UserIDNo); if (var1_yok0 == 1) { ECARD item = new ECARD(); item.CardNo = Convert.ToInt32(Card_No.Text); item.SKT = Convert.ToInt32(SKT.Text); item.CCV = Convert.ToInt32(CCV.Text); item.FakeBalance = Convert.ToInt32(Fake_Balance.Text); item.UsersID = UserIDNo; if (BLLCARD.update_Card(item) == -1) { MessageBox.Show("Ekleme hatasi"); } //update } else if (var1_yok0 == 0) { ECARD item = new ECARD(); item.CardNo = Convert.ToInt32(Card_No.Text); item.SKT = Convert.ToInt32(SKT.Text); item.CCV = Convert.ToInt32(CCV.Text); item.FakeBalance = Convert.ToInt32(Fake_Balance.Text); item.UsersID = UserIDNo; if (BLLCARD.insert_Card(item) == -1) { MessageBox.Show("Ekleme hatasi"); } //insert } arayuzayar.SelectedIndex = 0; kullanici_arayuz_bilgi(); }
public static int update_Card(ECARD item) { return(FCARD.update_Card(item)); }
public static int insert_Card(ECARD item) { return(FCARD.insert_Card(item)); }