Ejemplo n.º 1
0
        private Transformer ConvertCycleCountDetailToTransformer(CycleCountDetail cycleCountDetail)
        {
            Transformer transformer = TransformerHelper.ConvertItemToTransformer(cycleCountDetail.Item);

            transformer.Id      = cycleCountDetail.Id;
            transformer.OrderNo = cycleCountDetail.CycleCount.Code;
            transformer.Qty     = cycleCountDetail.Qty;

            return(transformer);
        }
Ejemplo n.º 2
0
    //todo, move to service
    private void ItemInput(string itemCode)
    {
        var query = this.CacheResolver.Transformers.Where(t => t.ItemCode == itemCode && t.TransformerDetails == null).Count();

        if (query > 0)
        {
            throw new BusinessErrorException("Common.Business.Error.EntityExist", itemCode);
        }

        Item        item        = TheItemMgr.CheckAndLoadItem(itemCode);
        Transformer transformer = TransformerHelper.ConvertItemToTransformer(item);

        if (CacheResolver.Transformers == null)
        {
            CacheResolver.Transformers = new List <Transformer>();
        }

        CacheResolver.Transformers.Add(transformer);
        this.ucItemList.ItemInputCallBack(this.CacheResolver.Transformers);
        this.ucItemList.BindList(this.CacheResolver.Transformers, false);
    }