private void ListBoxItem_Selected_1(object sender, RoutedEventArgs e) { try { DDa.Visibility = Visibility.Hidden; DD.Visibility = Visibility.Visible; DDR.Visibility = Visibility.Hidden; Encode.IsEnabled = false; Encode.Clear(); Encode1.Visibility = Visibility.Hidden; Encode.Visibility = Visibility.Visible; IS_SELECTED = false; is_Repair_Selected = false; Delete.IsEnabled = true; } catch (Exception ex) { } }
private void Repair_Selected(object sender, RoutedEventArgs e) { var obr = new ObservableCollectionCore <Models.RepairView>(); var megaView = new MegaView(); foreach (DataRow item in megaView.GetAllItemsHasSold().Rows) { obr.Add(new Models.RepairView() { ID = item.Field <string>("ID"), conprou = item.Field <string>("conprou"), PRICE = item.Field <string>("PRICE"), DAT = item.Field <string>("DAT"), NAME = item.Field <string>("NAME"), datrec = item.Field <string>("datrec"), discounts = item.Field <string>("discounts"), typeprou = item.Field <string>("typeprou"), isdone = (item.Field <Int64>("isdone") == -1?true:false) }); } DDR.ItemsSource = obr; Resultpri_a.Text = Fos.sumPrice_a(); try { DDa.Visibility = Visibility.Hidden; DD.Visibility = Visibility.Hidden; DDR.Visibility = Visibility.Visible; Encode.IsEnabled = false; Encode.Visibility = Visibility.Hidden; Encode1.IsEnabled = true; Encode1.Visibility = Visibility.Visible; Encode.Clear(); IS_SELECTED = false; is_Repair_Selected = true; Delete.IsEnabled = true; } catch (Exception ex) { } }