private async void LoadPenjualan(ModelsShared.Models.Customer value) { if (value != null) { ProgressIsActive = true; this.Invoicedetail.Clear(); SourceView.Refresh(); var x = await MainVM.PenjualanCollection.GetPenjualanNotPaid(value.Id); if (x != null && x.Count > 0) { var r = (from item in x join c in MainVM.CityCollection.Source on item.Reciver.CityID equals c.Id select new ModelsShared.Models.Invoicedetail { PenjualanId = item.Id, Penjualan = item }).ToList(); foreach (var item in r) { item.PropertyChanged += (m, y) => { Item_TotalAction(); Save.CanExecute(null); }; Invoicedetail.Add(item); } } SourceView.Refresh(); ProgressIsActive = false; } }
private void SaveAndPrintAction() { try { if (Save.CanExecute(null)) { Save.Execute(true); Helper.PrintNotaAction(STTModel); } } catch (Exception ex) { throw new SystemException(ex.Message); } }