public ItemUnitVM EditItemUnit(ItemUnitVM c) { DB.tblItemUnit ItemUnit = IMSDB.tblItemUnits.Find(c.ItemUnitId); if (ItemUnit != null) { ItemUnit.ItemUnit = c.ItemUnit; ItemUnit.IsActive = c.IsActive; IMSDB.Entry(ItemUnit).State = EntityState.Modified; IMSDB.SaveChanges(); } return(c); }
public ItemUnitVM AddItemUnit(ItemUnitVM c) { DB.tblItemUnit ItemUnit = IMSDB.tblItemUnits.Add( new DB.tblItemUnit { ItemUnit = c.ItemUnit, IsActive = c.IsActive }); IMSDB.SaveChanges(); c.ItemUnitId = ItemUnit.ItemUnitId; return(c); }
public ItemUnitVM EditItemUnit(ItemUnitVM c) { return(_ItemUnitDL.EditItemUnit(c)); }
public ItemUnitVM AddItemUnit(ItemUnitVM c) { return(_ItemUnitDL.AddItemUnit(c)); }
public int DeleteItemUnit(ItemUnitVM c) { return(_ItemUnitBL.DeleteItemUnit(c.ItemUnitId)); }