private void NewSupplierButton_Click(object sender, EventArgs e) { SupplierForm f = new SupplierForm(); f.StartPosition = FormStartPosition.CenterParent; f.ShowDialog(this); }
private void dbClickEvent_Click(object sender, EventArgs e) { SourceGrid.CellContext context = (SourceGrid.CellContext)sender; int id = (int)SupplierGrid.Rows[context.Position.Row].Tag; Supplier o = supplierManager.GetSupplierById(id); SupplierForm f = new SupplierForm(); f.Text = "编辑供应商信息"; f.UpdateSupplier = o; f.ShowDialog(this); }