public PenjualanListVM()
 {
     this.IsDeliverys    = new Dictionary <int, bool>();
     this.SMSCommand     = new SMSCommandHandler();
     TypeOfWeights       = Common.ResourcesBase.GetEnumCollection <TypeOfWeight>();
     this.STTOnManifests = new ObservableCollection <Manifestoutgoing>();
     this.ManifestView   = (CollectionView)CollectionViewSource.GetDefaultView(this.STTOnManifests);
     MainVM.PenjualanCollection.SourceView.SortDescriptions.Add(new System.ComponentModel.SortDescription("STT", System.ComponentModel.ListSortDirection.Descending));
     MainVM.PenjualanCollection.SourceView.Filter = FilterItem;
     PrintNota = new Common.CommandHandler {
         CanExecuteAction = PrintNotaValidation, ExecuteAction = PrintNotaAction
     };
     AllDetails = new Common.CommandHandler {
         CanExecuteAction = x => AllDetailValidation(), ExecuteAction = x => AllDetailAction()
     };
     PrintPreviewNota = new Common.CommandHandler {
         CanExecuteAction = PrintNotaValidation, ExecuteAction = PrintPreviewNotaAction
     };
     this.SMSCommand.SendToShiper = new CommandHandler {
         CanExecuteAction = SendToShiperValidate, ExecuteAction = x => SentMessage()
     };
     this.SMSCommand.SendToReciver = new CommandHandler {
         CanExecuteAction = SendToReciverValidate, ExecuteAction = x => SentMessageReciver()
     };
     UpdateDeliveryStatusCommand = new CommandHandler {
         CanExecuteAction = x => UpdateDeliveryStatusValidation(), ExecuteAction = UpdateDeliveryStatusAction
     };
     MainVM.PenjualanCollection.RefreshCompleted += PenjualanCollection_RefreshCompleted;
     RefreshAction(null);
 }
        public ManifestOutGoingCreateVM()
        {
            this.PortTypes         = Common.ResourcesBase.GetEnumCollection <ModelsShared.Models.PortType>();
            this.PortCollection    = Common.ResourcesBase.GetMainWindowViewModel().PortCollection;
            this.OriginView        = (CollectionView)CollectionViewSource.GetDefaultView(this.PortCollection.Source);
            DestinationSource      = new ObservableCollection <port>();
            this.DestinationView   = (CollectionView)CollectionViewSource.GetDefaultView(DestinationSource);
            this.OriginView.Filter = PortFilter;
            DestinationView.Filter = PortFilter;

            this.AgentCollection  = Common.ResourcesBase.GetMainWindowViewModel().AgentCollection;
            BrowseManifestCommand = new CommandHandler {
                CanExecuteAction = x => BrowseManifestCommandValidate(), ExecuteAction = x => BrowseManifestCommandAction()
            };

            this.PenjualanTemporaty     = new List <Models.PenjualanView>();
            this.PenjualanTemporaryView = (CollectionView)CollectionViewSource.GetDefaultView(this.PenjualanTemporaty);
            DeleteSTTFromList           = new CommandHandler {
                CanExecuteAction = x => (STTSelectedItem != null), ExecuteAction = x => DeleteSTTFromListAction()
            };
            Save = new CommandHandler {
                CanExecuteAction = x => SaveValidation(), ExecuteAction = x => SaveAction()
            };
            Preview = new Common.CommandHandler {
                ExecuteAction = x => PreviewAction(), CanExecuteAction = x => PreviewValidation()
            };
            Cancel = new CommandHandler {
                ExecuteAction = CancelAction, CanExecuteAction = x => true
            };
        }