Beispiel #1
0
        ///<summary>
        /// Manset Data PrimaryKey
        ///</summary>
        public static Manset GetManset(System.String pid)
        {
            Manset rvManset = new Manset();

            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 manset where id=?id order by guncellemetarihi desc limit 1", conneciton))
                {
                    cmd.Parameters.Add("id", pid, MSqlDbType.VarChar);
                    using (IDataReader IDR = cmd.ExecuteReader())
                    {
                        while (IDR.Read())
                        {
                            rvManset = new Manset(MConvert.NullToGuidString(IDR["id"]), MConvert.NullToString(IDR["modulid"]), MConvert.NullToString(IDR["resimbuyuk"]), MConvert.NullToString(IDR["baslik1"]), MConvert.NullToString(IDR["baslik2"]), MConvert.NullToString(IDR["aciklama"]), MConvert.NullToString(IDR["baglanti"]), MConvert.NullToString(IDR["dugme"]), MConvert.NullToString(IDR["dil"]), MConvert.NullToDateTime(IDR["kayittarihi"]), MConvert.NullToDateTime(IDR["guncellemetarihi"]), MConvert.NullToByte(IDR["yerlesim"]), MConvert.NullToBool(IDR["aktif"]));
                        }
                        IDR.Close();
                    }
                }
                switch (conneciton.State)
                {
                case System.Data.ConnectionState.Open:
                    conneciton.Close();
                    break;
                }
            }
            return(rvManset);
        }
Beispiel #2
0
        ///<summary>
        /// Manset Data Delete
        ///</summary>
        public static int Delete(Manset 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 manset 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);
        }
Beispiel #3
0
        ///<summary>
        /// Manset Data Update
        ///</summary>
        public static int Update(Manset 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 manset set modulid=?modulid,resimbuyuk=?resimbuyuk,baslik1=?baslik1,baslik2=?baslik2,aciklama=?aciklama,baglanti=?baglanti,dugme=?dugme,dil=?dil,kayittarihi=?kayittarihi,guncellemetarihi=?guncellemetarihi,yerlesim=?yerlesim,aktif=?aktif where id=?id", conneciton))
                {
                    cmd.Parameters.Add("id", p.ID, MSqlDbType.VarChar);
                    cmd.Parameters.Add("modulid", p.ModulID, MSqlDbType.VarChar);
                    cmd.Parameters.Add("resimbuyuk", p.ResimBuyuk, MSqlDbType.VarChar);
                    cmd.Parameters.Add("baslik1", p.Baslik1, MSqlDbType.VarChar);
                    cmd.Parameters.Add("baslik2", p.Baslik2, MSqlDbType.VarChar);
                    cmd.Parameters.Add("aciklama", p.Aciklama, MSqlDbType.VarChar);
                    cmd.Parameters.Add("baglanti", p.Baglanti, MSqlDbType.VarChar);
                    cmd.Parameters.Add("dugme", p.Dugme, MSqlDbType.VarChar);
                    cmd.Parameters.Add("dil", p.Dil, MSqlDbType.VarChar);
                    cmd.Parameters.Add("kayittarihi", p.KayitTarihi, MSqlDbType.DateTime);
                    cmd.Parameters.Add("guncellemetarihi", p.GuncellemeTarihi, MSqlDbType.DateTime);
                    cmd.Parameters.Add("yerlesim", p.Yerlesim, MSqlDbType.Byte);
                    cmd.Parameters.Add("aktif", p.Aktif, MSqlDbType.Boolean);
                    rowsAffected = cmd.ExecuteNonQuery();
                }
                switch (conneciton.State)
                {
                case System.Data.ConnectionState.Open:
                    conneciton.Close();
                    break;
                }
            }
            return(rowsAffected);
        }
Beispiel #4
0
        ///<summary>
        /// Manset Data Insert
        ///</summary>
        public static int Insert(Manset 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, "insert into manset (id,modulid,resimbuyuk,baslik1,baslik2,aciklama,baglanti,dugme,dil,kayittarihi,guncellemetarihi,yerlesim,aktif) values(?id,?modulid,?resimbuyuk,?baslik1,?baslik2,?aciklama,?baglanti,?dugme,?dil,?kayittarihi,?guncellemetarihi,?yerlesim,?aktif)", conneciton))
                {
                    cmd.Parameters.Add("id", Guid.NewGuid(), MSqlDbType.VarChar);
                    cmd.Parameters.Add("modulid", p.ModulID, MSqlDbType.VarChar);
                    cmd.Parameters.Add("resimbuyuk", p.ResimBuyuk, MSqlDbType.VarChar);
                    cmd.Parameters.Add("baslik1", p.Baslik1, MSqlDbType.VarChar);
                    cmd.Parameters.Add("baslik2", p.Baslik2, MSqlDbType.VarChar);
                    cmd.Parameters.Add("aciklama", p.Aciklama, MSqlDbType.VarChar);
                    cmd.Parameters.Add("baglanti", p.Baglanti, MSqlDbType.VarChar);
                    cmd.Parameters.Add("dugme", p.Dugme, MSqlDbType.VarChar);
                    cmd.Parameters.Add("dil", p.Dil, MSqlDbType.VarChar);
                    cmd.Parameters.Add("kayittarihi", p.KayitTarihi, MSqlDbType.DateTime);
                    cmd.Parameters.Add("guncellemetarihi", p.GuncellemeTarihi, MSqlDbType.DateTime);
                    cmd.Parameters.Add("yerlesim", p.Yerlesim, MSqlDbType.SmallInt);
                    cmd.Parameters.Add("aktif", p.Aktif, MSqlDbType.Boolean);
                    rowsAffected = cmd.ExecuteNonQuery();
                }
                switch (conneciton.State)
                {
                case System.Data.ConnectionState.Open:
                    conneciton.Close();
                    break;
                }
            }
            return(rowsAffected);
        }
Beispiel #5
0
 public void Remove(Manset obj)
 {
     this.List.Remove(obj);
 }
Beispiel #6
0
 public int IndexOf(Manset obj)
 {
     return(this.List.IndexOf(obj));
 }
Beispiel #7
0
 public bool Contains(Manset obj)
 {
     return(this.List.Contains(obj));
 }
Beispiel #8
0
 public void Insert(int index, Manset obj)
 {
     this.List.Insert(index, obj);
 }
Beispiel #9
0
 public int Add(Manset obj)
 {
     return(this.List.Add(obj));
 }