Esempio n. 1
0
 private int GetIdFromRow()
 {
     try
     {
         return(Convert.ToInt32(dataGridViewAllRecepts.Rows[dataGridViewAllRecepts.SelectedCells[0].RowIndex].Cells["col1"].Value));
     }
     catch (Exception ex)
     {
         DBConnect.ShowError(ex.ToString());
         return(0);
     }
 }
Esempio n. 2
0
 private void buttonDelIngredient_Click(object sender, EventArgs e)
 {
     try
     {
         uniqIngridients.Remove(listBoxReceptByIngredients.SelectedItem.ToString());
         listBoxReceptByIngredients.DataSource = uniqIngridients.ToList();
     }
     catch (Exception ex)
     {
         DBConnect.ShowError(ex.ToString());
     }
 }