Exemplo n.º 1
0
 private void NewItemButton_Click(object sender, EventArgs e)
 {
     NewItemForm f = new NewItemForm();
     f.StartPosition = FormStartPosition.CenterParent;
     f.ShowDialog(this);
 }
Exemplo n.º 2
0
 private void dbClickEvent_Click(object sender, EventArgs e)
 {
     SourceGrid.CellContext context = (SourceGrid.CellContext)sender;
     int id = (int)MyItemGrid.Rows[context.Position.Row].Tag;
     Product o = myItemManager.GetProductById(id);
     NewItemForm f = new NewItemForm();
     f.Text = "编辑产品信息";
     f.UpdatedProduct = o;
     f.ShowDialog(this);
 }