示例#1
0
 private void DataGridView1_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     var x = dataGridView1.Rows[e.RowIndex].Cells[0];
     Guid newsItemId = Guid.Empty;
     if (Guid.TryParse(x.ToString(), out newsItemId))
     {
         Form f = new NewsItemEdit(newsItemId);
         f.ShowDialog();
         PopulateForm();
     }
 }
示例#2
0
 private void btNew_Click(object sender, EventArgs e)
 {
     Form newNewItem = new NewsItemEdit();
     newNewItem.Show();
 }