コード例 #1
0
        //Open files in GUI with WebMethods
        private void button1_Click(object sender, EventArgs e)
        {
            Object selectedItem = comboBoxINT1.SelectedItem;
            var    selected     = this.comboBoxINT1.GetItemText(this.comboBoxINT1.SelectedItem);
            string choosenData  = selected;

            if (choosenData.Equals("Mats Merged"))
            {
                NewWebRef.WebServiceERP12SoapClient client = new NewWebRef.WebServiceERP12SoapClient();
                string chosenData = client.ShowFile("Mats.txt");
                richTextBoxINT1.Text = chosenData;
            }
            else if (choosenData.Equals("Errorgan"))
            {
                NewWebRef.WebServiceERP12SoapClient client = new NewWebRef.WebServiceERP12SoapClient();
                string chosenData = client.ShowFile("Erdogan.txt");
                richTextBoxINT1.Text = chosenData;
            }
        }
コード例 #2
0
        //Run Queries from CRONUS database
        private void runButton_Click(object sender, EventArgs e)
        {
            Object selectedItem = comboBoxChooseData.SelectedItem;
            var    selected     = this.comboBoxChooseData.GetItemText(this.comboBoxChooseData.SelectedItem);
            string choosenData  = selected;

            if (choosenData.Equals("Content and metadata for Employee tables"))
            {
                dataGridView3.Rows.Clear();
                NewWebRef.WebServiceERP12SoapClient c = new NewWebRef.WebServiceERP12SoapClient();
                List <string> listOfRelatives         = new List <string>(c.ShowContentOfCronusDataTable());
                dataGridView3.Columns.Add(" ", " ");
                foreach (string s in listOfRelatives)
                {
                    dataGridView3.Rows.Add(s);
                }
            }
            else if (choosenData.Equals("Employees and their relatives"))
            {
                dataGridView3.Rows.Clear();
                NewWebRef.WebServiceERP12SoapClient c = new NewWebRef.WebServiceERP12SoapClient();
                List <string> listOfRelatives         = new List <string>(c.EmployeeAndRelatives());
                dataGridView3.Columns.Add(" ", " ");
                foreach (string s in listOfRelatives)
                {
                    dataGridView3.Rows.Add(s);
                }
            }
            else if (choosenData.Equals("Sick employees 2004"))
            {
                dataGridView3.Rows.Clear();
                NewWebRef.WebServiceERP12SoapClient c = new NewWebRef.WebServiceERP12SoapClient();
                List <string> listOfRelatives         = new List <string>(c.ShowSickEmployees2004());
                dataGridView3.Columns.Add(" ", " ");
                foreach (string s in listOfRelatives)
                {
                    dataGridView3.Rows.Add(s);
                }
            }
            else if (choosenData.Equals("Most absent employee"))
            {
                dataGridView3.Rows.Clear();
                NewWebRef.WebServiceERP12SoapClient c = new NewWebRef.WebServiceERP12SoapClient();
                List <string> listOfRelatives         = new List <string>(c.MostAbsentEmployees());
                dataGridView3.Columns.Add(" ", " ");
                foreach (string s in listOfRelatives)
                {
                    dataGridView3.Rows.Add(s);
                }
            }
            else if (choosenData.Equals("Metadata: Keys"))
            {
                dataGridView3.Rows.Clear();
                NewWebRef.WebServiceERP12SoapClient c = new NewWebRef.WebServiceERP12SoapClient();
                List <string> listOfRelatives         = new List <string>(c.AllKeys());
                dataGridView3.Columns.Add(" ", " ");
                foreach (string s in listOfRelatives)
                {
                    dataGridView3.Rows.Add(s);
                }
            }
            else if (choosenData.Equals("Metadata: Indexes"))
            {
                dataGridView3.Rows.Clear();
                NewWebRef.WebServiceERP12SoapClient c = new NewWebRef.WebServiceERP12SoapClient();
                List <string> listOfRelatives         = new List <string>(c.AllIndexes());
                dataGridView3.Columns.Add(" ", " ");
                foreach (string s in listOfRelatives)
                {
                    dataGridView3.Rows.Add(s);
                }
            }
            else if (choosenData.Equals("Metadata: Table constraint"))
            {
                dataGridView3.Rows.Clear();
                NewWebRef.WebServiceERP12SoapClient c = new NewWebRef.WebServiceERP12SoapClient();
                List <string> listOfRelatives         = new List <string>(c.AllTableConstrains());
                dataGridView3.Columns.Add(" ", " ");
                foreach (string s in listOfRelatives)
                {
                    dataGridView3.Rows.Add(s);
                }
            }
            else if (choosenData.Equals("Metadata: All tables"))
            {
                dataGridView3.Rows.Clear();
                NewWebRef.WebServiceERP12SoapClient c = new NewWebRef.WebServiceERP12SoapClient();
                List <string> listOfRelatives         = new List <string>(c.AllTablesInDatabaseSolOne());
                dataGridView3.Columns.Add(" ", " ");
                foreach (string s in listOfRelatives)
                {
                    dataGridView3.Rows.Add(s);
                }
            }
            else if (choosenData.Equals("Metadata: All columns"))
            {
                dataGridView3.Rows.Clear();
                NewWebRef.WebServiceERP12SoapClient c = new NewWebRef.WebServiceERP12SoapClient();
                List <string> listOfRelatives         = new List <string>(c.AllColEmpTableSolOne());
                dataGridView3.Columns.Add(" ", " ");
                foreach (string s in listOfRelatives)
                {
                    dataGridView3.Rows.Add(s);
                }
            }
        }