コード例 #1
0
 void dgvMachines_RowEnter(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         var row = this.dgvMachines.Rows[e.RowIndex];
         if (row == null || row.DataBoundItem == null)
         {
             return;
         }
         if (row.DataBoundItem is DataRowView)
         {
             var drv = row.DataBoundItem as DataRowView;
             this.mySelectedMachine = drv.Row as dsMachines.KundenmaschinenListeRow;
         }
         else if (row.DataBoundItem is dsMachines.KundenmaschinenListeRow)
         {
             this.mySelectedMachine = row.DataBoundItem as dsMachines.KundenmaschinenListeRow;
         }
     }
     catch (Exception ex)
     {
         var err = string.Format("{0}{1}{2}", ex.Message, Environment.NewLine, ex.InnerException);
         MetroMessageBox.Show(this, err, "Catalist - Fehlermeldung", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
コード例 #2
0
 public WartungsVorschlag(dsMachines.KundenmaschinenListeRow baseRow)
 {
     this.myBase = baseRow;
 }