示例#1
0
        public C_PACKING GetPackingBySkuAndType(string SkuNo, string PackType, OleExec DB)
        {
            string    sql     = string.Empty;
            DataTable dt      = new DataTable();
            C_PACKING Packing = new C_PACKING();

            if (DBType.Equals(DB_TYPE_ENUM.Oracle))
            {
                sql = $@"SELECT * FROM C_PACKING WHERE SKUNO='{SkuNo}' AND PACK_TYPE='{PackType}' AND ROWNUM=1";
                dt  = DB.ExecSelect(sql).Tables[0];
                Row_C_PACKING row = (Row_C_PACKING)NewRow();
                if (dt.Rows.Count > 0)
                {
                    row.loadData(dt.Rows[0]);
                    Packing = row.GetDataObject();
                }
            }
            return(Packing);
        }
示例#2
0
        public List <C_PACKING> GetPackingBySku(string SkuNo, OleExec DB)
        {
            string           sql     = string.Empty;
            DataTable        dt      = new DataTable();
            List <C_PACKING> Packing = new List <C_PACKING>();

            if (DBType.Equals(DB_TYPE_ENUM.Oracle))
            {
                sql = $@"SELECT * FROM C_PACKING WHERE SKUNO='{SkuNo}'";
                dt  = DB.ExecSelect(sql).Tables[0];
                Row_C_PACKING row = (Row_C_PACKING)NewRow();
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    row.loadData(dt.Rows[i]);
                    Packing.Add(row.GetDataObject());
                }
            }
            return(Packing);
        }