private void GV_ViewDish_CellClick(object sender, DataGridViewCellEventArgs e) { if (GV_ViewDish.Columns[e.ColumnIndex].Name == "Editcol") { DataGridViewRow dr = GV_ViewDish.Rows[e.RowIndex]; Object data = dr.DataBoundItem; Entity.Dish dish = (Entity.Dish)data; int ID = dish.ID; Add_new_dish update = new Add_new_dish(ID); update.Visible = true; } }
private void button2_Click(object sender, EventArgs e) { Add_new_dish add = new Add_new_dish(); add.Visible = true; }