Exemplo n.º 1
0
        public MergeDialog(string _path, SSDataBase _mydb)
        {
            InitializeComponent();

            //Additional initialization
            DataTable dt = new DataTable();

            mvars = new MergeVars();
            mvars.defaultDBPath = _path;
            mvars.Masterdb = _mydb;
            oldDBPath = _mydb.MyPath;
            mvars.mergeDBs = new List<SSDataBase>();

            //Check the info of the currently loaded master database and copy it into mvars for later use
            try {
                mvars.Masterdb.GetDBInfo(dt);
                mvars.Masterdbname = Convert.ToString(dt.Rows[0][0]);
                mvars.Masterdblocation = Convert.ToString(dt.Rows[0][1]);
                mvars.Masterdbdate = String.Format("{0:MM/dd/yyyy}", dt.Rows[0][2]);
            } catch (InvalidOperationException) { //Happens when no database is loaded
                mvars.Masterdbname = "";
                mvars.Masterdblocation = "";
            }

            page1 = new MergePage1(mvars);

            Controls.Add(page1);
        }
Exemplo n.º 2
0
        public MergeDialog(string _path, SSDataBase _mydb)
        {
            InitializeComponent();

            //Additional initialization
            DataTable dt = new DataTable();

            mvars = new MergeVars();
            mvars.defaultDBPath = _path;
            mvars.Masterdb      = _mydb;
            oldDBPath           = _mydb.MyPath;
            mvars.mergeDBs      = new List <SSDataBase>();

            //Check the info of the currently loaded master database and copy it into mvars for later use
            try
            {
                mvars.Masterdb.GetDBInfo(dt);
                mvars.Masterdbname     = Convert.ToString(dt.Rows[0][0]);
                mvars.Masterdblocation = Convert.ToString(dt.Rows[0][1]);
                mvars.Masterdbdate     = String.Format("{0:MM/dd/yyyy}", dt.Rows[0][2]);
            }
            catch (InvalidOperationException)
            { //Happens when no database is loaded
                mvars.Masterdbname     = "";
                mvars.Masterdblocation = "";
            }

            page1 = new MergePage1(mvars);

            Controls.Add(page1);
        }