Ejemplo n.º 1
0
        private void OnAddClicked(object sender, RoutedEventArgs e)
        {
            CostEditWindow window = new CostEditWindow(true, 1);

            window.ShowDialog();
            GetItems(false);
        }
Ejemplo n.º 2
0
        private void mainDatagrid_GotMouseCapture(object sender, MouseEventArgs e)
        {
            var person = mainDatagrid.SelectedItem as PharmacyHajiawa.Models.Cost;

            if (person is null)
            {
                return;
            }
            if (person.IsDeleted == true)
            {
                DisplaySheet displaySheet = new DisplaySheet(new List <string>()
                {
                    "گەڕاندنەوە"
                });
                displaySheet.ShowDialog();
                if (DisplaySheet.theResult is "گەڕاندنەوە")
                {
                    query.ExcuteAsync($"update Cost set IsDeleted=0 where CostId={person.CostId}");

                    GetItems(true);
                }
                return;
            }
            CostEditWindow it = new CostEditWindow(false, person.CostId)
            {
            };

            it.ShowDialog();
            GetItems(false);
        }