示例#1
0
        private void AddNewSite_Click(object sender, EventArgs e)
        {
            var res = new SaveOrAdd().ShowDialog();

            if (res == DialogResult.OK)
            {
                Draw();
            }
        }
示例#2
0
 private void editToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (dataGridView_item.CurrentCell != null)
     {
         int rowindex = dataGridView_item.CurrentCell.RowIndex;
         if (rowindex != -1)
         {
             var keep = index;
             index = rowindex;
             var entry = database[rowindex];
             var res   = new SaveOrAdd(entry).ShowDialog();
             if (res == DialogResult.OK)
             {
                 Draw();
                 index = keep;
             }
         }
     }
 }