Esempio n. 1
0
        private async void EditMethod()
        {
            if (_saleServ.IsExistInRecalls(_selectedSale.ID) || !_saleServ.IsLastSale(_selectedSale.ID))
            {
                await _currentWindow.ShowMessageAsync("فشل التعديل", "لا يمكن تعديل هذه الفاتورة", MessageDialogStyle.Affirmative, new MetroDialogSettings()
                {
                    AffirmativeButtonText = "موافق",
                    DialogMessageFontSize = 25,
                    DialogTitleFontSize   = 30
                });

                return;
            }

            SaleUpdateViewModel.ID = _selectedSale.ID;
            _currentWindow.Hide();
            new SaleUpdateWindow().ShowDialog();
            Load();
            _currentWindow.ShowDialog();
        }
Esempio n. 2
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            int bindingValue = (int)value;

            return(saleServ.IsLastSale(bindingValue));
        }