public void RemovePickListResult(PickListResult pickListResult)
 {
     if (this.PickListResults != null)
     {
         this.PickListResults.Remove(pickListResult);
     }
 }
Ejemplo n.º 2
0
 public void PickList(Resolver resolver)
 {
     PickList pickList = pickListMgr.CheckAndLoadPickList(resolver.Code);
     pickList.PickListDetails = new List<PickListDetail>();
     if (resolver.Transformers != null)
     {
         foreach (Transformer transformer in resolver.Transformers)
         {
             PickListDetail pickListDetail = pickListDetailMgr.LoadPickListDetail(transformer.Id, true);
             if (transformer != null)
             {
                 foreach (TransformerDetail transformerDetail in transformer.TransformerDetails)
                 {
                     if (transformerDetail != null && transformerDetail.HuId != null && transformerDetail.HuId != string.Empty
                         && transformerDetail.CurrentQty != 0)
                     {
                         PickListResult pickListResult = new PickListResult();
                         //pickListResult.LocationLotDetail = locationLotDetailMgr.LoadLocationLotDetail(transformerDetail.LocationLotDetId);
                         pickListResult.LocationLotDetail = locationLotDetailMgr.CheckLoadHuLocationLotDetail(transformerDetail.HuId);
                         pickListResult.PickListDetail = pickListDetail;
                         pickListResult.Qty = transformerDetail.CurrentQty * pickListDetail.OrderLocationTransaction.UnitQty;
                         pickListDetail.AddPickListResult(pickListResult);
                     }
                 }
             }
             pickList.AddPickListDetail(pickListDetail);
         }
     }
     pickListMgr.DoPick(pickList, resolver.UserCode);
     resolver.Result = languageMgr.TranslateMessage("MasterData.PickList.Pick.Successfully", resolver.UserCode, resolver.Code);
     resolver.Transformers = null;
     resolver.Command = BusinessConstants.CS_BIND_VALUE_TRANSFORMER;
 }
Ejemplo n.º 3
0
 public void RemovePickListResult(PickListResult pickListResult)
 {
     if (this.PickListResults != null)
     {
         this.PickListResults.Remove(pickListResult);
     }
 }
        public void AddPickListResult(PickListResult pickListResult)
        {
            if (this.PickListResults == null)
            {
                this.PickListResults = new List<PickListResult>();
            }

            this.PickListResults.Add(pickListResult);
        }
Ejemplo n.º 5
0
        public void AddPickListResult(PickListResult pickListResult)
        {
            if (this.PickListResults == null)
            {
                this.PickListResults = new List <PickListResult>();
            }

            this.PickListResults.Add(pickListResult);
        }
    public void DoPick()
    {
        if (ConfirmEvent != null)
        {
            int resultCount = 0;
            PickList pickList = ThePickListMgr.LoadPickList(this.PickListNo);
            pickList.PickListDetails = new List<PickListDetail>();
            foreach (GridViewRow row in GV_List.Rows)
            {
                Label lblLoc = (Label)row.FindControl("lblLoc");

                HiddenField hfId = (HiddenField)row.FindControl("hfId");
                Hu_HuInput ucHuInput = (Hu_HuInput)row.FindControl("ucHuInput");

                PickListDetail pickListDetail = ThePickListDetailMgr.LoadPickListDetail(int.Parse(hfId.Value), true);

                IList<Hu> huList = ucHuInput.GetHuList();
                if (huList != null && huList.Count > 0)
                {
                    foreach (Hu hu in huList)
                    {
                        IList<LocationLotDetail> locationLotDetailList = TheLocationLotDetailMgr.GetHuLocationLotDetail(lblLoc.Text.Trim(), hu.HuId);
                        if (locationLotDetailList != null && locationLotDetailList.Count > 0)
                        {
                            PickListResult pickListResult = new PickListResult();
                            pickListResult.LocationLotDetail = locationLotDetailList[0];
                            pickListResult.PickListDetail = pickListDetail;
                            pickListResult.Qty = hu.Qty * pickListDetail.OrderLocationTransaction.UnitQty;
                            pickListDetail.AddPickListResult(pickListResult);

                            resultCount++;
                        }
                    }

                }
                pickList.AddPickListDetail(pickListDetail);
            }

            if (resultCount == 0)
            {
                ShowErrorMessage("MasterData.No.PickListResult");
                return;
            }
            try
            {
                ThePickListMgr.DoPick(pickList, this.CurrentUser);
                ShowSuccessMessage("MasterData.PickList.Pick.Successfully", pickList.PickListNo);
                ConfirmEvent(this.PickListNo, null);
            }
            catch (BusinessErrorException ex)
            {
                ShowErrorMessage(ex);
            }
        }
    }
 public virtual void DeletePickListResult(PickListResult entity)
 {
     Delete(entity);
 }
 public virtual void UpdatePickListResult(PickListResult entity)
 {
     Update(entity);
 }
 public virtual void CreatePickListResult(PickListResult entity)
 {
     Create(entity);
 }
Ejemplo n.º 10
0
 public virtual void UpdatePickListResult(PickListResult entity)
 {
     entityDao.UpdatePickListResult(entity);
 }
Ejemplo n.º 11
0
 public virtual void DeletePickListResult(PickListResult entity)
 {
     entityDao.DeletePickListResult(entity);
 }
Ejemplo n.º 12
0
 public virtual void CreatePickListResult(PickListResult entity)
 {
     entityDao.CreatePickListResult(entity);
 }
Ejemplo n.º 13
0
        public static TransformerDetail ConvertPickListResultToTransformerDetail(PickListResult pickListResult)
        {
            TransformerDetail transformerDetail = ConvertOrderLocationTransactionToTransformerDetail(pickListResult.PickListDetail.OrderLocationTransaction);
            transformerDetail.HuId = pickListResult.LocationLotDetail.Hu.HuId;
            transformerDetail.LotNo = pickListResult.LocationLotDetail.LotNo;
            transformerDetail.Qty = pickListResult.Qty / pickListResult.PickListDetail.OrderLocationTransaction.UnitQty;
            transformerDetail.CurrentQty = transformerDetail.Qty;//单位换算

            return transformerDetail;
        }
    private void HuScan(Hu hu)
    {
        bool isMatch = false;

        #region 按Hu拣货
        if (this.PickBy == BusinessConstants.CODE_MASTER_PICKBY_HU)
        {
            foreach (GridViewRow row in GV_List.Rows)
            {
                Label lblOrderQty = (Label)row.FindControl("lblOrderQty");
                TextBox tbShipQty = (TextBox)row.FindControl("tbShipQty");
                Label lblHuId = (Label)row.FindControl("lblHuId");
                Label lblLoc = (Label)row.FindControl("lblLoc");
                Label lblStorageBin = (Label)row.FindControl("lblStorageBin");
                HiddenField hfId = (HiddenField)row.FindControl("hfId");
                Hu_HuInput ucHuInput = (Hu_HuInput)row.FindControl("ucHuInput");
                if (ucHuInput.CheckExist(hu.HuId))
                {
                    this.lblMessage.Text = Resources.Language.MasterDataHuExist;
                    break;
                }
                if (hu.HuId == lblHuId.Text.Trim())
                {
                    IList<LocationLotDetail> locationLotDetList = TheLocationLotDetailMgr.GetHuLocationLotDetail(hu.HuId);
                    if (locationLotDetList != null && locationLotDetList.Count > 0)
                    {
                        LocationLotDetail locLotDet = locationLotDetList[0];
                        if (locLotDet.Location.Code == lblLoc.Text.Trim() && (locLotDet.StorageBin == null || locLotDet.StorageBin.Code.ToUpper() == lblStorageBin.Text.Trim().ToUpper()))
                        {
                            decimal orderQty = lblOrderQty.Text.Trim() == string.Empty ? 0 : decimal.Parse(lblOrderQty.Text.Trim());
                            decimal shipQty = tbShipQty.Text.Trim() == string.Empty ? 0 : decimal.Parse(tbShipQty.Text.Trim());
                            if (orderQty >= shipQty + hu.Qty)
                            {
                                ucHuInput.HuInput(hu);
                                tbShipQty.Text = ucHuInput.SumQty().ToString("F2");
                                PickListResult pickListResult = new PickListResult();
                                pickListResult.LocationLotDetail = locLotDet;
                                pickListResult.PickListDetail = ThePickListDetailMgr.LoadPickListDetail(int.Parse(hfId.Value));
                                pickListResult.Qty = hu.Qty;

                                isMatch = true;
                                InitialHuScan();
                                break;
                            }
                        }
                    }
                }
            }
        }
        #endregion

        #region 按LotNo拣货
        else if (this.PickBy == BusinessConstants.CODE_MASTER_PICKBY_LOTNO)
        {
            foreach (GridViewRow row in GV_List.Rows)
            {
                Label lblOrderQty = (Label)row.FindControl("lblOrderQty");
                TextBox tbShipQty = (TextBox)row.FindControl("tbShipQty");
                Label lblLotNo = (Label)row.FindControl("lblLotNo");
                Label lblItemCode = (Label)row.FindControl("lblItemCode");
                Label lblUnitCount = (Label)row.FindControl("lblUnitCount");
                Label lblUom = (Label)row.FindControl("lblUom");
                Label lblLoc = (Label)row.FindControl("lblLoc");
                Label lblStorageBin = (Label)row.FindControl("lblStorageBin");
                Hu_HuInput ucHuInput = (Hu_HuInput)row.FindControl("ucHuInput");
                HiddenField hfId = (HiddenField)row.FindControl("hfId");
                if (ucHuInput.CheckExist(hu.HuId))
                {
                    this.lblMessage.Text = Resources.Language.MasterDataHuExist;
                    break;
                }
                if (lblLotNo.Text.Trim().ToUpper() == hu.LotNo.ToUpper() && lblItemCode.Text.Trim().ToUpper() == hu.Item.Code.ToUpper() && decimal.Parse(lblUnitCount.Text.Trim()) == hu.UnitCount && lblUom.Text.Trim().ToUpper() == hu.Uom.Code.ToUpper())
                {
                    IList<LocationLotDetail> locationLotDetList = TheLocationLotDetailMgr.GetHuLocationLotDetail(hu.HuId);
                    if (locationLotDetList != null && locationLotDetList.Count > 0)
                    {
                        LocationLotDetail locLotDet = locationLotDetList[0];
                        if (locLotDet.Location.Code == lblLoc.Text.Trim() && (locLotDet.StorageBin == null || locLotDet.StorageBin.Code == lblStorageBin.Text.Trim()))
                        {
                            decimal orderQty = lblOrderQty.Text.Trim() == string.Empty ? 0 : decimal.Parse(lblOrderQty.Text.Trim());
                            decimal shipQty = tbShipQty.Text.Trim() == string.Empty ? 0 : decimal.Parse(tbShipQty.Text.Trim());
                            if (orderQty >= shipQty + hu.Qty)
                            {
                                ucHuInput.HuInput(hu);
                                tbShipQty.Text = ucHuInput.SumQty().ToString("F2");
                                PickListResult pickListResult = new PickListResult();
                                pickListResult.LocationLotDetail = locLotDet;
                                pickListResult.PickListDetail = ThePickListDetailMgr.LoadPickListDetail(int.Parse(hfId.Value));
                                pickListResult.Qty = hu.Qty;

                                isMatch = true;
                                InitialHuScan();
                                break;
                            }
                        }

                    }
                }
            }
        }
        #endregion

        if (!isMatch)
        {
            this.lblMessage.Text = Resources.Language.MasterDataPickListNotExistHu;
            this.tbHuScan.Text = string.Empty;
            this.tbHuScan.Focus();
        }
    }
Ejemplo n.º 15
0
 public void PickList(Resolver resolver)
 {
     PickList pickList = pickListMgr.LoadPickList(resolver.Code, false);
     pickList.PickListDetails = new List<PickListDetail>();
     if (resolver.Transformers != null)
     {
         foreach (Transformer transformer in resolver.Transformers)
         {
             PickListDetail pickListDetail = pickListDetailMgr.LoadPickListDetail(transformer.Id, true);
             if (transformer != null)
             {
                 foreach (TransformerDetail transformerDetail in transformer.TransformerDetails)
                 {
                     PickListResult pickListResult = new PickListResult();
                     pickListResult.LocationLotDetail = locationLotDetailMgr.LoadLocationLotDetail(transformerDetail.LocationLotDetId);
                     pickListResult.PickListDetail = pickListDetail;
                     pickListResult.Qty = transformerDetail.Qty * pickListDetail.OrderLocationTransaction.UnitQty;
                     pickListDetail.AddPickListResult(pickListResult);
                 }
             }
             pickList.AddPickListDetail(pickListDetail);
         }
     }
     pickListMgr.DoPick(pickList, resolver.UserCode);
 }