private void BTNKAYDET3_Click(object sender, EventArgs e) { EntityClassKulup ent = new EntityClassKulup(); ent.KULUPAD = TXTKULUPAD.Text; LogicClassKulup.EKLE(ent); }
private void BTNGUNCELLE3_Click(object sender, EventArgs e) { EntityClassKulup ent = new EntityClassKulup(); ent.KULUPAD = TXTKULUPAD.Text; ent.KULUPID = Convert.ToInt16(TXTKULUPID.Text); LogicClassKulup.GUNCELLE(ent); KulupListesi(); }
public static bool GUNCELLE(EntityClassKulup entKulup) { if (entKulup.KULUPAD != "") { return(FacadeClassKulup.GUNCELLE(entKulup)); } else { return(false); } }
public static int EKLE(EntityClassKulup entKulup) { if (entKulup.KULUPAD != "") { return(FacadeClassKulup.EKLE(entKulup)); } else { return(-1); } }
public static int EKLE(EntityClassKulup entKulup) { SqlCommand cm1 = new SqlCommand("KULUPEKLE", ConnectionClass.cn); cm1.CommandType = CommandType.StoredProcedure; if (cm1.Connection.State != ConnectionState.Open) { cm1.Connection.Open(); } cm1.Parameters.AddWithValue("KULUPAD", entKulup.KULUPAD); return(cm1.ExecuteNonQuery()); }
public static List <EntityClassKulup> KULUPLISTESI() { List <EntityClassKulup> values = new List <EntityClassKulup>(); SqlCommand cm4 = new SqlCommand("KULUPLISTESI", ConnectionClass.cn); cm4.CommandType = CommandType.StoredProcedure; if (cm4.Connection.State != ConnectionState.Open) { cm4.Connection.Open(); } SqlDataReader dr = cm4.ExecuteReader(); while (dr.Read()) { EntityClassKulup ent = new EntityClassKulup(); ent.KULUPID = Convert.ToInt16(dr["KULUPID"]); ent.KULUPAD = dr["KULUPAD"].ToString(); values.Add(ent); } dr.Close(); return(values); }