void AddLaborItem(LaborItemComponent c, StyleViewModel svm, int keyVal)
        {
            int laborItemId        = c.Id == 0 ? keyVal : c.Id;
            StyleLaborTableItem sl = new StyleLaborTableItem()
            {
                StyleId      = svm.Style.Id,
                LaborTableId = c.laborItemId.Value,
                Qty          = c.Qty.Value
            };

            db.StyleLaborItems.Add(sl);
        }
        public bool ValidLaborItem(LaborItemComponent lic)
        {
            if (lic.State == LMState.Unadded || lic.State == LMState.Deleted)
            {
                return(true);
            }
            if (string.IsNullOrEmpty(lic.Name))
            {
                throw new OjMissingLaborException("You must enter a Name!");
            }

            return(true);
        }