コード例 #1
0
        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;
        }
コード例 #2
0
        private void ChangeWeightAction()
        {
            try
            {
                if (STTModel.Colly == null)
                {
                    STTModel.Colly = new List <Colly>();
                }
                using (var vm = new Contents.Penjualan.AddCollyVM(STTModel.TypeOfWeight, STTModel.Colly))
                {
                    if (STTModel.TypeOfWeight != TypeOfWeight.None)
                    {
                        var form = new Contents.Penjualan.AddColly
                        {
                            DataContext = vm
                        };
                        form.ShowDialog();
                    }
                }
                // this.Details = vm.Source;

                if (STTModel.Colly != null && STTModel.Colly.Count > 0)
                {
                    STTModel.SetTotal();
                    DetailsIsEmpty = true;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
コード例 #3
0
        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;
            }
        }