Beispiel #1
0
        private void btnAddNewOrder_Click(object sender, EventArgs e)
        {
            frmAddOrderCustomer f = new frmAddOrderCustomer(this);

            f.StartPosition = FormStartPosition.CenterScreen;
            f.MdiParent     = this.MdiParent;
            f.Show();
        }
Beispiel #2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            try
            {
                //get selected row id and send it to the addorder form
                object  id          = dataGridView1.CurrentRow.Cells["ORDER_id"].Value;
                DataRow selectedRow = dtOrders.Rows.Find(id);

                frmAddOrderCustomer f = new frmAddOrderCustomer(this, selectedRow);
                f.MdiParent     = this.MdiParent;
                f.StartPosition = FormStartPosition.CenterScreen;
                f.Show();
            }
            catch (Exception ex) { }
        }