Пример #1
0
        public PickQty GetPickInfo(string pickNo, string userid, out string resultMessage)
        {
            resultMessage = string.Empty;
            PickQty pickQty = null;

            try
            {
                ProcParam procPara = new ProcParam(4)
                {
                    ProcedureName = "SCANNER_PACK_FG.GET_PICK_INFO"
                };
                procPara.AddParamRefCursor(0, "io_cursor");
                procPara.AddParamInput(1, "strPICK_NO", pickNo);
                procPara.AddParamOutput(2, "resultmsg", OracleDbType.Varchar2, 255);
                procPara.AddParamInput(3, "strUser_id", userid);

                OraDataReader.Instance.OraReader = GlobalDB.Instance.DataAc.ExecuteDataReader(procPara);

                this.executionTime = GlobalDB.Instance.DataAc.ExecuteTime;

                if (OraDataReader.Instance.OraReader.HasRows)
                {
                    while (OraDataReader.Instance.OraReader.Read())
                    {
                        pickQty = new PickQty();

                        pickQty.PICK_NO    = OraDataReader.Instance.GetString("PICK_NO");
                        pickQty.QTY        = OraDataReader.Instance.GetInteger("QTY");
                        pickQty.PICKED_QTY = OraDataReader.Instance.GetInteger("PICKED_QTY");
                        pickQty.UNIT_ID    = OraDataReader.Instance.GetString("UNIT_ID");
                    }
                }
                else
                {
                    OracleString result = (OracleString)procPara.ReturnValue(2);
                    if (!result.IsNull)
                    {
                        resultMessage = result.Value;
                    }
                }

                // always call Close when done reading.
                OraDataReader.Instance.Close();
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(pickQty);
        }
Пример #2
0
    public PickQty GetPickInfo(string pickNo, string userid, out string resultMsg)
    {
        resultMsg = string.Empty;
        PickQty pickQty = null;

        try
        {
            using (ProductCardPICKBLL pdBll = new ProductCardPICKBLL())
            {
                pickQty = pdBll.GetPickInfo(pickNo, userid, out resultMsg);
            }
        }
        catch (Exception ex)
        {
            pickQty = null;
            throw ex;
        }
        return(pickQty);
    }