Exemplo n.º 1
0
        private void LoadObjectHistory()
        {
            try
            {
                using (DataStuff sn = new DataStuff())
                {
                    DataTable dt = sn.GetObjectHistory(DatabaseName, ObjectName);

                    if (dt.Rows.Count > 0)
                    {
                        dgvHistory.DataSource = dt;
                    }
                    else
                    {
                        MessageBox.Show("No history was found for object " + ObjectName + ".", "Object History", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        this.Close();
                    }
                }
            }

            catch
            {
                throw;
            }
        }