コード例 #1
0
        private void Delete_Click(object sender, RoutedEventArgs e)
        {
            if (VM.SelectedDeal is null)
            {
                MessageBox.Show("Choose A Deal");
            }
            else
            {
                //DB_connector.RemoveDeal(VM.SelectedDeal.deal_id);
                foreach (var m in service.shift.deal_list)
                {
                    if (m.deal_id.Equals(VM.SelectedDeal.deal_id))
                    {
                        service.shift.deal_list.Remove(m);
                        //Delete deal in DB
                        DB_connector.DeleteDeal(m.deal_id);
                        break;
                    }
                }


                Window w2 = new View_Deals1(service);
                w2.Show();
                this.Close();
            }
        }
コード例 #2
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            Window win3 = new View_Deals1(service);

            win3.Show();
        }