Ejemplo n.º 1
0
        private void SizeCheckBox_UnChecked(object sender, RoutedEventArgs e)
        {
            var lbSize = this.GetSizeListBox();
            var sizes  = lbSize.ItemsSource as List <ProSizeForSet>;

            if (myRadDataForm.Mode == RadDataFormMode.AddNew)
            {
                sizes.ForEach(s => s.IsHold = false);
            }
            else if (myRadDataForm.Mode == RadDataFormMode.Edit)
            {
                ProStyleBO style     = myRadDataForm.CurrentItem as ProStyleBO;
                var        sizesHold = style.Sizes;

                sizes.ForEach(s =>
                {
                    if (!sizesHold.Any(sh => sh.ID == s.ID))
                    {
                        s.IsHold = false;
                    }
                });
                //BindingExpression binding = lbSize.GetBindingExpression(ListBox.ItemsSourceProperty);
                //binding.UpdateTarget();
            }
        }
Ejemplo n.º 2
0
        private void ColorCheckBox_UnChecked(object sender, RoutedEventArgs e)
        {
            var lbColor = this.GetColorListBox();
            var colors  = lbColor.ItemsSource as List <ProColorForSet>;

            if (myRadDataForm.Mode == RadDataFormMode.AddNew)
            {
                colors.ForEach(c => c.IsHold = false);
            }
            else if (myRadDataForm.Mode == RadDataFormMode.Edit)
            {
                ProStyleBO style      = myRadDataForm.CurrentItem as ProStyleBO;
                var        colorsHold = style.Colors;

                colors.ForEach(c =>
                {
                    if (!colorsHold.Any(ch => ch.ID == c.ID))
                    {
                        c.IsHold = false;
                    }
                });
                //BindingExpression binding = lbSize.GetBindingExpression(ListBox.ItemsSourceProperty);
                //binding.UpdateTarget();
            }
        }
Ejemplo n.º 3
0
 public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
 {
     if (value != null)
     {
         ProStyleBO style = (ProStyleBO)value;
         if (VMGlobal.CurrentUser.OrganizationID != 1)
         {
             return(style.CostPrice * _helper.GetDiscount(style.BrandID, style.Year, style.Quarter, VMGlobal.CurrentUser.OrganizationID) * 0.01M);
         }
         return(style.CostPrice);
     }
     return(null);
 }