Exemplo n.º 1
0
        private void updateDatabase()
        {
            if (edtCN.Text.Trim().Length == 0)
            {
                MessageBox.Show("No database is selected", "Failure", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            if (edtSchema.Text.Trim().Length == 0)
            {
                MessageBox.Show("No schema is selected", "Failure", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            List<IOperation> operations = new List<IOperation>();
            operations.Add(new ConnectOperation(edtCN.Text));
            operations.Add(new BuildSchemaOperation(edtSchema.Text));
            operations.Add(new UpdateDatabaseOperation(edtSchema.Name));

            FrmExecute frmExecute = new FrmExecute(operations);
            frmExecute.ShowDialog(this);
        }
Exemplo n.º 2
0
        private void updateDalFiles()
        {
            if (edtCN.Text.Trim().Length == 0)
            {
                MessageBox.Show("No database is selected", "Failure", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            if (edtDALPath.Text.Trim().Length == 0)
            {
                MessageBox.Show("No folder for DAL files is selected", "Failure", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            if (edtSchema.Text.Trim().Length == 0)
            {
                MessageBox.Show("No schema is selected", "Failure", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            List<IOperation> operations = new List<IOperation>();
            operations.Add(new ConnectOperation(edtCN.Text));
            operations.Add(new BuildSchemaOperation(edtSchema.Text));
            operations.Add(new UpdateDalOperation(edtDALPath.Text, chkUseCSNaming.Checked));

            FrmExecute frmExecute = new FrmExecute(operations);
            frmExecute.ShowDialog(this);
        }
Exemplo n.º 3
0
        private void updateAll()
        {
            List<IOperation> operations = new List<IOperation>();

            if (edtCN.Text.Trim().Length > 0)
            {
                if (edtDALPath.Text.Trim().Length == 0)
                {
                    MessageBox.Show("No folder for DAL files is selected", "Failure", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }

                if (edtSchema.Text.Trim().Length == 0)
                {
                    MessageBox.Show("No schema is selected", "Failure", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }

                operations.Add(new ConnectOperation(edtCN.Text));
                operations.Add(new BuildSchemaOperation(edtSchema.Text));
                operations.Add(new UpdateDatabaseOperation(edtSchema.Name));
                operations.Add(new UpdateDalOperation(edtDALPath.Text, chkUseCSNaming.Checked));
            }

            if (edtServiceUrl.Text.Trim().Length > 0)
            {
                if (edtDALPath.Text.Trim().Length == 0)
                {
                    MessageBox.Show("No location for generated proxy code is selected", "Failure", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }

                if (cmbLanguage.SelectedItem == null)
                {
                    MessageBox.Show("No language is selected", "Failure", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }

                PlatformInfo platform = cmbLanguage.SelectedItem as PlatformInfo;
                operations.Add(new UpdateProxyOperation(edtServiceUrl.Text, platform.Id, edtDALPath.Text));
            }

            if (operations.Count > 0)
            {
                FrmExecute frmExecute = new FrmExecute(operations);
                frmExecute.ShowDialog(this);
            }
        }
Exemplo n.º 4
0
        private void updateProxy()
        {
            if (edtServiceUrl.Text.Trim().Length == 0)
            {
                MessageBox.Show("No service is selected", "Failure", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            if (edtProxyLocation.Text.Trim().Length == 0)
            {
                MessageBox.Show("No location for generated proxy code is selected", "Failure", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            List<IOperation> operations = new List<IOperation>();
            PlatformInfo platform = cmbLanguage.SelectedItem as PlatformInfo;
            operations.Add(new UpdateProxyOperation(edtServiceUrl.Text, platform.Id, edtProxyLocation.Text));
            FrmExecute frmExecute = new FrmExecute(operations);
            frmExecute.ShowDialog(this);
        }