Пример #1
0
        public static JPK New()
        {
            JPK jpk = new JPK();

            jpk.Naglowek.WariantFormularza = 3;
            jpk.Naglowek.CelZlozenia       = 0; // 1 - nowa deklaracja, 2 - korekta
            DateTime now = DateTime.UtcNow;

            jpk.Naglowek.DataWytworzeniaJPK = new DateTime(now.Year, now.Month, now.Day, now.Hour, now.Minute, now.Second, now.Kind);
            jpk.Naglowek.DataDo             = DateTimeUtils.LastDayOfPreviousMonth;
            jpk.Naglowek.DataOd             = DateTimeUtils.FirstDayOfPreviousMonth;
            jpk.Naglowek.NazwaSystemu       = "JPKEdytor - Open Source";
            return(jpk);
        }
Пример #2
0
 private void _newJPK(object obj)
 {
     if (!IsModified || _queryUnsavedFile())
     {
         _jpk          = JPK.New();
         _jpk.Podmiot1 = _defaultPodmiot.Clone();
         _jpkTitle     = null;
         IsModified    = false;
         NotifyPropertyChanged(nameof(JPKTitle));
         NotifyPropertyChanged(nameof(ContainsJPK));
         NotifyPropertyChanged(nameof(DisplaySummary));
         NotifyPropertyChanged(nameof(Jpk));
     }
 }
Пример #3
0
        public static JPK New()
        {
            JPK jpk = new JPK();

            jpk.Naglowek.WariantFormularza = 2;
            jpk.Naglowek.CelZlozenia       = 1; // 1 - nowa deklaracja, 2 - korekta
            DateTime now = DateTime.UtcNow;

            jpk.Naglowek.DataWytworzeniaJPK = new DateTime(now.Year, now.Month, now.Day, now.Hour, now.Minute, now.Second, now.Kind);
            jpk.Naglowek.DataDo             = DateTimeUtils.LastDayOfPreviousMonth;
            jpk.Naglowek.DataOd             = DateTimeUtils.FirstDayOfPreviousMonth;
            jpk.Naglowek.DomyslnyKodWaluty  = currCode_Type.PLN;
            return(jpk);
        }
Пример #4
0
 public ZakupViewmodel(JPK jpk) : base()
 {
     _zakupy   = new ObservableCollection <ZakupWierszViewmodel>(jpk.ZakupWiersz.Select(z => new ZakupWierszViewmodel(z.Clone())));
     _jpk      = jpk;
     CommandOK = new UICommand {
         ExecuteDelegate = _ok, CanExecuteDelegate = _canOK
     };
     CommandCancel = new UICommand {
         ExecuteDelegate = _cancel
     };
     CommandAddWiersz = new UICommand {
         ExecuteDelegate = _addWiersz
     };
     CommandDeleteWiersz = new UICommand {
         ExecuteDelegate = _deleteWiersz, CanExecuteDelegate = _isWierszSelected
     };
     CommandEditWiersz = new UICommand {
         ExecuteDelegate = _editWiersz, CanExecuteDelegate = _isWierszSelected
     };
 }
Пример #5
0
 public SprzedazViewmodel(JPK jpk) : base()
 {
     _jpk      = jpk;
     _sprzedaz = new ObservableCollection <SprzedazWierszViewmodel>(jpk.SprzedazWiersz.Select(z => new SprzedazWierszViewmodel(z.Clone(), jpk.Podmiot1)));
     CommandOK = new UICommand {
         ExecuteDelegate = _ok, CanExecuteDelegate = _canOK
     };
     CommandCancel = new UICommand {
         ExecuteDelegate = _cancel
     };
     CommandAddWiersz = new UICommand {
         ExecuteDelegate = _addWiersz
     };
     CommandDeleteWiersz = new UICommand {
         ExecuteDelegate = _deleteWiersz, CanExecuteDelegate = _isWierszSelected
     };
     CommandEditWiersz = new UICommand {
         ExecuteDelegate = _editWiersz, CanExecuteDelegate = _isWierszSelected
     };
 }