public SprzedazWierszViewmodel(JPKSprzedazWiersz wiersz, JPKPodmiot1 daneWlasne) : base(wiersz)
 {
     _daneWlasne            = daneWlasne;
     CommandWstawDaneWlasne = new UICommand {
         ExecuteDelegate = _wstawDaneWlasne
     };
 }
 public JPK()
 {
     this.zakupCtrlField      = new JPKZakupCtrl();
     this.zakupWierszField    = new List <JPKZakupWiersz>();
     this.sprzedazCtrlField   = new JPKSprzedazCtrl();
     this.sprzedazWierszField = new List <JPKSprzedazWiersz>();
     this.podmiot1Field       = new JPKPodmiot1();
     this.naglowekField       = new TNaglowek();
 }
Exemple #3
0
 public PodmiotViewmodel(JPKPodmiot1 podmiot) : base(podmiot)
 {
     CommandOK = new UICommand {
         ExecuteDelegate = _ok, CanExecuteDelegate = _canOK
     };
     CommandCancel = new UICommand {
         ExecuteDelegate = _cancel
     };
 }
 public ImportExcelViewmodel(JPKPodmiot1 daneWlasne)
 {
     _daneWlasne      = daneWlasne;
     CommandReadExcel = new UICommand {
         ExecuteDelegate = _readExcel
     };
     CommandOK = new UICommand {
         ExecuteDelegate = _ok, CanExecuteDelegate = _canOK
     };
     CommandCancel = new UICommand {
         ExecuteDelegate = _cancel
     };
     CommandEditWiersz = new UICommand {
         ExecuteDelegate = _editWiersz, CanExecuteDelegate = _canEditWiersz
     };
 }
        public MainWindowViewmodel()
        {
            _createCommands();
            IsModified = false;
            string podmiotFileName = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), APP_DATA_PATH, DEFAULT_PODMIOT_FILE);

            if (File.Exists(podmiotFileName))
            {
                XmlSerializer serializer = new XmlSerializer(typeof(JPKPodmiot1));
                using (StreamReader reader = new StreamReader(podmiotFileName))
                    _defaultPodmiot = (JPKPodmiot1)serializer.Deserialize(reader);
            }
            else
            {
                _defaultPodmiot = new JPKPodmiot1();
            }
        }