///<summary> /// Gosterim Data Delete ///</summary> public static int Delete(Gosterim p) { int rowsAffected = 0; using (MConnection conneciton = new MConnection(MClientProvider.MySQL)) { switch (conneciton.State) { case System.Data.ConnectionState.Closed: conneciton.Open(); break; } using (MCommand cmd = new MCommand(CommandType.Text, "delete from gosterim where id=?id", conneciton)) { cmd.Parameters.Add("id", p.ID, MSqlDbType.VarChar); rowsAffected = cmd.ExecuteNonQuery(); } switch (conneciton.State) { case System.Data.ConnectionState.Open: conneciton.Close(); break; } } return(rowsAffected); }
///<summary> /// Gosterim Data Update ///</summary> public static int Update(Gosterim p) { int rowsAffected = 0; using (MConnection conneciton = new MConnection(MClientProvider.MySQL)) { switch (conneciton.State) { case System.Data.ConnectionState.Closed: conneciton.Open(); break; } using (MCommand cmd = new MCommand(CommandType.Text, "update gosterim set hesapid=?hesapid,ip=?ip,modulid=?modulid,icerikid=?icerikid,kayittarihi=?kayittarihi where id=?id", conneciton)) { cmd.Parameters.Add("id", p.ID, MSqlDbType.VarChar); cmd.Parameters.Add("hesapid", p.HesapID, MSqlDbType.VarChar); cmd.Parameters.Add("ip", p.IP, MSqlDbType.VarChar); cmd.Parameters.Add("modulid", p.ModulID, MSqlDbType.VarChar); cmd.Parameters.Add("icerikid", p.IcerikID, MSqlDbType.VarChar); cmd.Parameters.Add("kayittarihi", p.KayitTarihi, MSqlDbType.DateTime); rowsAffected = cmd.ExecuteNonQuery(); } switch (conneciton.State) { case System.Data.ConnectionState.Open: conneciton.Close(); break; } } return(rowsAffected); }
///<summary> /// Gosterim Data PrimaryKey ///</summary> public static Gosterim GetGosterim(System.String pid) { Gosterim rvGosterim = new Gosterim(); using (MConnection conneciton = new MConnection(MClientProvider.MySQL)) { switch (conneciton.State) { case System.Data.ConnectionState.Closed: conneciton.Open(); break; } using (MCommand cmd = new MCommand(CommandType.Text, "select * from gosterim where id=?id limit 1", conneciton)) { cmd.Parameters.Add("id", pid, MSqlDbType.VarChar); using (IDataReader IDR = cmd.ExecuteReader()) { while (IDR.Read()) { rvGosterim = new Gosterim(MConvert.NullToGuidString(IDR["id"]), MConvert.NullToGuidString(IDR["hesapid"]), MConvert.NullToString(IDR["ip"]), MConvert.NullToString(IDR["modulid"]), MConvert.NullToString(IDR["icerikid"]), MConvert.NullToDateTime(IDR["kayittarihi"])); } IDR.Close(); } } switch (conneciton.State) { case System.Data.ConnectionState.Open: conneciton.Close(); break; } } return(rvGosterim); }
/// <summary> /// Gosterim Getir /// </summary> public static Gosterim GetGosterim(CommandType cmdType, string sqlQuery, MParameterCollection parameters) { Gosterim rvGosterim = new Gosterim(); using (MConnection conneciton = new MConnection(MClientProvider.MySQL)) { switch (conneciton.State) { case System.Data.ConnectionState.Closed: conneciton.Open(); break; } using (MCommand cmd = new MCommand(cmdType, sqlQuery, conneciton)) { if (parameters != null) { foreach (MParameter item in parameters) { cmd.Parameters.Add(item); } } using (IDataReader IDR = cmd.ExecuteReader()) { while (IDR.Read()) { rvGosterim = new Gosterim(MConvert.NullToGuidString(IDR["id"]), MConvert.NullToGuidString(IDR["hesapid"]), MConvert.NullToString(IDR["ip"]), MConvert.NullToString(IDR["modulid"]), MConvert.NullToString(IDR["icerikid"]), MConvert.NullToDateTime(IDR["kayittarihi"])); } IDR.Close(); } } switch (conneciton.State) { case System.Data.ConnectionState.Open: conneciton.Close(); break; } } return(rvGosterim); }
public void Remove(Gosterim obj) { this.List.Remove(obj); }
public int IndexOf(Gosterim obj) { return(this.List.IndexOf(obj)); }
public bool Contains(Gosterim obj) { return(this.List.Contains(obj)); }
public void Insert(int index, Gosterim obj) { this.List.Insert(index, obj); }
public int Add(Gosterim obj) { return(this.List.Add(obj)); }