Пример #1
0
        public DatabaseImport(int databaseID)
        {
            InitializeComponent();
            Database     = bizDatabase.GetDatabase(databaseID);
            ImportHelper = ModelGenerator.GetDatabaseImportHelper(Database);
            ImportHelper.ItemImportingStarted += ImportHelper_ItemImportingStarted;
            lblDatabase.Text = Database.Title;
            var server = bizDatabase.GetDBServer(Database.DBServerID);

            lblServer.Text = server.Title;


            //infoTimer.Interval =  100;
            //infoTimer.Elapsed += infoTimer_Tick;
        }
 public frmImportTables(DatabaseDTO database)
 {
     InitializeComponent();
     Database     = database;
     ImportHelper = ModelGenerator.GetDatabaseImportHelper(Database);
     ImportHelper.ItemImportingStarted         += ImportHelper_ItemImportingStarted;
     bizTableDrivedEntity.ItemImportingStarted += ImportHelper_ItemImportingStarted;
     dtgNewTables.RowLoaded       += DtgNewTables_RowLoaded;
     dtgEditTables.RowLoaded      += Dtg_RowLoaded;
     dtgExistingTables.RowLoaded  += Dtg_RowLoaded;
     dtgDeletedTables.RowLoaded   += Dtg_RowLoaded;
     dtgExceptionTables.RowLoaded += Dtg_RowLoaded;
     this.Loaded += FrmImportTables_Loaded;
     // colDataCountLimit.Header = "تعداد داده کمتر از" + " " + DataCountLimit + " " + "مورد است";
 }
        public frmImportFunctions(DatabaseDTO database)
        {
            InitializeComponent();
            Database     = database;
            ImportHelper = ModelGenerator.GetDatabaseImportHelper(Database);
            ImportHelper.ItemImportingStarted        += ImportHelper_ItemImportingStarted;
            bizDatabaseFunction.ItemImportingStarted += ImportHelper_ItemImportingStarted;
            dtgNewFunctions.RowLoaded       += DtgNewFunctions_RowLoaded;
            dtgEditFunctions.RowLoaded      += DtgNewFunctions_RowLoaded;
            dtgExistingFunctions.RowLoaded  += DtgNewFunctions_RowLoaded;
            dtgDeletedFunctions.RowLoaded   += DtgNewFunctions_RowLoaded;
            dtgExceptionFunctions.RowLoaded += DtgNewFunctions_RowLoaded;

            this.Loaded += FrmImportFunctions_Loaded;
        }
        public frmImportViews(DatabaseDTO database)
        {
            InitializeComponent();
            Database     = database;
            ImportHelper = ModelGenerator.GetDatabaseImportHelper(Database);
            ImportHelper.ItemImportingStarted         += ImportHelper_ItemImportingStarted;
            bizTableDrivedEntity.ItemImportingStarted += ImportHelper_ItemImportingStarted;
            dtgNewViews.RowLoaded       += DtgNewViews_RowLoaded;
            dtgEditViews.RowLoaded      += DtgNewViews_RowLoaded;
            dtgExistingViews.RowLoaded  += DtgNewViews_RowLoaded;
            dtgDeletedViews.RowLoaded   += DtgNewViews_RowLoaded;
            dtgExceptionViews.RowLoaded += DtgNewViews_RowLoaded;

            this.Loaded += FrmImportViews_Loaded;
        }
Пример #5
0
        public frmImportRelationships(DatabaseDTO database)
        {
            InitializeComponent();
            Database     = database;
            ImportHelper = ModelGenerator.GetDatabaseImportHelper(Database);
            ImportHelper.ItemImportingStarted         += ImportHelper_ItemImportingStarted;
            bizTableDrivedEntity.ItemImportingStarted += ImportHelper_ItemImportingStarted;
            bizRelationship.ItemImportingStarted      += ImportHelper_ItemImportingStarted;
            dtgNewRelationships.RowLoaded             += DtgNewRelationships_RowLoaded;
            dtgExistingRelationships.RowLoaded        += DtgNewRelationships_RowLoaded;
            dtgDeletedRelationships.RowLoaded         += DtgNewRelationships_RowLoaded;
            dtgExceptionRelationships.RowLoaded       += DtgNewRelationships_RowLoaded;

            colRelationshipType.ItemsSource    = Enum.GetValues(typeof(Enum_OrginalRelationshipType)).Cast <Enum_OrginalRelationshipType>();
            dtgNewRelationships.CellEditEnded += DtgNewRelationships_CellEditEnded;
            this.Loaded += FrmImportRelationships_Loaded;
        }
Пример #6
0
 private void btnImportFunctions_Click(object sender, RoutedEventArgs e)
 {
     BizDatabase bizDatabase  = new BizDatabase();
     var         database     = bizDatabase.GetDatabase(DatabaseID);
     var         ImportHelper = ModelGenerator.GetDatabaseImportHelper(database);
     //ImportHelper.GenerateFunctions();
     //if (MessageBox.Show("فرایند ورود اطلاعات خودکار توابع" + Environment.NewLine + Environment.NewLine + "آیا مطمئن هستید؟", "تائید", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
     //{
     //    //try
     //    //{
     //    var result = ModelGenerator.GenerateFunctions();
     //    if (result)
     //    {
     //        BizDatabaseFunction bizDatabaseFunction = new BizDatabaseFunction();
     //        dtgFunctions.ItemsSource = bizDatabaseFunction.GetDatabaseFunctions(Enum_DatabaseFunctionType.None, DatabaseID);
     //        MessageBox.Show("Operation is completed.");
     //    }
     //    else
     //        MessageBox.Show("Operation is not done!");
     //}
 }