internal async void GetPenjualan()
        {
            if (this.PortType != PortType.None)
            {
                this.PenjualanTemporaty.Clear();
                OriginView.Refresh();
                DestinationView.Refresh();
                this.PenjualanTemporaryView.Refresh();
                this.SourceFromDatabase = new List <Models.PenjualanView>();
                if (this.AgentId > 0 && this.PortType != ModelsShared.Models.PortType.None)
                {
                    var result = await Common.ResourcesBase.GetMainWindowViewModel().PenjualanCollection.GetByParameter(new manifestoutgoing {
                        AgentId = this.AgentId, PortType = this.PortType
                    });

                    var customers = Common.ResourcesBase.GetMainWindowViewModel().CustomerCollection.Source;
                    if (result != null && customers != null)
                    {
                        var a = from r in result
                                select new Models.PenjualanView {
                            Id = r.Id, STT = r.STT, Details = r.Details, Shiper = r.Shiper, Reciver = r.Reciver
                        };

                        this.SourceFromDatabase.Clear();
                        foreach (var item in a)
                        {
                            this.SourceFromDatabase.Add(item);
                        }
                    }
                }
            }
        }
        public async void RefreshAll()
        {
            await Task.Delay(200);

            DestinationView.Refresh();
            OriginView.Refresh();
            TotalDestination = DestinationSource.Sum(O => O.Pcs * O.Weight);
            TOtalOrigin      = OriginSource.Sum(O => O.Pcs * O.Weight);
        }
 private void PortCollection_RefreshCompleted()
 {
     OriginView.Refresh();
 }