コード例 #1
0
        public string createPickingDtl(List <PickingDtl> pickingDtl)
        {
            string msg = "";
            LotWarehouseDetails _lotWhseDtls = new LotWarehouseDetails();
            DAL objDAL = new DAL();

            _lotWhseDtls = objDAL.getWarehouseDetails(pickingDtl[0].Company, pickingDtl[0].PartNum, pickingDtl[0].LotNum);
            msg          = InventoryTransfer(pickingDtl[0], _lotWhseDtls);
            if (msg != "")
            {
                //msg = "Lot no " + pickingDtl[0].LotNum + " already picked and loaded";
            }
            if (msg == "")
            {
                msg = AddLotDetailsToUd108A(pickingDtl);
            }
            if (msg == "")
            {
                msg = objDAL.UpdateTruckIn(pickingDtl[0].Company,
                                           pickingDtl[0].DPNum_Key2,
                                           "PICKING IN PROGRESS");

                msg = objDAL.UpdateTruckStatus(pickingDtl[0].Company,
                                               pickingDtl[0].DPNum_Key2,
                                               "PICKING IN PROGRESS");

                msg = objDAL.UpdateTruckOut(pickingDtl[0].Company,
                                            pickingDtl[0].DPNum_Key2);
            }

            return(msg);
        }
コード例 #2
0
        public string LooseInventoryTransfer(LoosePickingHd objPallet, LotWarehouseDetails _lotWhseDtls)
        {
            string msg = "";

            try
            {
                InventoryTransferServices it = new InventoryTransferServices();
                InvTransfer invTransfer      = new InvTransfer();
                invTransfer.company      = objPallet.Company;
                invTransfer.partNum      = objPallet.PartNum;
                invTransfer.qty          = objPallet.Qty;
                invTransfer.frmWarehouse = _lotWhseDtls.FromWarehouse;
                invTransfer.frmBinNum    = _lotWhseDtls.FromBinNum;
                invTransfer.frmLotNum    = objPallet.LotNum;
                invTransfer.toWarehouse  = _lotWhseDtls.ToWarehouse;
                invTransfer.toBinNum     = _lotWhseDtls.ToBinNum;
                invTransfer.toLotNum     = objPallet.LotNum;

                it.doInvTransfer(invTransfer);
            }
            catch (Exception ex)
            {
                msg = ex.Message.ToString();
            }
            return(msg);
        }
コード例 #3
0
        public string updateLoosePicking(LoosePickingDtl lpd)
        {
            string msg = "";

            try
            {
                DAL objDAL = new DAL();

                List <LoosePickingHd> loosePickingHd = new List <LoosePickingHd>();
                LotWarehouseDetails   lotWhseDtls    = new LotWarehouseDetails();
                msg = objDAL.getLoosePartAndLotDetails(out loosePickingHd, lpd.Company, lpd.PalletLblId);

                if (msg == "")
                {
                    msg = objDAL.getLooseWarehouseDetails(out lotWhseDtls, lpd.Company);
                }

                if (msg == "")
                {
                    for (int i = 0; i < loosePickingHd.Count(); i++)
                    {
                        msg = LooseInventoryTransfer(loosePickingHd[i], lotWhseDtls);
                    }
                }

                if (msg == "")
                {
                    objDAL.updateLoosePicking(lpd);
                }

                if (msg == "")
                {
                    msg = objDAL.UpdateTruckStatus(lpd.Company,
                                                   lpd.DPNum_Key2,
                                                   "PICKING IN PROGRESS");
                    //msg = objDAL.UpdateTruckStatusForLoose(lpd.Company,
                    //                  lpd.DPNum_Key2,
                    //                  "PICKING IN PROGRESS");
                }
            }catch (Exception ex)
            {
                msg = ex.Message.ToString();
            }

            return(msg);
        }