using DevExpress.ExpressApp;
using DevExpress.ExpressApp.ReportsV2;
using DevExpress.ExpressApp.Updating;
using EntityFirst.Module.BusinessObjects;
using EntityFirst.Module.Reports;
using System;
using System.Collections.Generic;
using System.Linq;
// namespaces...
namespace EntityFirst.Module
{
    // public classes...
    public sealed partial class EntityFirstModule : ModuleBase
    {
        // public constructors...
        public EntityFirstModule()
        {
            InitializeComponent();
        }
        // public methods...
        public override IEnumerable<ModuleUpdater> GetModuleUpdaters(IObjectSpace objectSpace, Version versionFromDB)
        {
            ModuleUpdater updater = new DatabaseUpdate.Updater(objectSpace, versionFromDB);
            
            var predefinedReportsUpdater = new PredefinedReportsUpdater(Application, objectSpace, versionFromDB);
            
            predefinedReportsUpdater.AddPredefinedReport<Employee_Status_Report>("Κατάσταση εργαζομένων", typeof(Employee));
            
            return new ModuleUpdater[]
            { 
                updater, predefinedReportsUpdater
            };
        }
        public override void Setup(XafApplication application)
        {
            base.Setup(application);
        }
    }
}
