Пример #1
0
        public frmScaffoldingOptions(ScaffoldingParameters parameters, Form previousForm)
        {
            _previousForm = previousForm;
            _scaffoldingParams = parameters;
            InitializeComponent();

            cbxRepoGenerator.Items.Clear();
            var repoGeneratorList = Enum.GetNames(typeof(RepositoryGeneratorType));

            cbxRepoGenerator.Items.AddRange(repoGeneratorList);
        }
Пример #2
0
        private void btnNext_Click(object sender, EventArgs e)
        {
            if (!HasAllRequiredFields())
            {
                MessageBox.Show("I can't move on until you tell me about your database.");
                return;
            }

            if (!TestConnection())
            {
                MessageBox.Show("I couldn't connect to the database. Check the connection settings.");
                return;
            }

            var parameters = new ScaffoldingParameters();
            parameters.SelectedProvider = GetChosenProvider();
            parameters.SelectedProvider.ConnectionString = txtConnectionString.Text.Trim();

            var frmdbObjects = new frmDatabaseObjects(parameters, this);
            frmdbObjects.Show();

            this.Hide();
        }
Пример #3
0
 public frmDatabaseObjects(ScaffoldingParameters parameters, Form previousForm)
     : this()
 {
     ScaffoldingParams = parameters;
     _previousForm = previousForm;
 }