Пример #1
0
 public ItemTypeVM EditItemType(ItemTypeVM c)
 {
     DB.tblItemType ItemType = IMSDB.tblItemTypes.Find(c.ItemTypeId);
     if (ItemType != null)
     {
         ItemType.ItemType           = c.ItemType;
         ItemType.IsActive           = c.IsActive;
         IMSDB.Entry(ItemType).State = EntityState.Modified;
         IMSDB.SaveChanges();
     }
     return(c);
 }
Пример #2
0
 public ItemTypeVM AddItemType(ItemTypeVM c)
 {
     DB.tblItemType ItemType = IMSDB.tblItemTypes.Add(
         new DB.tblItemType
     {
         ItemType = c.ItemType,
         IsActive = c.IsActive
     });
     IMSDB.SaveChanges();
     c.ItemTypeId = ItemType.ItemTypeId;
     return(c);
 }
 public int DeleteItemType(ItemTypeVM c)
 {
     return(_ItemTypeBL.DeleteItemType(c.ItemTypeId));
 }
 public ItemTypeVM EditItemType(ItemTypeVM c)
 {
     return(_ItemTypeBL.EditItemType(c));
 }
 public ItemTypeVM AddItemType(ItemTypeVM c)
 {
     return(_ItemTypeBL.AddItemType(c));
 }