1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
 
namespace BLL
{
    public class ClsGy_BarCodeBill_View
    {
 
         
        //根据条码得到相应信息(条码档案)
        public Model.ClsGy_BarCodeBill_WMS_Model_View get_InfoByBarCode_Source(string sBarCode, Int64 sInterID, ref bool sBool, ref string sErrMsg)
        {
            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
            DAL.ClsGy_BarCodeBill_View dal = new DAL.ClsGy_BarCodeBill_View();
            if (dal.GetInfoByNumber_View(sBarCode))
            {
                sErrMsg = "";
                //-------------获取TMP中的原单主内码和子内码
                DataSet ds = oCN.RunProcReturn("exec h_p_WMS_GetBarCodeSourceInterID " + sInterID.ToString() + ",'" + sBarCode + "' ", "h_p_WMS_GetBarCodeSourceInterID");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
 
                }
                else
                {
                    if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0][0]) == 0)
                    {
                        dal.omodel_View.HSourceBillNo = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HSourceBillNo"]);
                        dal.omodel_View.HSourceEntryID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HSourceEntryID"]);
                        dal.omodel_View.HSourceInterID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HSourceInterID"]);
                        dal.omodel_View.HinitQty = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[0]["HQtyMust"]);
                        sBool = true;
                    }
                }
                return dal.omodel_View;
            }
            else
            {
                sErrMsg = "无效条码";
                return null;
            }
        }
 
 
        //根据条码得到相应信息(条码档案)
        public Model.ClsGy_BarCodeBill_WMS_Model_View get_InfoByBarCode(string sBarCode, ref string sErrMsg)
        {
            DAL.ClsGy_BarCodeBill_View dal = new DAL.ClsGy_BarCodeBill_View();
            if (dal.GetInfoByNumber_View(sBarCode))
            {
                sErrMsg = "";
                return dal.omodel_View;
            }
            else
            {
                sErrMsg = "无效条码";
                return null;
            }
        }
 
 
 
    }
}