public STTCreateModel(ModelsShared.Models.Penjualan result) { IsOld = true; if (result != null) { Actived = result.Actived; ChangeDate = result.ChangeDate; FromCity = result.FromCity; ToCity = result.ToCity; Content = result.Content; CustomerIdIsPay = result.CustomerIdIsPay; CustomerIsPay = result.CustomerIsPay; DeliveryStatus = result.DeliveryStatus; Colly = result.Colly; DoNumber = result.DoNumber; Etc = result.Etc; Id = result.Id; Note = result.Note; PackingCosts = result.PackingCosts; PayType = result.PayType; Pcs = result.Pcs; PortType = result.PortType; Price = result.Price; ShiperID = result.ShiperID; ReciverID = result.ReciverID; Shiper = result.Shiper; Reciver = result.Reciver; STT = result.STT; TypeOfWeight = result.TypeOfWeight; Tax = result.Tax; UpdateDate = result.UpdateDate; UserID = result.UserID; IsPaid = result.IsPaid; } }
private async void GetSendedInformation(ModelsShared.Models.Penjualan _selected) { var result = await MainVM.ManifestOutgoingCollection.ManifestsByPenjualanId(_selected.Id); STTOnManifests.Clear(); if (result != null) { foreach (var item in result) { this.STTOnManifests.Add(item); } this.ManifestView.Refresh(); } }
private async void GetThumbs(ModelsShared.Models.Penjualan selectedItem) { var context = ResourcesBase.GetMainWindowViewModel().PenjualanCollection; var result = await context.GetPhotoByPenjualanId(selectedItem.Id); if (result != null) { foreach (var item in result) { Galeries.Add(item); } GaleriesView.Refresh(); } }
public async void SetManifest(ModelsShared.Models.Penjualan p) { var result = await MainVM.ManifestOutgoingCollection.ManifestsByPenjualanId(p.Id); if (result != null) { ManifestSource.Clear(); foreach (var item in result) { var m = await MainVM.ManifestOutgoingCollection.GetItemById(item.Id); this.ManifestSource.Add(m); } this.ManifestView.Refresh(); } }
private async void SetInvoice(ModelsShared.Models.Penjualan selected) { var context = ResourcesBase.GetMainWindowViewModel().InvoiceCollections; var x = await context.GetInvoiceForPenjualanInfo(selected.Id); if (x != null) { this.InvoiceStatusView = new ModelsShared.Models.Invoice { Number = x.Number, CreateDate = x.CreateDate, IsDelivery = x.IsDelivery, InvoiceStatus = x.InvoiceStatus }; } }
public PenjualanInfoVM(ModelsShared.Models.Penjualan selectedItem) { Galeries = new List <ModelsShared.Photo>(); GaleriesView = (CollectionView)CollectionViewSource.GetDefaultView(Galeries); this.PenjualanItem = selectedItem; STTQRCode = Helper.GenerateQRCode(selectedItem.STT.ToString(), 100); this.ManifestSource = new ObservableCollection <ModelsShared.Models.Manifestoutgoing>(); this.ManifestView = (CollectionView)CollectionViewSource.GetDefaultView(ManifestSource); SetManifest(selectedItem); SetInvoice(selectedItem); GetThumbs(selectedItem); AddNewPicture = new CommandHandler { CanExecuteAction = x => true, ExecuteAction = AddNewPictureAction }; PrintPicture = new CommandHandler { CanExecuteAction = x => SelectedPhoto != null, ExecuteAction = PrintPictureAction }; DeletePicture = new CommandHandler { CanExecuteAction = x => SelectedPhoto != null, ExecuteAction = DeletePictureAction }; }