Exemplo n.º 1
0
        public AddPOSSale()
        {
            isInitialized = false;
            InitializeComponent();
            _vm = DataContext as EditPOSOutletSaleViewModel;
            isInitialized = true;
            LabelControls();
            go_back_on_btnCancel_click = true;
            this.Loaded += new RoutedEventHandler(AddPOSSale_Loaded);

#if (KEMSA)
            {
    lblSaleDiscount.Visibility = Visibility.Collapsed;
    txtSalesDiscount.Visibility = Visibility.Collapsed;
    lblReturnablesValue.Visibility = Visibility.Collapsed;
    txtReturnables.Visibility = Visibility.Collapsed;
    lblAmountPaid.Visibility = Visibility.Collapsed;
    txtAmountPaid.Visibility = Visibility.Collapsed;
    PaymentsDataGrid.Visibility = Visibility.Collapsed;
}
#endif
        }
Exemplo n.º 2
0
        void ListPOSSales_Loaded(object sender, RoutedEventArgs e)
        {
            _vm = DataContext as ListPOSSalesViewModel;
            _vm.ClearAndSetup();
            try
            {
                DataPager.txtTotal.Text = _vm.SalesCount.ToString();
                DataPager.txtPage.Text = _vm.CurrentPage.ToString();

                _posvm = ViewModelLocator.EditPOSOutletSaleViewModelPropertyNameStatic;
                _livm = ViewModelLocator.ListInvoicesViewModelStatic;

                SalesTabControl.SelectedIndex = OtherUtilities.SelectedTabPos;
                string _pendingSales = NavigationService.Source.OriginalString.ParseQueryString("PendingSales");
                if (!string.IsNullOrEmpty(_pendingSales))
                    _vm.PendingSales = Convert.ToBoolean(_pendingSales);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }