public void GetData(ref DBQueryUC dBQueryUC)
        {
            //Input Parameter
            List<Property> listProPerty_Input = new List<Property>();

            for (int i = 0; i < dataGridView2.Rows.Count - 1; i++)
            {
                Property property = new Property();
                property.PropertyName = dataGridView2.Rows[i].Cells[0].Value.ToString();
                listProPerty_Input.Add(property);
            }
            dBQueryUC.InputParameter = new InputParameter();
            dBQueryUC.InputParameter.Properties = listProPerty_Input;

            //Output Parameter
            List<Property> listProPerty_Output = new List<Property>();
            for (int i = 0; i < dataGridView3.Rows.Count - 1; i++)
            {
                Property property = new Property();
                property.PropertyName = dataGridView3.Rows[i].Cells[0].Value.ToString();
                listProPerty_Output.Add(property);
            }
            dBQueryUC.OutputParameter = new OutputParameter();
            dBQueryUC.OutputParameter.Properties = listProPerty_Output;

            dBQueryUC.SqlQuery = richTextBox1.Text;
        }
        public FrmConfugurationQuery(DBQueryUC dBQueryUC)
        {
            // TODO: Complete member initialization
            this.dBQueryUC = dBQueryUC;
            InitializeComponent();

            LoadDatabase();
            LoadQueryControl();
        }
Exemple #3
0
        private void button2_Click(object sender, EventArgs e)
        {
            dBQueryUC = new DBQueryUC();

            dBQueryUC.ConnectionString = string.Format(sInput, this.txtDatabaseName.Text.Trim(), this.txtDatabaseServer.Text.Trim(), this.txtUser.Text.Trim(), this.txtPassword.Text.Trim());

            var frmConfugurationQuery = new FrmConfugurationQuery(dBQueryUC);
            frmConfugurationQuery.ShowDialog(this);
            frmConfugurationQuery.GetData(ref  dBQueryUC);

            this.txtSqlQuery.Text = dBQueryUC.SqlQuery;
        }