Beispiel #1
0
 private void BtSave_Click(object sender, EventArgs e)
 {
     foreach (DataGridViewRow gridRow in gridMapping.Rows)
     {
         Party newParty = new Party
         {
             NameLong  = gridRow.Cells[3].Value?.ToString(),
             NameShort = gridRow.Cells[3].FormattedValue?.ToString()
         };
         if (String.IsNullOrEmpty(newParty.NameLong))
         {
             newParty.NameShort = gridRow.Cells[1].FormattedValue.ToString();
             newParty.NameLong  = gridRow.Cells[2].FormattedValue.ToString();
             partyCtr.AddParty(newParty);
             //MessageBox.Show(newParty.NameShort + " – " + newParty.NameLong);
         }
     }
 }