Exemplo n.º 1
0
 public EmployeeCardItem(EmployeeCard employee, NormItem normItem)
 {
     EmployeeCard = employee;
     ActiveNormItem = normItem;
     Item = normItem.Item;
     NextIssue = Created = DateTime.Today;
 }
 public static IList<EmployeeCard> GetEmployeesDependenceOnNormItem(IUnitOfWork uow, NormItem item)
 {
     EmployeeCardItem employeeItemAlias = null;
     return uow.Session.QueryOver<EmployeeCard>()
         .JoinQueryOver(e => e.WorkwearItems, () => employeeItemAlias)
         .Where(() => employeeItemAlias.ActiveNormItem == item)
         .List();
 }
Exemplo n.º 3
0
 public virtual void RemoveItem(NormItem item)
 {
     ObservableItems.Remove (item);
 }
Exemplo n.º 4
0
        public virtual void AddItem(ItemsType itemtype)
        {
            if(Items.Any (i => DomainHelper.EqualDomainObjects (i.Item, itemtype)))
            {
                logger.Warn ("Такое наименование уже добавлено. Пропускаем...");
                return;
            }

            var item = new NormItem () {
                Norm = this,
                Item = itemtype,
                Amount = 1,
                NormPeriod = NormPeriodType.Year,
                PeriodCount = 1
            };

            ObservableItems.Add (item);
        }