Esempio n. 1
0
        ///<summary>
        /// Begen Data Delete
        ///</summary>
        public static int Delete(Begen p)
        {
            int rowsAffected = 0;

            using (MConnection conneciton = new MConnection(MClientProvider.MSSQL))
            {
                switch (conneciton.State)
                {
                case System.Data.ConnectionState.Closed:
                    conneciton.Open();
                    break;
                }
                using (MCommand cmd = new MCommand(CommandType.Text, "DELETE FROM Begen WHERE ID=@ID", conneciton))
                {
                    cmd.Parameters.Add("ID", p.ID, MSqlDbType.UniqueIdentifier);
                    rowsAffected = MConvert.NullToInt(cmd.ExecuteNonQuery());
                }
                switch (conneciton.State)
                {
                case System.Data.ConnectionState.Open:
                    conneciton.Close();
                    break;
                }
            }
            return(rowsAffected);
        }
Esempio n. 2
0
        ///<summary>
        /// Begen Data Update
        ///</summary>
        public static int Update(Begen p)
        {
            int rowsAffected = 0;

            using (MConnection conneciton = new MConnection(MClientProvider.MSSQL))
            {
                switch (conneciton.State)
                {
                case System.Data.ConnectionState.Closed:
                    conneciton.Open();
                    break;
                }
                using (MCommand cmd = new MCommand(CommandType.Text, "UPDATE Begen SET HesapID=@HesapID,IP=@IP,ModulID=@ModulID,IcerikID=@IcerikID,Durum=@Durum,KayitTarihi=@KayitTarihi WHERE ID=@ID", conneciton))
                {
                    cmd.Parameters.Add("ID", p.ID, MSqlDbType.UniqueIdentifier);
                    cmd.Parameters.Add("HesapID", p.HesapID, MSqlDbType.UniqueIdentifier);
                    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("Durum", p.Durum, MSqlDbType.Bit);
                    cmd.Parameters.Add("KayitTarihi", p.KayitTarihi, MSqlDbType.DateTime);
                    rowsAffected = MConvert.NullToInt(cmd.ExecuteNonQuery());
                }
                switch (conneciton.State)
                {
                case System.Data.ConnectionState.Open:
                    conneciton.Close();
                    break;
                }
            }
            return(rowsAffected);
        }
Esempio n. 3
0
        ///<summary>
        /// Begen Data PrimaryKey
        ///</summary>
        public static Begen GetBegen(System.Guid pID)
        {
            Begen rvBegen = new Begen();

            using (MConnection conneciton = new MConnection(MClientProvider.MSSQL))
            {
                switch (conneciton.State)
                {
                case System.Data.ConnectionState.Closed:
                    conneciton.Open();
                    break;
                }
                using (MCommand cmd = new MCommand(CommandType.Text, "SELECT * FROM Begen WHERE ID=@ID", conneciton))
                {
                    cmd.Parameters.Add("ID", pID, MSqlDbType.UniqueIdentifier);
                    using (IDataReader IDR = cmd.ExecuteReader())
                    {
                        while (IDR.Read())
                        {
                            rvBegen = new Begen(MConvert.NullToGuid(IDR["ID"]), MConvert.NullToGuid(IDR["HesapID"]), MConvert.NullToString(IDR["IP"]), MConvert.NullToString(IDR["ModulID"]), MConvert.NullToString(IDR["IcerikID"]), MConvert.NullToBool(IDR["Durum"]), MConvert.NullToDateTime(IDR["KayitTarihi"]));
                        }
                        IDR.Close();
                    }
                }
                switch (conneciton.State)
                {
                case System.Data.ConnectionState.Open:
                    conneciton.Close();
                    break;
                }
            }
            return(rvBegen);
        }
Esempio n. 4
0
 public void Remove(Begen obj)
 {
     this.List.Remove(obj);
 }
Esempio n. 5
0
 public int IndexOf(Begen obj)
 {
     return(this.List.IndexOf(obj));
 }
Esempio n. 6
0
 public bool Contains(Begen obj)
 {
     return(this.List.Contains(obj));
 }
Esempio n. 7
0
 public void Insert(int index, Begen obj)
 {
     this.List.Insert(index, obj);
 }
Esempio n. 8
0
 public int Add(Begen obj)
 {
     return(this.List.Add(obj));
 }