public DataTable dt货仓(string sWhCode) { string s = DBWebService.s货仓(sWhCode); DataTable dt = Cls序列化.DeserializeDataTable(s); return(dt); }
public DataTable dt采购入库单信息(string sCode) { string s = DBWebService.dt采购入库单信息(sCode); DataTable dt = Cls序列化.DeserializeDataTable(s); return(dt); }
public DataTable dt生产订单子件信息(string sCode, string sRowNo, string sInvCode) { string s = DBWebService.dt生产订单子件信息(sCode, sRowNo, sInvCode); DataTable dt = Cls序列化.DeserializeDataTable(s); return(dt); }
public DataTable dt盘点条码信息(string sBarCode, string sCode) { string s = DBWebService.dt盘点条码信息(sBarCode, sCode); DataTable dt = Cls序列化.DeserializeDataTable(s); return(dt); }
public string ShowlookUpDate(string code, string iType) { string s = ""; string sSQL = ""; try { if (iType == "2") { sSQL = @"select cast(0 as bit) as 选择,iID as iID,iID as 工程类型编码,iText as 工程类型名称 from _LookUpDate where 1=1 and bClose=1 and iType='" + iType + "' order by iID"; } if (code != "") { sSQL = sSQL.Replace("1=1", "1=1 and iID like '%" + code + "%' or iText='" + code + "'"); } DataTable dt = clsSQLCommond.ExecQuery(sSQL); s = Cls序列化.SerializeDataTableXml(dt); } catch (Exception ee) { s = ee.Message; } return(s); }
public DataTable dt生产订单号信息(string sDid) { string s = DBWebService.dt生产订单号信息(sDid); DataTable dt = Cls序列化.DeserializeDataTable(s); return(dt); }
public string dt产品入库条码信息(string sBarCode) { string s = ""; try { string sSQL = @" select a.*, b.cInvName,b.cInvStd,b.bInvBatch,e.生产订单数量,e.入库数量,e.报检数量 from 条形码信息 a inner join Inventory b on a.存货编码 = b.cInvCode inner join ( select b.InvCode as 母件编码, a.mocode,b.SortSeq ,b.Qty as 生产订单数量,b.AuxQty as 生产订单件数,b.QualifiedInQty as 入库数量,b.DeclaredQty as 报检数量 from mom_order a inner join mom_orderdetail b on a.moid = b.moid where b.Status = 3 ) e on e.母件编码 = a.存货编码 and e.mocode = a.生产订单号 and a.行号 = e.SortSeq where a.条形码 = '333333' "; sSQL = sSQL.Replace("333333", sBarCode); DataTable dt = SqlHelper.ExecuteDataset(ClsBaseDataInfo.sConnString, CommandType.Text, sSQL).Tables[0]; s = Cls序列化.SerializeDataTableXml(dt); } catch (Exception ee) { s = "0" + ee.Message; } return(s); }
public string dt(int type, string iID, string cRsCode) { string s = ""; try { switch (type) { case 0: sSQL = "select *, 'edit' as iSave,'' as sState from " + tablename + " where " + tableid + "='" + iID + "' and cRsCode='" + cRsCode + "'"; break; case 1: sSQL = @"select a.cInvCode,b.AutoID, b.iID, b.iQuantity, b.SQty, b.Remark ,case when b.iID is not null then 'edit' else '' end iSave from Inventory a left join (select * from " + tablenames + " where iID='" + iID + "') b on a.cInvCode=b.cInvCode "; break; } DataTable dt = clsSQLCommond.ExecQuery(sSQL); dt.TableName = tablename; s = Cls序列化.SerializeDataTableXml(dt); } catch (Exception ee) { s = ee.Message; } return(s); }
public string dt产品条码信息(string sBarCode, string sCode) { string s = ""; try { string sSQL = @" select a.*,b.cInvName,b.cInvStd,b.bInvBatch,e.cVenCode,e.iQuantity,e.iReceivedQTY,e.iQuantity - isnull(e.iReceivedQTY,0) as iQty from 条形码信息 a inner join Inventory b on a.存货编码 = b.cInvCode inner join ( select c.cVenCode,d.cInvCode,sum(d.iQuantity) as iQuantity,SUM(isnull(iReceivedQTY,0)) as iReceivedQTY from PO_Pomain c inner join PO_Podetails d on c.POID = d.POID where c.cPOID = '111111' group by c.cVenCode,d.cInvCode ) e on e.cInvCode = a.存货编码 where a.条形码 = '222222' "; sSQL = sSQL.Replace("111111", sCode); sSQL = sSQL.Replace("222222", sBarCode); DataTable dt = SqlHelper.ExecuteDataset(ClsBaseDataInfo.sConnString, CommandType.Text, sSQL).Tables[0]; s = Cls序列化.SerializeDataTableXml(dt); } catch (Exception ee) { s = "0" + ee.Message; } return(s); }
public string dtForm(string fchrFrmNameID, string fchrFrmText, string Flag) { string s = ""; string sSQL = ""; try { if (Flag == "1") { sSQL = @"select * from _Form where fchrFrmNameID = '" + fchrFrmNameID + "' and fchrFrmText = '" + fchrFrmText + "' ORDER BY fIntOrderID"; } else if (Flag == "2") { sSQL = @"select * from _Form ORDER BY fIntOrderID"; } else if (Flag == "3") { sSQL = @"select * from _Form WHERE (fbitHide = 0) AND (fbitNoUse = 0)ORDER BY fIntOrderID"; } DataTable dt = clsSQLCommond.ExecQuery(sSQL); s = Cls序列化.SerializeDataTableXml(dt); } catch (Exception ee) { s = ee.Message; } return(s); }
public string dtReportNow() { string s = ""; try { sSQL = @"declare @iID as nvarchar(10) declare @ddate as nvarchar(10) select top 1 @iID=iID,@ddate=convert(nvarchar(10),dDate,120) from MonthRdRecord where isnull(dVerifyPerson,'')<>'' order by dDate desc,iID desc select b.cInvCode,b.iQuantity into #a from MonthRdRecord a left join MonthRdRecords b on a.iID=b.iID where a.iID=@iID union all select b.cInvCode,b.InQty from Project a left join ProjectRecord b on a.iID=b.iID where convert(nvarchar(10),a.dDate,120)>=@ddate union all select b.cInvCode,case when cRSCode='02' then iQuantity when cRSCode='11' then iQuantity end from RdRecord a left join RdRecords b on a.iID=b.iID where convert(nvarchar(10),a.dDate,120)>=@ddate select cInvCode,sum(iQuantity) as iQuantity from #a group by cInvCode "; DataTable dt = clsSQLCommond.ExecQuery(sSQL); s = Cls序列化.SerializeDataTableXml(dt); } catch (Exception ee) { s = ee.Message; } return(s); }
public string dtReportSecurity(DateTime dDate1, DateTime dDate2, DateTime dDate3, DateTime dDate4, string cPCCode, string cDCCode, string PersonCode, string cSCode, string cECode) { string s = ""; try { sSQL = @"select a.cPCCode,a.cDCCode,a.cECode,b.cSCode,b.PersonCaptainDept,sum(b.iCount) as iCount,sum(b.iScore) as iScore from Project a left join ProjectSecurity b on a.iID=b.iID where b.iID is not null"; if (dDate1 != DateTime.MinValue) { sSQL = sSQL + " and convert(varchar(10),a.dDate,120)>='" + dDate1.ToString("yyyy-MM-dd") + "'"; } if (dDate2 != DateTime.MinValue) { sSQL = sSQL + " and convert(varchar(10),a.dDate,120)<='" + dDate2.ToString("yyyy-MM-dd") + "'"; } if (dDate3 != DateTime.MinValue) { sSQL = sSQL + " and convert(varchar(10),b.dDate,120)>='" + dDate3.ToString("yyyy-MM-dd") + "'"; } if (dDate4 != DateTime.MinValue) { sSQL = sSQL + " and convert(varchar(10),b.dDate,120)<='" + dDate4.ToString("yyyy-MM-dd") + "'"; } if (cPCCode != "") { sSQL = sSQL + " and isnull(a.cPCCode,'')='" + cPCCode + "'"; } if (cDCCode != "") { sSQL = sSQL + " and isnull(a.cDCCode,'')='" + cDCCode + "'"; } if (cECode != "") { sSQL = sSQL + " and isnull(a.cECode,'')='" + cECode + "'"; } if (PersonCode != "") { sSQL = sSQL + " and isnull(b.PersonCode,'')='" + PersonCode + "'"; } if (cSCode != "") { sSQL = sSQL + " and isnull(b.cSCode,'')='" + cSCode + "'"; } sSQL = sSQL + " group by a.cPCCode,a.cDCCode,a.cECode,b.cSCode,b.PersonCaptainDept"; DataTable dt = clsSQLCommond.ExecQuery(sSQL);; s = Cls序列化.SerializeDataTableXml(dt); } catch (Exception ee) { s = ee.Message; } return(s); }
public string dtReportCheck(DateTime dDate1, DateTime dDate2, DateTime dDate3, DateTime dDate4, string cPCCode, string cDCCode, string PersonCode, string cECode) { string s = ""; try { sSQL = @"select a.cPCCode,a.cDCCode,a.cECode,a.CheckPerson,p.cDepCode,count(case when a.IsCheck is null then 1 end) iEmpty, count(*) as iCount,count(case when a.IsCheck=1 then 1 end) as iTrue,sum(case when a.IsCheck=0 then 1 end) as iFalse, case when isnull(count(*),0)<>0 then convert(decimal(16, 2),sum(case when a.IsCheck=1 then 1.00 end)*100/count(*)) else 0 end Per from Project a left join Person p on a.CheckPerson=p.PersonCode where 1=1 "; if (dDate1 != DateTime.MinValue) { sSQL = sSQL + " and convert(varchar(10),a.dDate,120)>='" + dDate1.ToString("yyyy-MM-dd") + "'"; } if (dDate2 != DateTime.MinValue) { sSQL = sSQL + " and convert(varchar(10),a.dDate,120)<='" + dDate2.ToString("yyyy-MM-dd") + "'"; } if (dDate3 != DateTime.MinValue) { sSQL = sSQL + " and convert(varchar(10),a.CheckTime,120)>='" + dDate3.ToString("yyyy-MM-dd") + "'"; } if (dDate4 != DateTime.MinValue) { sSQL = sSQL + " and convert(varchar(10),a.CheckTime,120)<='" + dDate4.ToString("yyyy-MM-dd") + "'"; } if (cPCCode != "") { sSQL = sSQL + " and isnull(a.cPCCode,'')='" + cPCCode + "'"; } if (cDCCode != "") { sSQL = sSQL + " and isnull(a.cDCCode,'')='" + cDCCode + "'"; } if (cECode != "") { sSQL = sSQL + " and isnull(a.cECode,'')='" + cECode + "'"; } if (PersonCode != "") { sSQL = sSQL + " and isnull(a.CheckPerson,'')='" + PersonCode + "'"; } sSQL = sSQL + " group by a.cPCCode,a.cDCCode,a.cECode,a.CheckPerson,p.cDepCode"; DataTable dt = clsSQLCommond.ExecQuery(sSQL);; s = Cls序列化.SerializeDataTableXml(dt); } catch (Exception ee) { s = ee.Message; } return(s); }
/// <summary> /// 获得发货库单信息 /// </summary> /// <param name="sCode"></param> /// <returns></returns> public DataTable dtDispatchList(string sCode) { string s = ws.sDispatchList(sCode); if (s.Length > 0) { DataTable dt = Cls序列化.DeserializeDataTable(s); return(dt); } else { return(null); } }
/// <summary> /// 获得盘点单信息 /// </summary> /// <param name="sCode"></param> /// <returns></returns> public DataTable dtCheckVouch(string sCode) { string s = ws.sCheckVouch(sCode); if (s.Length > 0) { DataTable dt = Cls序列化.DeserializeDataTable(s); return(dt); } else { return(null); } }
/// <summary> /// 获得条形码信息 /// </summary> /// <param name="sBarCode"></param> /// <returns></returns> public DataTable dtScanBarCode(string sBarCode) { string s = ws.dtScanBarCode(sBarCode); if (s.Length > 0) { DataTable dt = Cls序列化.DeserializeDataTable(s); return(dt); } else { return(null); } }
/// <summary> /// 获得委外订单信息 /// </summary> /// <param name="sCode"></param> /// <returns></returns> public DataTable dtOMRdrecord01(string sCode, string sInvCode) { string s = ws.sOMRdrecord01(sCode, sInvCode); if (s.Length > 0) { DataTable dt = Cls序列化.DeserializeDataTable(s); return(dt); } else { return(null); } }
public string dt生产订单信息(string sDid) { string s = ""; try { string sSQL = "select a.MoCode,b.SortSeq from mom_order a inner join mom_orderdetail b on a.moid = b.moid where b.MoDid = " + sDid.ToString() + " and b.Status = 3"; DataTable dt = SqlHelper.ExecuteDataset(ClsBaseDataInfo.sConnString, CommandType.Text, sSQL).Tables[0]; s = Cls序列化.SerializeDataTableXml(dt); } catch (Exception ee) { s = ee.Message; } return(s); }
public string dt生产订单子件信息(string sCode, string sRowNo, string sInvCode) { string s = ""; try { string sSQL = "select * from mom_order a inner join mom_orderdetail b on a.moid = b.moid inner join mom_moallocate c on c.MoDId = b.Modid where a.mocode = '" + sCode.Trim() + "' and b.SortSeq = '" + sRowNo + "' and c.InvCode = '" + sInvCode + "'"; DataTable dt = SqlHelper.ExecuteDataset(ClsBaseDataInfo.sConnString, CommandType.Text, sSQL).Tables[0]; s = Cls序列化.SerializeDataTableXml(dt); } catch (Exception ee) { s = ee.Message; } return(s); }
public string LookUpInventory() { string s = ""; try { string sSQL = @"select cInvCode,cInvName,cInvStd,a.cComunitCode,b.cComunitName from Inventory a left join ComputationUnit b on a.cComunitCode=b.cComunitCode where 1=1 order by cInvCode"; DataTable dt = clsSQLCommond.ExecQuery(sSQL);; s = Cls序列化.SerializeDataTableXml(dt); } catch (Exception ee) { s = ee.Message; } return(s); }
public string LookUpPerson() { string s = ""; try { string sSQL = @"select PersonCode,PersonName from Person where 1=1 order by PersonCode"; DataTable dt = clsSQLCommond.ExecQuery(sSQL);; s = Cls序列化.SerializeDataTableXml(dt); } catch (Exception ee) { s = ee.Message; } return(s); }
public string LookUpDepartment() { string s = ""; try { string sSQL = "select cDepCode,cDepName from dbo.Department where 1=1 order by cDepCode"; DataTable dt = clsSQLCommond.ExecQuery(sSQL); s = Cls序列化.SerializeDataTableXml(dt); } catch (Exception ee) { s = ee.Message; } return(s); }
public string LookUpComputationUnit() { string s = ""; try { string sSQL = @"select cComunitCode,cComunitName from ComputationUnit order by cComunitCode"; DataTable dt = clsSQLCommond.ExecQuery(sSQL);; s = Cls序列化.SerializeDataTableXml(dt); } catch (Exception ee) { s = ee.Message; } return(s); }
public string LookUpUserInfo() { string s = ""; try { string sSQL = @"select vchrUid,vchrName from _UserInfo where 1=1 order by vchrUid"; DataTable dt = clsSQLCommond.ExecQuery(sSQL);; s = Cls序列化.SerializeDataTableXml(dt); } catch (Exception ee) { s = ee.Message; } return(s); }
public string LookUpLoopUpData(string id) { string s = ""; try { string sSQL = "select convert(nvarchar(50),iID) as iID,iText from dbo._LookUpDate where iType = '" + id + "' and isnull(bClose,1) = 1 order by iID"; DataTable dt = clsSQLCommond.ExecQuery(sSQL);; s = Cls序列化.SerializeDataTableXml(dt); } catch (Exception ee) { s = ee.Message; } return(s); }
public string LookUpRdRecord() { string s = ""; try { string sSQL = @"select cRdCode from RdRecord where 1=1 order by cRdCode"; DataTable dt = clsSQLCommond.ExecQuery(sSQL);; s = Cls序列化.SerializeDataTableXml(dt); } catch (Exception ee) { s = ee.Message; } return(s); }
public string LookUpSecurity() { string s = ""; try { string sSQL = @"select cSCode, cSName from Security where 1=1 order by cSCode"; DataTable dt = clsSQLCommond.ExecQuery(sSQL);; s = Cls序列化.SerializeDataTableXml(dt); } catch (Exception ee) { s = ee.Message; } return(s); }
public string LookUpLookUpType() { string s = ""; try { string sSQL = "select iID, iType from dbo._LookUpType order by iID"; DataTable dt = clsSQLCommond.ExecQuery(sSQL);; s = Cls序列化.SerializeDataTableXml(dt); } catch (Exception ee) { s = ee.Message; } return(s); }
public string LookUpDistrictClass() { string s = ""; try { string sSQL = @"select cDCCode,cDCName from DistrictClass where 1=1 order by cDCCode"; DataTable dt = clsSQLCommond.ExecQuery(sSQL);; s = Cls序列化.SerializeDataTableXml(dt); } catch (Exception ee) { s = ee.Message; } return(s); }
public string dt() { string s = ""; try { sSQL = "select *, 'edit' as iSave from " + tablename; DataTable dt = clsSQLCommond.ExecQuery(sSQL);; s = Cls序列化.SerializeDataTableXml(dt); } catch (Exception ee) { s = ee.Message; } return(s); }