Пример #1
0
        protected void ConfigureInputs(NomenclatureCategory selected, TareVolume?tareVolume)
        {
            radioEquipment.Sensitive = selected == NomenclatureCategory.equipment;
            enumSaleCategory.Visible = lblSaleCategory.Visible = Nomenclature.GetCategoriesWithSaleCategory().Contains(selected);
            enumDepositType.Visible  = lblSubType.Visible = selected == NomenclatureCategory.deposit;

            spinWeight.Sensitive        = !(selected == NomenclatureCategory.service || selected == NomenclatureCategory.deposit);
            spinVolume.Sensitive        = !(selected == NomenclatureCategory.service || selected == NomenclatureCategory.deposit);
            lblPercentForMaster.Visible = spinPercentForMaster.Visible = (selected == NomenclatureCategory.master);
            labelManufacturer.Sensitive = referenceManufacturer.Sensitive = (selected == NomenclatureCategory.equipment);
            labelColor.Sensitive        = referenceColor.Sensitive = (selected == NomenclatureCategory.equipment);
            labelClass.Sensitive        = yentryrefEqupmentType.Sensitive = (selected == NomenclatureCategory.equipment);
            labelModel.Sensitive        = entryModel.Sensitive = (selected == NomenclatureCategory.equipment);
            labelSerial.Sensitive       = checkSerial.Sensitive = (selected == NomenclatureCategory.equipment);
            labelRentPriority.Sensitive = ycheckRentPriority.Sensitive = (selected == NomenclatureCategory.equipment);
            labelReserve.Sensitive      = checkNotReserve.Sensitive = !(selected == NomenclatureCategory.service || selected == NomenclatureCategory.deposit);
            labelCanPrintPrice.Visible  = checkcanPrintPrice.Visible = Entity.Category == NomenclatureCategory.water && !Entity.IsDisposableTare;

            labelTypeTare.Visible      = hboxTare.Visible = selected == NomenclatureCategory.water;
            hboxBottleCapColor.Visible = tareVolume == TareVolume.Vol19L;
            hboxTareChecks.Sensitive   = selected == NomenclatureCategory.bottle;
            lblFuelType.Visible        = ycomboFuelTypes.Visible = selected == NomenclatureCategory.fuel;
            //FIXME запуск оборудования - временный фикс
            //if (Entity.Category == NomenclatureCategory.equipment)
            //Entity.Serial = true;
        }
Пример #2
0
 public NomenclatureDependsFromVM(Nomenclature nomenclature) : this()
 {
     this.excludingIds = new List <int>(nomenclature.Id);
     if (nomenclature.DependsOnNomenclature != null)
     {
         excludingIds.Add(nomenclature.DependsOnNomenclature.Id);
     }
     this.nomenclatureCategory = nomenclature.Category;
 }
Пример #3
0
        protected void ConfigureInputs(NomenclatureCategory selected)
        {
            enumDepositType.Visible      = selected == NomenclatureCategory.deposit;
            enumEquipmentSubtype.Visible = radioEuqpment.Sensitive = selected == NomenclatureCategory.equipment;
            labelSubType.Visible         = (selected == NomenclatureCategory.deposit || selected == NomenclatureCategory.equipment);
            spinWeight.Sensitive         = !(selected == NomenclatureCategory.service || selected == NomenclatureCategory.rent || selected == NomenclatureCategory.deposit);
            spinVolume.Sensitive         = !(selected == NomenclatureCategory.service || selected == NomenclatureCategory.rent || selected == NomenclatureCategory.deposit);
            lblPercentForMaster.Visible  = spinPercentForMaster.Visible = (selected == NomenclatureCategory.master);
            labelManufacturer.Sensitive  = referenceManufacturer.Sensitive = (selected == NomenclatureCategory.equipment);
            labelColor.Sensitive         = referenceColor.Sensitive = (selected == NomenclatureCategory.equipment);
            labelClass.Sensitive         = yentryrefEqupmentType.Sensitive = (selected == NomenclatureCategory.equipment);
            labelModel.Sensitive         = entryModel.Sensitive = (selected == NomenclatureCategory.equipment);
            labelSerial.Sensitive        = checkSerial.Sensitive = (selected == NomenclatureCategory.equipment);
            labelRentPriority.Sensitive  = ycheckRentPriority.Sensitive = (selected == NomenclatureCategory.equipment);
            labelReserve.Sensitive       = checkNotReserve.Sensitive = !(selected == NomenclatureCategory.service || selected == NomenclatureCategory.rent || selected == NomenclatureCategory.deposit);
            labelCanPrintPrice.Visible   = checkcanPrintPrice.Visible = Entity.Category == NomenclatureCategory.water && !Entity.IsDisposableTare;

            labelTypeTare.Visible = hboxTare.Visible = selected == NomenclatureCategory.water;
            labelBottle.Sensitive = ycheckNewBottle.Sensitive = ycheckDefectiveBottle.Sensitive = selected == NomenclatureCategory.bottle;
            //FIXME запуск оборудования - временный фикс
            //if (Entity.Category == NomenclatureCategory.equipment)
            //Entity.Serial = true;
        }
 public QueryOver <Nomenclature> NomenclatureByCategory(NomenclatureCategory category)
 {
     return(QueryOver.Of <Nomenclature>()
            .Where(n => n.Category == category)
            .Where(n => !n.IsArchive));
 }
 /// <summary>
 /// Содержит ли основание скидки соответствующую категорию номенклатуры
 /// </summary>
 /// <param name="nomenclatureCategory">Категория номенклатуры</param>
 /// <param name="discountNomenclatureCategories">Список категорий номенклатур у основания скидки</param>
 /// <returns>true/false</returns>
 private bool ContainsNomenclatureCategory(
     NomenclatureCategory nomenclatureCategory, IList <DiscountReasonNomenclatureCategory> discountNomenclatureCategories)
 {
     return(discountNomenclatureCategories.Any(x => x.NomenclatureCategory == nomenclatureCategory));
 }
Пример #6
0
 public static QueryOver <Nomenclature> NomenclatureByCategory(NomenclatureCategory category) => repository.NomenclatureByCategory(category);