public void CreateAndUpdateRackItemLevel(RackItemLevelContract rackItemLevelContract) { var rackitemlevel = irackItemLevelRepository.Get(rackItemLevelContract.Id); if (rackitemlevel != null) { rackitemlevel.CurrentQty = rackItemLevelContract.CurrentQty; rackitemlevel.InQty = rackItemLevelContract.InQty; rackitemlevel.OutQty = rackItemLevelContract.OutQty; rackitemlevel.Item1 = iiItemRepository.Get(rackItemLevelContract.ItemId); rackitemlevel.Rack1 = IRackRepository.Get(rackItemLevelContract.RackId); irackItemLevelRepository.Update(rackitemlevel); } else { RackItemLevel rackItemLevel = new RackItemLevel(); rackItemLevel.CurrentQty = rackItemLevelContract.CurrentQty; rackItemLevel.InQty = rackItemLevelContract.InQty; rackItemLevel.OutQty = rackItemLevelContract.OutQty; rackItemLevel.Item1 = iiItemRepository.Get(rackItemLevelContract.ItemId); rackItemLevel.Rack1 = IRackRepository.Get(rackItemLevelContract.RackId); irackItemLevelRepository.Insert(rackItemLevel); } }
public void SaveCreateOrUpdate(RackItemLevelContract rackItemLevelContract) { var rackitemlevel = IRackItemLevelRepository.Get(rackItemLevelContract.Id); if (rackitemlevel != null) { rackitemlevel.CurrentQuantity = rackItemLevelContract.CurrentQuantity; rackitemlevel.InQuantity = rackItemLevelContract.InQuantity; rackitemlevel.OutQuantity = rackItemLevelContract.OutQuantity; rackitemlevel.Item = IItemRepository.Get(rackItemLevelContract.ItemId); rackitemlevel.Racks = IRackRepository.Get(rackItemLevelContract.RackId); IRackItemLevelRepository.Update(rackitemlevel); } else { rackitemlevel = new RackItemLevel(); rackitemlevel.CurrentQuantity = rackItemLevelContract.CurrentQuantity; rackitemlevel.InQuantity = rackItemLevelContract.InQuantity; rackitemlevel.OutQuantity = rackItemLevelContract.OutQuantity; rackitemlevel.Item = IItemRepository.Get(rackItemLevelContract.ItemId); rackitemlevel.Racks = IRackRepository.Get(rackItemLevelContract.RackId); IRackItemLevelRepository.Insert(rackitemlevel); } }
public void CreateAndUpdateRackItemLevel(RackItemLevelContract rackItemLevelContract) { var rackeitemlevel = IRackItemLevelRepository.Get(rackItemLevelContract.Id); if (rackeitemlevel != null) { //rackeitemlevel.Rack = rackItemLevelContract.RackId; rackeitemlevel.CurrentQuantity = rackItemLevelContract.CurrentQuantity; rackeitemlevel.InQuantity = rackItemLevelContract.InQuantity; rackeitemlevel.OutQuantity = rackItemLevelContract.OutQuantity; rackeitemlevel.Rack = RackRepository.Get(rackItemLevelContract.RackId); rackeitemlevel.Item = ItemRepository.Get(rackItemLevelContract.ItemId); IRackItemLevelRepository.Update(rackeitemlevel); } else { ///halallllllllllllllllllll boro bebnam rackeitemlevel = new RackItemLevel(); rackeitemlevel.CurrentQuantity = rackItemLevelContract.CurrentQuantity; rackeitemlevel.InQuantity = rackItemLevelContract.InQuantity; rackeitemlevel.OutQuantity = rackItemLevelContract.OutQuantity; IRackItemLevelRepository.Insert(rackeitemlevel); } }
public void CreateAndUpdateRackItemLevel(RackItemLevelContract rackItemLevelContract) { var rackitemLevel = IRackItemLevelRepository.Get(rackItemLevelContract.Id); if (rackitemLevel != null) { //save rackitemLevel.Item = IitemRepository.Get(rackItemLevelContract.ItemId); rackitemLevel.Rack = IRackRepository.Get(rackItemLevelContract.RackId); rackitemLevel.CurrentQuantity = rackItemLevelContract.CurrentQuantity; rackitemLevel.InQuantity = rackItemLevelContract.InQuantity; rackitemLevel.OutQuantity = rackItemLevelContract.OutQuantity; IRackItemLevelRepository.Update(rackitemLevel); } else { //creat rackitemLevel = new RackItemLevel(); rackitemLevel.Item = IitemRepository.Get(rackItemLevelContract.ItemId); rackitemLevel.Rack = IRackRepository.Get(rackItemLevelContract.RackId); rackitemLevel.CurrentQuantity = rackItemLevelContract.CurrentQuantity; rackitemLevel.InQuantity = rackItemLevelContract.InQuantity; rackitemLevel.OutQuantity = rackItemLevelContract.OutQuantity; IRackItemLevelRepository.Insert(rackitemLevel); } }
public void Delete(RackItemLevelContract rackItemLevelContract) { var rackitemlevel = irackItemLevelRepository.Get(rackItemLevelContract.Id); if (rackitemlevel != null) { irackItemLevelRepository.Delete(rackitemlevel); } }
public void Delete(RackItemLevelContract rackItemLevelContract) { var rackItemLevel = RackItemLevelRepository.Get(rackItemLevelContract.Id); RackItemLevelRepository.Delete(rackItemLevel); }