예제 #1
0
        private void MenuItem_Click_1(object sender, RoutedEventArgs e)
        {
            SelectAccDialog acc = new SelectAccDialog();

            acc.ShowDialog();
            if (acc.DialogResult.HasValue && acc.DialogResult.Value)
            {
                ReportMenuProviderView reportMenuProvider = new ReportMenuProviderView();
                reportMenuProvider.ShowDialog();
                if (reportMenuProvider.DialogResult.HasValue && reportMenuProvider.DialogResult.Value)
                {
                    var oldacc  = Entrence.Mask.CreditAcc;
                    var oldaccd = Entrence.Mask.DebitAcc;
                    Entrence.Mask.CreditAcc = null;
                    Entrence.Mask.DebitAcc  = null;
                    Entrence.Mask.FromDate  = reportMenuProvider.Vm.FromDate();
                    Entrence.Mask.ToDate    = reportMenuProvider.Vm.ToDate();
                    ReportDialog rd = new ReportDialog(new AnaliticRegisterViewModel {
                        FromDate = reportMenuProvider.Vm.FromDate(), ToDate = reportMenuProvider.Vm.ToDate(), AccShortName = acc.Acc, ItemsDebit = acc.ItemsDebit
                    });
                    rd.ShowDialog();
                    Entrence.Mask.CreditAcc = oldacc;
                    Entrence.Mask.DebitAcc  = oldaccd;
                }
            }
        }
예제 #2
0
        private void MenuItem_Click_6(object sender, RoutedEventArgs e)
        {
            SelectTrueContDialog acc = new SelectTrueContDialog();

            acc.ShowDialog();
            if (acc.DialogResult.HasValue && acc.DialogResult.Value)
            {
                SelectAccDialog acc1 = new SelectAccDialog();
                acc1.ShowDialog();
                if (acc1.DialogResult.HasValue && acc1.DialogResult.Value)
                {
                    ReportMenuProviderView reportMenuProvider = new ReportMenuProviderView();
                    reportMenuProvider.ShowDialog();
                    if (reportMenuProvider.DialogResult.HasValue && reportMenuProvider.DialogResult.Value)
                    {
                        var oldacc  = Entrence.Mask.CreditAcc;
                        var oldaccd = Entrence.Mask.DebitAcc;
                        Entrence.Mask.CreditAcc = null;
                        Entrence.Mask.DebitAcc  = null;
                        Entrence.Mask.FromDate  = reportMenuProvider.Vm.FromDate();
                        Entrence.Mask.ToDate    = reportMenuProvider.Vm.ToDate();
                        ReportDialog rd = new ReportDialog(new AnaliticRegisterViewModelTrueContr {
                            FromDate = reportMenuProvider.Vm.FromDate(), ToDate = reportMenuProvider.Vm.ToDate(), ItemsDebit = acc.ItemsDebit, CurrenAcc = acc1.CurrentAcc, Title = (sender as MenuItem).Tag.ToString()
                        });
                        rd.ShowDialog();
                        Entrence.Mask.CreditAcc = oldacc;
                        Entrence.Mask.DebitAcc  = oldaccd;
                    }
                }
            }
        }
예제 #3
0
        private void MenuItem_Click_4(object sender, RoutedEventArgs e)
        {
            ChoiserValutaandAcc acc = new ChoiserValutaandAcc();

            acc.ShowDialog();
            if (acc.DialogResult.HasValue && acc.DialogResult.Value)
            {
                //Mouse.OverrideCursor = System.Windows.Input.Cursors.Wait;
                ReportMenuProviderView reportMenuProvider = new ReportMenuProviderView();
                reportMenuProvider.ShowDialog();
                if (reportMenuProvider.DialogResult.HasValue && reportMenuProvider.DialogResult.Value)
                {
                    var oldacc  = Entrence.Mask.CreditAcc;
                    var oldaccd = Entrence.Mask.DebitAcc;
                    Entrence.Mask.CreditAcc = null;
                    Entrence.Mask.DebitAcc  = null;
                    Entrence.Mask.FromDate  = reportMenuProvider.Vm.FromDate();
                    Entrence.Mask.ToDate    = reportMenuProvider.Vm.ToDate();
                    ReportDialog rd = new ReportDialog(new ValutaExtendedDialog {
                        FromDate = reportMenuProvider.Vm.FromDate(), ToDate = reportMenuProvider.Vm.ToDate(), AccShortName = acc.Acc, VidVal = acc.VidV, CodeClient = acc.CodeClient, Client = acc.Client, Title = (sender as MenuItem).Tag.ToString()
                    });
                    Entrence.Mask.CreditAcc = oldacc;
                    Entrence.Mask.DebitAcc  = oldaccd;
                    rd.ShowDialog();
                }

                //Mouse.OverrideCursor = System.Windows.Input.Cursors.Arrow;
            }
        }
예제 #4
0
        protected override void Update()
        {
            ReportMenuProviderView reportMenuProvider = new ReportMenuProviderView();

            reportMenuProvider.ShowDialog();
            if (reportMenuProvider.DialogResult.HasValue && reportMenuProvider.DialogResult.Value)
            {
                FromDate = reportMenuProvider.Vm.FromDate();
                ToDate   = reportMenuProvider.Vm.ToDate();
            }
        }
예제 #5
0
        private void MenuItem_Click_2(object sender, RoutedEventArgs e)
        {
            ReportMenuProviderView reportMenuProvider = new ReportMenuProviderView();

            reportMenuProvider.ShowDialog();
            if (reportMenuProvider.DialogResult.HasValue && reportMenuProvider.DialogResult.Value)
            {
                var sm = new SearchViewModelAcc(false);
                Entrence.Mask.FromDate = reportMenuProvider.Vm.FromDate();
                Entrence.Mask.ToDate   = reportMenuProvider.Vm.ToDate();
                sm.Hrono = (sender as MenuItem).Tag.ToString();
                sm.AddNewCommand.Execute(null);
            }
        }
예제 #6
0
        private void MenuItem_OnClick(object sender, RoutedEventArgs e)
        {
            ReportMenuProviderView reportMenuProvider = new ReportMenuProviderView();

            reportMenuProvider.ShowDialog();
            if (reportMenuProvider.DialogResult.HasValue && reportMenuProvider.DialogResult.Value)
            {
                var sm = new SearchViewModelWithAcc();
                sm.Tipdnev             = 1;
                Entrence.Mask.FromDate = reportMenuProvider.Vm.FromDate();
                Entrence.Mask.ToDate   = reportMenuProvider.Vm.ToDate();
                ReportDialog rmDialog = new ReportDialog(sm);
                rmDialog.Title = (sender as MenuItem).Tag.ToString();
                rmDialog.ShowDialog();
            }
        }
예제 #7
0
        private void MenuItem_Grouping(object sender, RoutedEventArgs e)
        {
            SelectAccDialog acc = new SelectAccDialog();

            acc.ShowDialog();
            if (acc.DialogResult.HasValue && acc.DialogResult.Value)
            {
                ReportMenuProviderView reportMenuProvider = new ReportMenuProviderView();
                reportMenuProvider.ShowDialog();
                if (reportMenuProvider.DialogResult.HasValue && reportMenuProvider.DialogResult.Value)
                {
                    ReportDialog rd = new ReportDialog(new AnaliticRegisterViewModelContrGrupaDocument {
                        FromDate = reportMenuProvider.Vm.FromDate(), ToDate = reportMenuProvider.Vm.ToDate(), CurrenAcc = acc.CurrentAcc, ItemsDebit = acc.ItemsDebit, Title = (sender as MenuItem).Tag.ToString()
                    });
                    rd.ShowDialog();
                }
            }
        }
예제 #8
0
        protected override void AddNew()
        {
            if (CurrentFirmaWraper == null)
            {
                MessageBoxWrapper.Show("Не сте избрали фирма за почистване");
                return;
            }
            ReportMenuProviderView reportMenuProvider = new ReportMenuProviderView();

            reportMenuProvider.ShowDialog();
            if (reportMenuProvider.DialogResult.HasValue && reportMenuProvider.DialogResult.Value)
            {
                var oldcursor = Mouse.OverrideCursor;
                Mouse.OverrideCursor = System.Windows.Input.Cursors.Wait;
                Context.DeleteContos(CurrentFirmaWraper.Id, reportMenuProvider.Vm.FromDate(), reportMenuProvider.Vm.ToDate());
                Mouse.OverrideCursor = oldcursor;
            }
        }