private void btn_UpdateQuantity(object sender, RoutedEventArgs e)
 {
     if (dg_SelectedInventoryItems.SelectedItem != null)
     {
         DetuctInventoryModel dim  = (DetuctInventoryModel)dg_SelectedInventoryItems.SelectedItem;
         double quantity           = Convert.ToDouble(tb_Quantity.Text);
         DetuctInventoryModel dim1 = list.Find(a => a.id == dim.id);
         dim1.quantity = quantity;
         dg_SelectedInventoryItems.ItemsSource = null;
         dg_SelectedInventoryItems.ItemsSource = list;
     }
 }
 private void btn_Add(object sender, RoutedEventArgs e)
 {
     if (dg_AllInventoryItems.SelectedItem != null)
     {
         tbl_KitchenInventory ki   = (tbl_KitchenInventory)dg_AllInventoryItems.SelectedItem;
         DetuctInventoryModel item = new DetuctInventoryModel();
         item.id       = ki.Id;
         item.name     = ki.Name;
         item.quantity = (double)ki.Quantity;
         list.Add(item);
         dg_SelectedInventoryItems.ItemsSource = null;
         dg_SelectedInventoryItems.ItemsSource = list;
     }
 }