public void CreateEmptyPackage()
        {
            comparePackage      = new ReportTypePackage(Package);// Keep it dirty
            package             = new ReportTypePackage(Package);
            package.Description = newDescription;

            if (Table.IsDuplicate(package))
            {
                System.Windows.MessageBox.Show("This type already exists");
                return;
            }

            Table.Add(package);
            package.Id  = 0;
            package.Sql = "Select INVOICE_ID AS \"Invoice\" from SPHRSBILLING.CSV_DETAILS WHERE INVOICE_ID = :I_INVOICE_ID";
            package.ReConstructPackageListFromSql(null);
            OnPropertyChanged("Package");
            Modified = true;
        }
 public void SwapMode()
 {
     // We are in the Edit Mode - Moving to the Grid View -
     // Rebuild the Sql from the Grid List
     // and display the Editable SQL statement
     if (IsSimpleMode == System.Windows.Visibility.Visible)
     {
         package.ReConstructSQLFromGridView();
         IsSimpleMode = System.Windows.Visibility.Hidden;
         Package      = package;
     }
     // We are in the the Grid Mode moving into the Edit mode
     // We need to reconstruct the SQL for any changes made to the
     // reported fields list.
     else
     {
         package.ReConstructPackageListFromSql(null);
         IsSimpleMode = System.Windows.Visibility.Visible;
     }
     OnPropertyChanged("OrderByClause");
     OnPropertyChanged("Package");
 }