예제 #1
0
        /// <summary>
        /// Yorum Getir
        /// </summary>
        public static Yorum GetYorum(CommandType cmdType, string sqlQuery, MParameterCollection parameters)
        {
            Yorum rvYorum = new Yorum();

            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())
                        {
                            rvYorum = new Yorum(MConvert.NullToGuidString(IDR["id"]), MConvert.NullToString(IDR["ip"]), MConvert.NullToString(IDR["modulid"]), MConvert.NullToString(IDR["icerikid"]), MConvert.NullToString(IDR["adi"]), MConvert.NullToString(IDR["mail"]), 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(rvYorum);
        }
예제 #2
0
 public void Remove(Yorum obj)
 {
     this.List.Remove(obj);
 }
예제 #3
0
 public int IndexOf(Yorum obj)
 {
     return(this.List.IndexOf(obj));
 }
예제 #4
0
 public bool Contains(Yorum obj)
 {
     return(this.List.Contains(obj));
 }
예제 #5
0
 public void Insert(int index, Yorum obj)
 {
     this.List.Insert(index, obj);
 }
예제 #6
0
 public int Add(Yorum obj)
 {
     return(this.List.Add(obj));
 }