Пример #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            frmAddSupplier f = new frmAddSupplier(this);

            f.MdiParent     = this.MdiParent;
            f.StartPosition = FormStartPosition.CenterScreen;
            f.Show();
        }
Пример #2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            try
            {
                object id = dataGridView1.CurrentRow.Cells["SUPPLIER_id"].Value;

                DataRow selectedRow = dtSuppliers.Rows.Find(id);

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