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); }
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)); } }
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); }
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 }; }
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 }; }