internal void SetWeight(object sender) { var value = (TypeOfWeight)sender; if (STTModel.Details == null) { STTModel.Details = new List <colly>(); } using (var vm = new Contents.Penjualan.AddCollyVM(value, STTModel.Details)) { if (value != TypeOfWeight.None) { var form = new Contents.Penjualan.AddColly(); form.DataContext = vm; var dlg = new ModernDialog { Title = "Add Item", Content = form }; dlg.ShowDialog(); } } STTModel.SetTotal(); // this.Details = vm.Source; if (STTModel.Details != null && STTModel.Details.Count > 0) { STTModel.TypeOfWeight = value; DetailsIsEmpty = true; } STTModel.TypeOfWeight = value; }
private void ChangeWeightAction() { if (STTModel.Details == null) { STTModel.Details = new List <colly>(); } using (var vm = new Contents.Penjualan.AddCollyVM(STTModel.TypeOfWeight, STTModel.Details)) { if (STTModel.TypeOfWeight != TypeOfWeight.None) { var form = new Contents.Penjualan.AddColly(); form.DataContext = vm; form.ShowDialog(); } } // this.Details = vm.Source; if (STTModel.Details != null && STTModel.Details.Count > 0) { STTModel.SetTotal(); DetailsIsEmpty = true; } }