コード例 #1
0
        // - -  - -  - -  - -  - -  - -  - -  - -  - -  - -  - -  - -  - -  - -  - -

        public static ObservableCollection <AuditTrail> LoadAuditTrail(DBSQLViewModel dBSQLViewModel, AuditTrailViewModel sender, bool Filtered = true, long MaxRecords = 500)
        {
            var AuditTrail = new List <AuditTrail>();

            string Where = GetWhere(dBSQLViewModel.DBType, sender);

            string SQL = DB_SQL.SelectAll(dBSQLViewModel.DBType, "AuditTrail", Where, MaxRecords);

            if (dBSQLViewModel != null)
            {
                try
                {
                    AuditTrail = DB_SQL.Query <AuditTrail>(dBSQLViewModel, SQL);

                    if (AuditTrail == null)
                    {
                        AuditTrail = new List <AuditTrail>();
                    }
                    ;
                }
                catch (Exception ex)
                {
                    Debug.WriteLine(ex.Message);
                };
            }
            ;

            return(new ObservableCollection <AuditTrail>(AuditTrail));
        }