Esempio n. 1
0
        /// <summary>
        /// 质量复核记录单子表信息
        /// </summary>
        /// <returns></returns>
        public static List <GSP_Vouchsqc> GetGSPVouchsqc(string cvencode, string connstr, out DataSet ds)
        {
            LogNote ln;

            ds = new DataSet();

            string sqlStr = @"select g.AUTOID 子表ID,g.ID 主表标识,v.QCID 质量验收记录单号, g.CINVCODE 药品编码,
g.FQUANTITY 实收数,g.FARVQUANTITY 到货数,g.DPRODATE 生产日期,
g.CVALDATE 有效期,vd.cVenName 供应商名称,g.DDATE_T 退货日期,
g.COUTINSTANCE 外观质量情况,g.CCONCLUSION 验收结论,
g.FELGQUANTITY 合格数,g.FNELGQUANTITY 不合格数,
g.CBACKREASON 拒收理由,g.CBATCH 生产批号,g.FPRICE 单价,
g.CDEFINE22,g.ICODE_T 采购到货退货单号,g.BCHECK 是否抽检,
g.imassDate 保质期,g.cMassUnit 保质期单位 
from dbo.GSP_VOUCHSQC g left join dbo.GSP_VOUCHQC v
on g.ID=v.ID left join dbo.Vendor vd
on g.CVENCODE = vd.cVenCode
where g.CINVCODE ='" + cvencode + "'";

            ds = SqlHelper.ExecuteDataSet(connstr, CommandType.Text, sqlStr, null);

            ln = new LogNote(AppDomain.CurrentDomain.BaseDirectory + "barcode.log");

            ln.Write("gsp_vouchsqc query:", cvencode);

            return(sqcbTable(ds.Tables[0]));
        }
Esempio n. 2
0
        //药品入库质量验收记录单y主表
        public static List <GSP_Vouchqc> GetGSPvouchqc(string qcid, string connstr, out DataSet ds)
        {
            LogNote ln;

            ds = new DataSet();

            string sqlStr = @"select v.ID 主表标识,v.QCID 质量验收记录单号,v.ICODE 采购到货退货单主表标识,
v.CCODE 采购到货退货单号,v.DARVDATE 到货退货日期,v.CVERIFIER 审核人,
v.CMAKER 制单人,v.DDATE 单据日期,v.CVOUCHTYPE 单据类型编码,
v.IVTID 单据模版号,v.UFTS 时间戳,v.CDEFINE1,v.BREFER 是否参照,
v.IVERIFYSTATE 审批标志 from dbo.GSP_VOUCHQC v
where v.QCID ='" + qcid + "'";

            ds = SqlHelper.ExecuteDataSet(connstr, CommandType.Text, sqlStr, null);

            ln = new LogNote(AppDomain.CurrentDomain.BaseDirectory + "barcode.log");

            ln.Write("gsp_vouchqc query:", qcid);

            return(bTable(ds.Tables[0]));
        }