예제 #1
0
        public void UpdateCommodity(CommodityViewModel commodity)
        {
            var commodityToRemove = _commodityRepository.GetById(commodity.CommodityC);
            var updateCommodity   = Mapper.Map <CommodityViewModel, Commodity_M>(commodity);

            _commodityRepository.Delete(commodityToRemove);
            _commodityRepository.Add(updateCommodity);
            SaveCommodity();
        }
예제 #2
0
 public int Delete(string ids)
 {
     return(_commodityRepository.Delete(ids));
 }
예제 #3
0
 public static bool Delete(int CommodityId)
 {
     return(repository.Delete(CommodityId));
 }