///<summary> /// Astroloji Data Update ///</summary> public static int Update(Astroloji 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 astroloji set hesapid=?hesapid,burcid=?burcid,icerik=?icerik,kayittarihi=?kayittarihi,yoneticionay=?yoneticionay,aktif=?aktif where id=?id", conneciton)) { cmd.Parameters.Add("id", p.ID, MSqlDbType.BigInt); cmd.Parameters.Add("hesapid", p.HesapID, MSqlDbType.VarChar); cmd.Parameters.Add("burcid", p.BurcID, MSqlDbType.SmallInt); cmd.Parameters.Add("icerik", p.Icerik, MSqlDbType.VarChar); cmd.Parameters.Add("kayittarihi", p.KayitTarihi, MSqlDbType.DateTime); cmd.Parameters.Add("yoneticionay", p.YoneticiOnay, MSqlDbType.Boolean); cmd.Parameters.Add("aktif", p.Aktif, MSqlDbType.Boolean); rowsAffected = cmd.ExecuteNonQuery(); } switch (conneciton.State) { case System.Data.ConnectionState.Open: conneciton.Close(); break; } } return(rowsAffected); }
///<summary> /// Astroloji Data Delete ///</summary> public static int Delete(Astroloji 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 astroloji where id=?id", conneciton)) { cmd.Parameters.Add("id", p.ID, MSqlDbType.BigInt); rowsAffected = cmd.ExecuteNonQuery(); } switch (conneciton.State) { case System.Data.ConnectionState.Open: conneciton.Close(); break; } } return(rowsAffected); }
///<summary> /// Astroloji Data PrimaryKey ///</summary> public static Astroloji GetAstroloji(Int64 pid) { Astroloji rvAstroloji = new Astroloji(); 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 astroloji where id=?id", conneciton)) { cmd.Parameters.Add("id", pid, MSqlDbType.BigInt); using (IDataReader IDR = cmd.ExecuteReader()) { while (IDR.Read()) { rvAstroloji = new Astroloji(MConvert.NullToInt64(IDR["id"]), MConvert.NullToGuidString(IDR["hesapid"]), MConvert.NullToByte(IDR["burcid"]), MConvert.NullToString(IDR["icerik"]), MConvert.NullToDateTime(IDR["kayittarihi"]), MConvert.NullToBool(IDR["yoneticionay"]), MConvert.NullToBool(IDR["aktif"])); } IDR.Close(); } } switch (conneciton.State) { case System.Data.ConnectionState.Open: conneciton.Close(); break; } } return(rvAstroloji); }
/// <summary> /// Astroloji Getir /// </summary> public static Astroloji GetAstroloji(CommandType cmdType, string sqlQuery, MParameterCollection parameters) { Astroloji rvAstroloji = new Astroloji(); 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()) { rvAstroloji = new Astroloji(MConvert.NullToInt64(IDR["id"]), MConvert.NullToGuidString(IDR["hesapid"]), MConvert.NullToByte(IDR["burcid"]), MConvert.NullToString(IDR["icerik"]), MConvert.NullToDateTime(IDR["kayittarihi"]), MConvert.NullToBool(IDR["yoneticionay"]), MConvert.NullToBool(IDR["aktif"])); } IDR.Close(); } } switch (conneciton.State) { case System.Data.ConnectionState.Open: conneciton.Close(); break; } } return(rvAstroloji); }
public void Remove(Astroloji obj) { this.List.Remove(obj); }
public int IndexOf(Astroloji obj) { return(this.List.IndexOf(obj)); }
public bool Contains(Astroloji obj) { return(this.List.Contains(obj)); }
public void Insert(int index, Astroloji obj) { this.List.Insert(index, obj); }
public int Add(Astroloji obj) { return(this.List.Add(obj)); }