Beispiel #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            OrdersDAL sqlbase;

            sqlbase = new OrdersDAL();
            sqlbase.OpenConnection(ConfigurationManager.ConnectionStrings[
                                       "Vmax44Parser.Properties.Settings.vmax44parserConnectionString"].ToString());
            int orderid = sqlbase.LookUpOrderId(comboBox1.SelectedItem.ToString());

            sqlbase.InsertParsedDataCollection(orderid, dataBase);

            sqlbase.CloseConnection();
        }
Beispiel #2
0
        public Form1()
        {
            InitializeComponent();
            dataBase = new ParsedDataCollection();
            dataCollectionBindingSource.DataSource = dataBase;
            dataGridView1.DataSource = dataCollectionBindingSource;

            OrdersDAL sqlbase = new OrdersDAL();

            sqlbase.OpenConnection(ConfigurationManager.ConnectionStrings[
                                       "Vmax44Parser.Properties.Settings.vmax44parserConnectionString"].ToString());
            DataTable orders = sqlbase.GetAllOrdersAsDataTable();

            foreach (DataRow row in orders.Rows)
            {
                comboBox1.Items.Add(row.Field <string>("OrderNumber"));
            }
            sqlbase.CloseConnection();
        }