/// <summary> /// 删除一条数据 /// </summary> public bool Delete(string ZKDH, string SCK, string TCK, string WLH) { StringBuilder strSql = new StringBuilder(); strSql.Append("delete from WMS_Bms_Tra_ZKD "); strSql.Append(" where ZKDH=:ZKDH and SCK=:SCK and TCK=:TCK and WLH=:WLH "); SqlParameter[] parameters = { new SqlParameter(":ZKDH", SqlDbType.VarChar, 50), new SqlParameter(":SCK", SqlDbType.VarChar, 30), new SqlParameter(":TCK", SqlDbType.VarChar, 30), new SqlParameter(":WLH", SqlDbType.VarChar, 20) }; parameters[0].Value = ZKDH; parameters[1].Value = SCK; parameters[2].Value = TCK; parameters[3].Value = WLH; int rows = DbHelper_SQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 得到一个对象实体 /// </summary> public Mod_WMS_Bms_Tra_ZKD GetModel(string ZKDH, string SCK, string TCK, string WLH) { StringBuilder strSql = new StringBuilder(); strSql.Append("select top 1 ZKDH,SCK,TCK,WLH,WLMC,PH,GG,PCH,SX,ZLDJ,ZJLDW,FJLDW,JHSL,JHZL,OutNum,OutZL,InNum,InZL,YHW,MBHW,ZHXLB,OutStatus,Status,Flag,ZDR,ZDRQ,vfree0,vfree1,vfree2,vfree3,vfree4 from WMS_Bms_Tra_ZKD "); strSql.Append(" where ZKDH=:ZKDH and SCK=:SCK and TCK=:TCK and WLH=:WLH "); SqlParameter[] parameters = { new SqlParameter(":ZKDH", SqlDbType.VarChar, 50), new SqlParameter(":SCK", SqlDbType.VarChar, 30), new SqlParameter(":TCK", SqlDbType.VarChar, 30), new SqlParameter(":WLH", SqlDbType.VarChar, 20) }; parameters[0].Value = ZKDH; parameters[1].Value = SCK; parameters[2].Value = TCK; parameters[3].Value = WLH; Mod_WMS_Bms_Tra_ZKD model = new Mod_WMS_Bms_Tra_ZKD(); DataSet ds = DbHelper_SQL.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 是否存在该记录 /// </summary> public bool Exists(string Barcode, string FYDH, int CKDH, string PCH, string WLH, DateTime WeightRQ, string ProduceData) { StringBuilder strSql = new StringBuilder(); strSql.Append("select count(1) from WMS_Bms_Inv_OutInfo"); strSql.Append(" where Barcode=:Barcode and FYDH=:FYDH and CKDH=:CKDH and PCH=:PCH and WLH=:WLH and WeightRQ=:WeightRQ and ProduceData=:ProduceData "); SqlParameter[] parameters = { new SqlParameter(":Barcode", SqlDbType.VarChar, 20), new SqlParameter(":FYDH", SqlDbType.VarChar, 50), new SqlParameter(":CKDH", SqlDbType.Int, 4), new SqlParameter(":PCH", SqlDbType.VarChar, 20), new SqlParameter(":WLH", SqlDbType.VarChar, 20), new SqlParameter(":WeightRQ", SqlDbType.DateTime), new SqlParameter(":ProduceData", SqlDbType.VarChar, 20) }; parameters[0].Value = Barcode; parameters[1].Value = FYDH; parameters[2].Value = CKDH; parameters[3].Value = PCH; parameters[4].Value = WLH; parameters[5].Value = WeightRQ; parameters[6].Value = ProduceData; return(DbHelper_SQL.Exists(strSql.ToString(), parameters)); }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(Mod_SeZJB_Shift_Record model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update SeZJB_Shift_Record set "); strSql.Append("ywdh=@ywdh,"); strSql.Append("ck=@ck,"); strSql.Append("shw=@shw,"); strSql.Append("dhw=@dhw,"); strSql.Append("czry=@czry,"); strSql.Append("czrq=@czrq,"); strSql.Append("ZJBstatus=@ZJBstatus,"); strSql.Append("ts=@ts,"); strSql.Append("by1=@by1,"); strSql.Append("by2=@by2,"); strSql.Append("by3=@by3,"); strSql.Append("by4=@by4,"); strSql.Append("by5=@by5"); strSql.Append(" where "); SqlParameter[] parameters = { new SqlParameter("@ywdh", SqlDbType.VarChar, 50), new SqlParameter("@ck", SqlDbType.VarChar, 50), new SqlParameter("@shw", SqlDbType.VarChar, 50), new SqlParameter("@dhw", SqlDbType.VarChar, 50), new SqlParameter("@czry", SqlDbType.VarChar, 50), new SqlParameter("@czrq", SqlDbType.DateTime), new SqlParameter("@ZJBstatus", SqlDbType.Int, 4), new SqlParameter("@ts", SqlDbType.DateTime), new SqlParameter("@by1", SqlDbType.VarChar, 100), new SqlParameter("@by2", SqlDbType.VarChar, 100), new SqlParameter("@by3", SqlDbType.VarChar, 100), new SqlParameter("@by4", SqlDbType.VarChar, 100), new SqlParameter("@by5", SqlDbType.VarChar, 100) }; parameters[0].Value = model.ywdh; parameters[1].Value = model.ck; parameters[2].Value = model.shw; parameters[3].Value = model.dhw; parameters[4].Value = model.czry; parameters[5].Value = model.czrq; parameters[6].Value = model.ZJBstatus; parameters[7].Value = model.ts; parameters[8].Value = model.by1; parameters[9].Value = model.by2; parameters[10].Value = model.by3; parameters[11].Value = model.by4; parameters[12].Value = model.by5; int rows = DbHelper_SQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 获取条码库存信息 /// </summary> /// <param name="CK">仓库</param> /// <param name="HW">货位</param> /// <param name="WGDH">完工单号</param> /// <param name="PH">批号</param> /// <param name="GZ">钢种</param> /// <returns>条码库存信息</returns> public DataSet GetList(string CK, string HW, string WGDH, string PH, string GZ) { StringBuilder strSql = new StringBuilder(); strSql.Append("select "); strSql.Append(" Barcode,WGDH,CK,HW,PCH,WLH,WLMC,SX,ZLDJ,PH,GG,BB,GH,ZL,BZ,RQ,RKType,RKRY,WeightRQ,CKCXH,ProduceData,PCInfo,Filed1,ErrSeason,Filed2,vfree0,vfree1,vfree2,vfree3,vfree4 "); strSql.Append(" FROM WMS_Bms_Inv_Info where 1=1 "); if (CK.Trim() != "") { strSql.Append(" and CK='" + CK + "' "); } if (HW.Trim() != "") { strSql.Append(" and HW='" + HW + "' "); } if (WGDH.Trim() != "") { strSql.Append(" and WGDH='" + WGDH + "' "); } if (PH.Trim() != "") { strSql.Append(" and PCH='" + PH + "' "); } if (GZ.Trim() != "") { strSql.Append(" and PH='" + GZ + "' "); } strSql.Append(" order by Barcode "); return(DbHelper_SQL.Query(strSql.ToString())); }
/// <summary> /// 增加一条数据 /// </summary> public int Add(Mod_ReZJB_PDD model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into ReZJB_PDD("); strSql.Append("ZJBstatus,CAPPK,ck,pdrq,ysdh)"); strSql.Append(" values ("); strSql.Append("@ZJBstatus,@CAPPK,@ck,@pdrq,@ysdh)"); strSql.Append(";select @@IDENTITY"); SqlParameter[] parameters = { new SqlParameter("@ZJBstatus", SqlDbType.Int, 4), new SqlParameter("@CAPPK", SqlDbType.VarChar, 50), new SqlParameter("@ck", SqlDbType.VarChar, 50), new SqlParameter("@pdrq", SqlDbType.DateTime), new SqlParameter("@ysdh", SqlDbType.VarChar, 50) }; parameters[0].Value = model.ZJBstatus; parameters[1].Value = model.CAPPK; parameters[2].Value = model.ck; parameters[3].Value = model.pdrq; parameters[4].Value = model.ysdh; object obj = DbHelper_SQL.GetSingle(strSql.ToString(), parameters); if (obj == null) { return(0); } else { return(Convert.ToInt32(obj)); } }
/// <summary> /// 删除一条数据 /// </summary> public bool Delete(string Barcode, string FYDH, int CKDH, string PCH, string WLH, DateTime WeightRQ, string ProduceData) { StringBuilder strSql = new StringBuilder(); strSql.Append("delete from WMS_Bms_Inv_OutInfo "); strSql.Append(" where Barcode=:Barcode and FYDH=:FYDH and CKDH=:CKDH and PCH=:PCH and WLH=:WLH and WeightRQ=:WeightRQ and ProduceData=:ProduceData "); SqlParameter[] parameters = { new SqlParameter(":Barcode", SqlDbType.VarChar, 20), new SqlParameter(":FYDH", SqlDbType.VarChar, 50), new SqlParameter(":CKDH", SqlDbType.Int, 4), new SqlParameter(":PCH", SqlDbType.VarChar, 20), new SqlParameter(":WLH", SqlDbType.VarChar, 20), new SqlParameter(":WeightRQ", SqlDbType.DateTime), new SqlParameter(":ProduceData", SqlDbType.VarChar, 20) }; parameters[0].Value = Barcode; parameters[1].Value = FYDH; parameters[2].Value = CKDH; parameters[3].Value = PCH; parameters[4].Value = WLH; parameters[5].Value = WeightRQ; parameters[6].Value = ProduceData; int rows = DbHelper_SQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 删除一条数据 /// </summary> public bool Delete(string ZKDH, string CPH, string Barcode, string PCH, string SX) { StringBuilder strSql = new StringBuilder(); strSql.Append("delete from WMS_Bms_Tra_ZKD_Detail "); strSql.Append(" where ZKDH=:ZKDH and CPH=:CPH and Barcode=:Barcode and PCH=:PCH and SX=:SX "); SqlParameter[] parameters = { new SqlParameter(":ZKDH", SqlDbType.VarChar, 50), new SqlParameter(":CPH", SqlDbType.VarChar, 30), new SqlParameter(":Barcode", SqlDbType.VarChar, 20), new SqlParameter(":PCH", SqlDbType.VarChar, 20), new SqlParameter(":SX", SqlDbType.VarChar, 30) }; parameters[0].Value = ZKDH; parameters[1].Value = CPH; parameters[2].Value = Barcode; parameters[3].Value = PCH; parameters[4].Value = SX; int rows = DbHelper_SQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 得到一个对象实体 /// </summary> public Mod_WMS_Bms_Rec_WGD GetModel(string WGDH, string PCH, string PH, string GG, string SCX, string WLH) { StringBuilder strSql = new StringBuilder(); strSql.Append("select top 1 WGDH,PCH,PH,GG,BB,SCX,NCWLBMID,WLH,WLMC,FZDW,ZXBZ,PCSX,PCLX,ZLDJ,ZPGP,PCXH,WCBZ,PGBZ,ZJBZ,ZPDJBZ,Rev_Time,End_Time,PEnd_Time,FEW_scx,SendEnd,IsTran,YWLH,YWLMC,YPH,YGG,YZXBZ,ZDR,ZDDATE,UPDATERY,UPDATEDATE,FLAG,Filed1,PCInfo,Filed2,SendBack,vfree0,vfree1,vfree2,vfree3,vfree4,yvfree0,yvfree1,yvfree2,yvfree3,yvfree4,GPZL from WMS_Bms_Rec_WGD "); strSql.Append(" where WGDH=:WGDH and PCH=:PCH and PH=:PH and GG=:GG and SCX=:SCX and WLH=:WLH "); SqlParameter[] parameters = { new SqlParameter(":WGDH", SqlDbType.VarChar, 50), new SqlParameter(":PCH", SqlDbType.VarChar, 20), new SqlParameter(":PH", SqlDbType.VarChar, 30), new SqlParameter(":GG", SqlDbType.VarChar, 30), new SqlParameter(":SCX", SqlDbType.VarChar, 50), new SqlParameter(":WLH", SqlDbType.VarChar, 20) }; parameters[0].Value = WGDH; parameters[1].Value = PCH; parameters[2].Value = PH; parameters[3].Value = GG; parameters[4].Value = SCX; parameters[5].Value = WLH; Mod_WMS_Bms_Rec_WGD model = new Mod_WMS_Bms_Rec_WGD(); DataSet ds = DbHelper_SQL.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 删除一条数据 /// </summary> public bool Delete(string WGDH, string PCH, string PH, string GG, string SCX, string WLH) { StringBuilder strSql = new StringBuilder(); strSql.Append("delete from WMS_Bms_Rec_WGD "); strSql.Append(" where WGDH=:WGDH and PCH=:PCH and PH=:PH and GG=:GG and SCX=:SCX and WLH=:WLH "); SqlParameter[] parameters = { new SqlParameter(":WGDH", SqlDbType.VarChar, 50), new SqlParameter(":PCH", SqlDbType.VarChar, 20), new SqlParameter(":PH", SqlDbType.VarChar, 30), new SqlParameter(":GG", SqlDbType.VarChar, 30), new SqlParameter(":SCX", SqlDbType.VarChar, 50), new SqlParameter(":WLH", SqlDbType.VarChar, 20) }; parameters[0].Value = WGDH; parameters[1].Value = PCH; parameters[2].Value = PH; parameters[3].Value = GG; parameters[4].Value = SCX; parameters[5].Value = WLH; int rows = DbHelper_SQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 得到一个对象实体 /// </summary> public Mod_WMS_Bms_Tra_ZKD_Detail GetModel(string ZKDH, string CPH, string Barcode, string PCH, string SX) { StringBuilder strSql = new StringBuilder(); strSql.Append("select top 1 ZKDH,CPH,Barcode,WLH,WLMC,PH,GG,PCH,SX,CK,HW,ZL,CKOperator,CKTime,YKOperator,YKTime,YRKDH,YRKTime,YRKOperator,YRKType,vfree0,vfree1,vfree2,vfree3,vfree4 from WMS_Bms_Tra_ZKD_Detail "); strSql.Append(" where ZKDH=:ZKDH and CPH=:CPH and Barcode=:Barcode and PCH=:PCH and SX=:SX "); SqlParameter[] parameters = { new SqlParameter(":ZKDH", SqlDbType.VarChar, 50), new SqlParameter(":CPH", SqlDbType.VarChar, 30), new SqlParameter(":Barcode", SqlDbType.VarChar, 20), new SqlParameter(":PCH", SqlDbType.VarChar, 20), new SqlParameter(":SX", SqlDbType.VarChar, 30) }; parameters[0].Value = ZKDH; parameters[1].Value = CPH; parameters[2].Value = Barcode; parameters[3].Value = PCH; parameters[4].Value = SX; Mod_WMS_Bms_Tra_ZKD_Detail model = new Mod_WMS_Bms_Tra_ZKD_Detail(); DataSet ds = DbHelper_SQL.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public Mod_WMS_Bms_Tra_ZKD_Total GetModel(string ZKDH, string PCH, string SX, string CPH) { StringBuilder strSql = new StringBuilder(); strSql.Append("select top 1 ZKDH,PCH,SX,CPH,CKNUM,RKNUM,CKOperator,CKTime,YKOperator,YKTime from WMS_Bms_Tra_ZKD_Total "); strSql.Append(" where ZKDH=:ZKDH and PCH=:PCH and SX=:SX and CPH=:CPH "); SqlParameter[] parameters = { new SqlParameter(":ZKDH", SqlDbType.VarChar, 50), new SqlParameter(":PCH", SqlDbType.VarChar, 20), new SqlParameter(":SX", SqlDbType.VarChar, 30), new SqlParameter(":CPH", SqlDbType.VarChar, 30) }; parameters[0].Value = ZKDH; parameters[1].Value = PCH; parameters[2].Value = SX; parameters[3].Value = CPH; Mod_WMS_Bms_Tra_ZKD_Total model = new Mod_WMS_Bms_Tra_ZKD_Total(); DataSet ds = DbHelper_SQL.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 获得数据列表 /// </summary> public DataSet GetList(string strWhere) { StringBuilder strSql = new StringBuilder(); strSql.Append("select wgdh,pch,finished,ZJBstatus,ts,by1,by2,by3,by4,by5 "); strSql.Append(" FROM SeZJB_WGD_Finished "); if (strWhere.Trim() != "") { strSql.Append(" where " + strWhere); } return(DbHelper_SQL.Query(strSql.ToString())); }
/// <summary> /// 获得数据列表 /// </summary> public DataSet GetList(string strWhere) { StringBuilder strSql = new StringBuilder(); strSql.Append("select ysdh,ck,pdrq,djzt,shuser,shdate,finished,ZJBstatus,ts,by1,by2,by3,by4,by5 "); strSql.Append(" FROM SeZJB_PDD_FINISHED "); if (strWhere.Trim() != "") { strSql.Append(" where " + strWhere); } return(DbHelper_SQL.Query(strSql.ToString())); }
/// <summary> /// 获得数据列表 /// </summary> public DataSet GetList(string strWhere) { StringBuilder strSql = new StringBuilder(); strSql.Append("select Barcode,WGDH,CK,HW,PCH,WLH,WLMC,SX,ZLDJ,PH,GG,BB,GH,ZL,BZ,RQ,RKType,RKRY,WeightRQ,CKCXH,ProduceData,Filed1,PCInfo,Filed2,ErrSeason,vfree0,vfree1,vfree2,vfree3,vfree4 "); strSql.Append(" FROM WMS_Bms_Tra_ZKD_Item "); if (strWhere.Trim() != "") { strSql.Append(" where " + strWhere); } return(DbHelper_SQL.Query(strSql.ToString())); }
/// <summary> /// 获得数据列表 /// </summary> public DataSet GetList(string strWhere) { StringBuilder strSql = new StringBuilder(); strSql.Append("select Barcode,WGDH,CK,HW,PCH,WLH,WLMC,SX,ZLDJ,PH,GG,BB,GH,ZL,BZ,RQ,RKType,RKRY,WeightRQ,CKCXH,ProduceData,PCInfo,Filed1,ErrSeason,Filed2,vfree0,vfree1,vfree2,vfree3,vfree4,pk_ZJB_GPD,GPTYPE,ZJBStatus,CAPPK "); strSql.Append(" FROM ReZJB_GPD "); if (strWhere.Trim() != "") { strSql.Append(" where " + strWhere); } return(DbHelper_SQL.Query(strSql.ToString())); }
/// <summary> /// 获得数据列表 /// </summary> public DataSet GetList(string strWhere) { StringBuilder strSql = new StringBuilder(); strSql.Append("select ZKDH,PCH,SX,CPH,CKNUM,RKNUM,CKOperator,CKTime,YKOperator,YKTime "); strSql.Append(" FROM WMS_Bms_Tra_ZKD_Total "); if (strWhere.Trim() != "") { strSql.Append(" where " + strWhere); } return(DbHelper_SQL.Query(strSql.ToString())); }
/// <summary> /// 获得数据列表 /// </summary> public DataSet GetList(string strWhere) { StringBuilder strSql = new StringBuilder(); strSql.Append("select pk_ZJB_PDD,ZJBstatus,CAPPK,ck,pdrq,ysdh "); strSql.Append(" FROM ReZJB_PDD "); if (strWhere.Trim() != "") { strSql.Append(" where " + strWhere); } return(DbHelper_SQL.Query(strSql.ToString())); }
/// <summary> /// 获得数据列表 /// </summary> public DataSet GetList(string strWhere) { StringBuilder strSql = new StringBuilder(); strSql.Append("select ysdh,BARCODE,PCH,SX,ZCSL,FZCZL,vfree0,vfree1,vfree2,vfree3,vfree4,ZJBstatus,CAPPK,pk_ZJB_PDD_Item "); strSql.Append(" FROM ReZJB_PDD_Item "); if (strWhere.Trim() != "") { strSql.Append(" where " + strWhere); } return(DbHelper_SQL.Query(strSql.ToString())); }
/// <summary> /// 获得数据列表 /// </summary> public DataSet GetList(string strWhere) { StringBuilder strSql = new StringBuilder(); strSql.Append("select WGDH,PCH,PH,GG,BB,SCX,NCWLBMID,WLH,WLMC,FZDW,ZXBZ,PCSX,PCLX,ZLDJ,ZPGP,PCXH,WCBZ,PGBZ,ZJBZ,ZPDJBZ,Rev_Time,End_Time,PEnd_Time,FEW_scx,SendEnd,IsTran,YWLH,YWLMC,YPH,YGG,YZXBZ,ZDR,ZDDATE,UPDATERY,UPDATEDATE,FLAG,Filed1,PCInfo,Filed2,SendBack,vfree0,vfree1,vfree2,vfree3,vfree4,yvfree0,yvfree1,yvfree2,yvfree3,yvfree4,GPZL "); strSql.Append(" FROM WMS_Bms_Rec_WGD "); if (strWhere.Trim() != "") { strSql.Append(" where " + strWhere); } return(DbHelper_SQL.Query(strSql.ToString())); }
/// <summary> /// 获得数据列表 /// </summary> public DataSet GetList(string strWhere) { StringBuilder strSql = new StringBuilder(); strSql.Append("select wgdh,pch,ph,gg,bb,wlh,wlmc,fzdw,zxbz,zldj,SCX,pcinfo,zyx1,zyx2,zyx3,zyx4,zyx5,gpmainmeasrate,pk_ZJB_WGD,ZJBstatus,CAPPK "); strSql.Append(" FROM ReZJB_WGD "); if (strWhere.Trim() != "") { strSql.Append(" where " + strWhere); } return(DbHelper_SQL.Query(strSql.ToString())); }
/// <summary> /// 获得数据列表 /// </summary> public DataSet GetList(string strWhere) { StringBuilder strSql = new StringBuilder(); strSql.Append("select zkdh,sck,tck,wlh,wlmc,pch,sx,zldj,jhsl,jhzl,zjldw,fjldw,ph,gg,vfree0,vfree1,vfree2,vfree3,vfree4,pk_ZJB_ZKD,ZJBstatus,CAPPK "); strSql.Append(" FROM ReZJB_ZKD "); if (strWhere.Trim() != "") { strSql.Append(" where " + strWhere); } return(DbHelper_SQL.Query(strSql.ToString())); }
/// <summary> /// 获得数据列表 /// </summary> public DataSet GetList(string strWhere) { StringBuilder strSql = new StringBuilder(); strSql.Append("select ZKDH,SCK,TCK,WLH,WLMC,PH,GG,PCH,SX,ZLDJ,ZJLDW,FJLDW,JHSL,JHZL,OutNum,OutZL,InNum,InZL,YHW,MBHW,ZHXLB,OutStatus,Status,Flag,ZDR,ZDRQ,vfree0,vfree1,vfree2,vfree3,vfree4 "); strSql.Append(" FROM WMS_Bms_Tra_ZKD "); if (strWhere.Trim() != "") { strSql.Append(" where " + strWhere); } return(DbHelper_SQL.Query(strSql.ToString())); }
/// <summary> /// 获得数据列表 /// </summary> public DataSet GetList(string strWhere) { StringBuilder strSql = new StringBuilder(); strSql.Append("select ywdh,ck,shw,dhw,czry,czrq,ZJBstatus,ts,by1,by2,by3,by4,by5 "); strSql.Append(" FROM SeZJB_Shift_Record "); if (strWhere.Trim() != "") { strSql.Append(" where " + strWhere); } return(DbHelper_SQL.Query(strSql.ToString())); }
/// <summary> /// 获得数据列表 /// </summary> public DataSet GetList(string strWhere) { StringBuilder strSql = new StringBuilder(); strSql.Append("select fydh,ck,khbm,yslb,cph,wlh,wlmc,sx,zldj,jhsl,jhzl,zjldw,fjldw,varrivestation,zdr,zdrq,PH,GG,PCInfo,zyx1,zyx2,zyx3,zyx4,zyx5,pk_ZJB_FYD,ZJBstatus,CAPPK,ywbm,ywry "); strSql.Append(" FROM ReZJB_FYD "); if (strWhere.Trim() != "") { strSql.Append(" where " + strWhere); } return(DbHelper_SQL.Query(strSql.ToString())); }
/// <summary> /// 获得数据列表 /// </summary> public DataSet GetList(string strWhere) { StringBuilder strSql = new StringBuilder(); strSql.Append("select wgdh,pch,ph,gg,wlh,wlmc,pcinfo,zyx1,zyx2,zyx3,zyx4,zyx5,pk_ZJB_WGD_Item,ZJBstatus,CAPPK "); strSql.Append(" FROM ReZJB_WGD_Item "); if (strWhere.Trim() != "") { strSql.Append(" where " + strWhere); } return(DbHelper_SQL.Query(strSql.ToString())); }
/// <summary> /// 获得数据列表 /// </summary> public DataSet GetList(string strWhere) { StringBuilder strSql = new StringBuilder(); strSql.Append("select ZKDH,CPH,Barcode,WLH,WLMC,PH,GG,PCH,SX,CK,HW,ZL,CKOperator,CKTime,YKOperator,YKTime,YRKDH,YRKTime,YRKOperator,YRKType,vfree0,vfree1,vfree2,vfree3,vfree4 "); strSql.Append(" FROM WMS_Bms_Tra_ZKD_Detail "); if (strWhere.Trim() != "") { strSql.Append(" where " + strWhere); } return(DbHelper_SQL.Query(strSql.ToString())); }
/// <summary> /// 增加一条数据 /// </summary> public int Add(Mod_ReZJB_WGD_Item model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into ReZJB_WGD_Item("); strSql.Append("wgdh,pch,ph,gg,wlh,wlmc,pcinfo,zyx1,zyx2,zyx3,zyx4,zyx5,ZJBstatus,CAPPK)"); strSql.Append(" values ("); strSql.Append("@wgdh,@pch,@ph,@gg,@wlh,@wlmc,@pcinfo,@zyx1,@zyx2,@zyx3,@zyx4,@zyx5,@ZJBstatus,@CAPPK)"); strSql.Append(";select @@IDENTITY"); SqlParameter[] parameters = { new SqlParameter("@wgdh", SqlDbType.VarChar, 50), new SqlParameter("@pch", SqlDbType.VarChar, 50), new SqlParameter("@ph", SqlDbType.VarChar, 50), new SqlParameter("@gg", SqlDbType.VarChar, 50), new SqlParameter("@wlh", SqlDbType.VarChar, 50), new SqlParameter("@wlmc", SqlDbType.VarChar, 50), new SqlParameter("@pcinfo", SqlDbType.VarChar, 150), new SqlParameter("@zyx1", SqlDbType.VarChar, 150), new SqlParameter("@zyx2", SqlDbType.VarChar, 150), new SqlParameter("@zyx3", SqlDbType.VarChar, 150), new SqlParameter("@zyx4", SqlDbType.VarChar, 150), new SqlParameter("@zyx5", SqlDbType.VarChar, 150), new SqlParameter("@ZJBstatus", SqlDbType.Int, 4), new SqlParameter("@CAPPK", SqlDbType.VarChar, 50) }; parameters[0].Value = model.wgdh; parameters[1].Value = model.pch; parameters[2].Value = model.ph; parameters[3].Value = model.gg; parameters[4].Value = model.wlh; parameters[5].Value = model.wlmc; parameters[6].Value = model.pcinfo; parameters[7].Value = model.zyx1; parameters[8].Value = model.zyx2; parameters[9].Value = model.zyx3; parameters[10].Value = model.zyx4; parameters[11].Value = model.zyx5; parameters[12].Value = model.ZJBstatus; parameters[13].Value = model.CAPPK; object obj = DbHelper_SQL.GetSingle(strSql.ToString(), parameters); if (obj == null) { return(0); } else { return(Convert.ToInt32(obj)); } }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(Mod_SeZJB_PDD_FINISHED model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into SeZJB_PDD_FINISHED("); strSql.Append("ysdh,ck,pdrq,djzt,shuser,shdate,finished,ZJBstatus,ts,by1,by2,by3,by4,by5)"); strSql.Append(" values ("); strSql.Append("@ysdh,@ck,@pdrq,@djzt,@shuser,@shdate,@finished,@ZJBstatus,@ts,@by1,@by2,@by3,@by4,@by5)"); SqlParameter[] parameters = { new SqlParameter("@ysdh", SqlDbType.VarChar, 50), new SqlParameter("@ck", SqlDbType.VarChar, 20), new SqlParameter("@pdrq", SqlDbType.DateTime), new SqlParameter("@djzt", SqlDbType.VarChar, 10), new SqlParameter("@shuser", SqlDbType.VarChar, 20), new SqlParameter("@shdate", SqlDbType.DateTime), new SqlParameter("@finished", SqlDbType.Int, 4), new SqlParameter("@ZJBstatus", SqlDbType.Int, 4), new SqlParameter("@ts", SqlDbType.DateTime), new SqlParameter("@by1", SqlDbType.VarChar, 100), new SqlParameter("@by2", SqlDbType.VarChar, 100), new SqlParameter("@by3", SqlDbType.VarChar, 100), new SqlParameter("@by4", SqlDbType.VarChar, 100), new SqlParameter("@by5", SqlDbType.VarChar, 100) }; parameters[0].Value = model.ysdh; parameters[1].Value = model.ck; parameters[2].Value = model.pdrq; parameters[3].Value = model.djzt; parameters[4].Value = model.shuser; parameters[5].Value = model.shdate; parameters[6].Value = model.finished; parameters[7].Value = model.ZJBstatus; parameters[8].Value = model.ts; parameters[9].Value = model.by1; parameters[10].Value = model.by2; parameters[11].Value = model.by3; parameters[12].Value = model.by4; parameters[13].Value = model.by5; int rows = DbHelper_SQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(Mod_SeZJB_WGD_Finished model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update SeZJB_WGD_Finished set "); strSql.Append("wgdh=@wgdh,"); strSql.Append("pch=@pch,"); strSql.Append("finished=@finished,"); strSql.Append("ZJBstatus=@ZJBstatus,"); strSql.Append("ts=@ts,"); strSql.Append("by1=@by1,"); strSql.Append("by2=@by2,"); strSql.Append("by3=@by3,"); strSql.Append("by4=@by4,"); strSql.Append("by5=@by5"); strSql.Append(" where "); SqlParameter[] parameters = { new SqlParameter("@wgdh", SqlDbType.VarChar, 50), new SqlParameter("@pch", SqlDbType.VarChar, 20), new SqlParameter("@finished", SqlDbType.Int, 4), new SqlParameter("@ZJBstatus", SqlDbType.Int, 4), new SqlParameter("@ts", SqlDbType.DateTime), new SqlParameter("@by1", SqlDbType.VarChar, 100), new SqlParameter("@by2", SqlDbType.VarChar, 100), new SqlParameter("@by3", SqlDbType.VarChar, 100), new SqlParameter("@by4", SqlDbType.VarChar, 100), new SqlParameter("@by5", SqlDbType.VarChar, 100) }; parameters[0].Value = model.wgdh; parameters[1].Value = model.pch; parameters[2].Value = model.finished; parameters[3].Value = model.ZJBstatus; parameters[4].Value = model.ts; parameters[5].Value = model.by1; parameters[6].Value = model.by2; parameters[7].Value = model.by3; parameters[8].Value = model.by4; parameters[9].Value = model.by5; int rows = DbHelper_SQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }