Exemple #1
0
    public DBProperty GetDBProperty(EProperty property)
    {
        DBProperty db = null;

        DictProperty.TryGetValue(property, out db);
        return(db);
    }
Exemple #2
0
        public bool ShowExeculteLog(DBProperty dBProperty, IEntity entity)
        {
            SetConnection(dBProperty.Query);
            dBProperty.SetPlaseHolder(command, entity);
            var  existObject = command.ExecuteReader();
            bool answer      = dBProperty.Boolanswer(existObject);

            connection.Close();
            return(answer);
        }
        private IDictionary <string, DBProperty> GetDBProperties()
        {
            string query = "SELECT * FROM Property";
            IDictionary <string, DBProperty> properties = new Dictionary <string, DBProperty>();

            if (connection.State == System.Data.ConnectionState.Open)
            {
                SqlCommand    cmd        = new SqlCommand(query, connection);
                SqlDataReader dataReader = cmd.ExecuteReader();

                while (dataReader.Read())
                {
                    int        id   = dataReader.GetInt32(0);
                    string     name = dataReader.GetString(1);
                    DBProperty p    = new DBProperty(id, name);
                    properties.Add(name, p);
                }

                dataReader.Close();
            }

            return(properties);
        }
Exemple #4
0
 internal bool ShowExeculteLog(DBProperty config, ServiceUser tryEntity)
 {
     throw new NotImplementedException();
 }