4在位置0处没有任何行

Rotel-刘志东 2010-04-30 05:49:51
asp.net
...全文
891 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
gdlpc 2010-05-01
  • 打赏
  • 举报
回复
这个“4”是什么意思?
vip__888 2010-04-30
  • 打赏
  • 举报
回复
这样的代码怎么会出现。。。
wanghuaide 2010-04-30
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 huming_h 的回复:]

这代码写的也太不环保了。。。。
[/Quote]
有时候确实要注意呀,要么就把这一大段写成一个函数,要么就先判断,放在程序最前面,或者最后面。呵呵,有时候我也不会注意这些
mngzilin 2010-04-30
  • 打赏
  • 举报
回复
好多代码
xray2005 2010-04-30
  • 打赏
  • 举报
回复
。。。。

代码太糟糕了。想帮你都没办法。

相同的代码,你可以写成一个。
antony1029 2010-04-30
  • 打赏
  • 举报
回复
这个只能自己单步调试了啊。
wuyq11 2010-04-30
  • 打赏
  • 举报
回复
单步跟踪
微工程 2010-04-30
  • 打赏
  • 举报
回复
加断点调试
Peter200694013 2010-04-30
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 lzd_83 的回复:]
4在位置0处没有任何行
[/Quote]
哪行出错了?
huming_h 2010-04-30
  • 打赏
  • 举报
回复
这代码写的也太不环保了。。。。
Rotel-刘志东 2010-04-30
  • 打赏
  • 举报
回复
4在位置0处没有任何行
Rotel-刘志东 2010-04-30
  • 打赏
  • 举报
回复
     #region 生成导入信息表

if (dbEmptyQty >0 )
{
#region 生成串货信息

if (Convert.ToDecimal(xn.Attributes["Quantity"].Value )>0 )
{
if (i == 0)
{
InsertBatchLine(ref xmlSAPDoc, xmlSAPDocCopy, i, ChuanHuoPiCi, dbEmptyQty, "Y");
xmlSAPDoc.SelectSingleNode("//ZBGY:ItemCode", nsmgr).InnerText = ChuanHuo;
xmlSAPDoc.SelectSingleNode("//ZBGY:PriceAfterVAT", nsmgr).InnerText = xn.Attributes["Price"].Value;
xmlSAPDoc.SelectSingleNode("//ZBGY:Quantity", nsmgr).InnerText = dbEmptyQty.ToString();
xmlSAPDoc.SelectSingleNode("//ZBGY:VatGroup", nsmgr).InnerText = "x0";
xmlSAPDoc.SelectSingleNode("//ZBGY:WarehouseCode", nsmgr).InnerText = m_Depart.Store;
xmlSAPDoc.SelectSingleNode("//ZBGY:U_001", nsmgr).InnerText = xn.Attributes["OrderID"].Value; //订单号
xmlSAPDoc.SelectSingleNode("//ZBGY:U_002", nsmgr).InnerText = sl["U_002"].ToString(); //
xmlSAPDoc.SelectSingleNode("//ZBGY:U_003", nsmgr).InnerText = xn.Attributes["Saler"].Value;
xmlSAPDoc.SelectSingleNode("//ZBGY:U_004", nsmgr).InnerText = sl["U_004"].ToString();
xmlSAPDoc.SelectSingleNode("//ZBGY:U_005", nsmgr).InnerText = xn.Attributes["VIPID"].Value;
xmlSAPDoc.SelectSingleNode("//ZBGY:U_006", nsmgr).InnerText = xn.Attributes["Casher"].Value;
xmlSAPDoc.SelectSingleNode("//ZBGY:U_007", nsmgr).InnerText = xn.Attributes["Class"].Value;
xmlSAPDoc.SelectSingleNode("//ZBGY:U_008", nsmgr).InnerText = xn.Attributes["Item"].Value;
//xmlSAPDoc.SelectSingleNode("//ZBGY:U_009", nsmgr).InnerText = dbEmptyQty.ToString();
F1 = true;
i = i + 1;
}
else
{
xmlNodeList = GetEmptyOrderLineXML(xmlSAPDocCopy);
InsertBatchLine(ref xmlSAPDoc, xmlSAPDocCopy, i, ChuanHuoPiCi, dbEmptyQty, "N");
xmlNodeList.Item(0).SelectSingleNode("//ZBGY:ItemCode", nsmgr).InnerText = ChuanHuo;
xmlNodeList.Item(0).SelectSingleNode("//ZBGY:PriceAfterVAT", nsmgr).InnerText = xn.Attributes["Price"].Value;
xmlNodeList.Item(0).SelectSingleNode("//ZBGY:Quantity", nsmgr).InnerText = dbEmptyQty.ToString();
xmlNodeList.Item(0).SelectSingleNode("//ZBGY:VatGroup", nsmgr).InnerText = "x0";
xmlNodeList.Item(0).SelectSingleNode("//ZBGY:WarehouseCode", nsmgr).InnerText = m_Depart.Store;
xmlNodeList.Item(0).SelectSingleNode("//ZBGY:U_001", nsmgr).InnerText = xn.Attributes["OrderID"].Value; //订单号
xmlNodeList.Item(0).SelectSingleNode("//ZBGY:U_002", nsmgr).InnerText = sl["U_002"].ToString(); //
xmlNodeList.Item(0).SelectSingleNode("//ZBGY:U_003", nsmgr).InnerText = xn.Attributes["Saler"].Value;
xmlNodeList.Item(0).SelectSingleNode("//ZBGY:U_004", nsmgr).InnerText = sl["U_004"].ToString();
xmlNodeList.Item(0).SelectSingleNode("//ZBGY:U_005", nsmgr).InnerText = xn.Attributes["VIPID"].Value;
xmlNodeList.Item(0).SelectSingleNode("//ZBGY:U_006", nsmgr).InnerText = xn.Attributes["Casher"].Value;
xmlNodeList.Item(0).SelectSingleNode("//ZBGY:U_007", nsmgr).InnerText = xn.Attributes["Class"].Value;
xmlNodeList.Item(0).SelectSingleNode("//ZBGY:U_008", nsmgr).InnerText = xn.Attributes["Item"].Value;
//xmlNodeList.Item(0).SelectSingleNode("//ZBGY:U_009", nsmgr).InnerText = dbEmptyQty.ToString();
xmlSAPDoc = DIxmlObj.InsertNodeToXMLDocument(xmlSAPDoc, xmlNodeList.Item(0), "Document_Lines");
i = i + 1;
}
}
else if (Convert.ToDecimal(xn.Attributes["Quantity"].Value )<0)
{
if (m == 0)
{
InsertReturnBatchLine(ref xmlSAPReturns, xmlSAPReturnsCopy, m, ChuanHuoPiCi, dbEmptyQty, "Y");
xmlSAPReturns.SelectSingleNode("//ZBGY:ItemCode", nsmgr1).InnerText = ChuanHuo;
xmlSAPReturns.SelectSingleNode("//ZBGY:PriceAfterVAT", nsmgr1).InnerText = xn.Attributes["Price"].Value;
xmlSAPReturns.SelectSingleNode("//ZBGY:Quantity", nsmgr1).InnerText = dbEmptyQty.ToString();
xmlSAPReturns.SelectSingleNode("//ZBGY:VatGroup", nsmgr1).InnerText = "x0";
xmlSAPReturns.SelectSingleNode("//ZBGY:WarehouseCode", nsmgr1).InnerText = m_Depart.Store;
xmlSAPReturns.SelectSingleNode("//ZBGY:U_001", nsmgr1).InnerText = xn.Attributes["OrderID"].Value; //订单号
xmlSAPReturns.SelectSingleNode("//ZBGY:U_002", nsmgr1).InnerText = sl["U_002"].ToString(); //
xmlSAPReturns.SelectSingleNode("//ZBGY:U_003", nsmgr1).InnerText = xn.Attributes["Saler"].Value;
xmlSAPReturns.SelectSingleNode("//ZBGY:U_004", nsmgr1).InnerText = sl["U_004"].ToString();
xmlSAPReturns.SelectSingleNode("//ZBGY:U_005", nsmgr1).InnerText = xn.Attributes["VIPID"].Value;
xmlSAPReturns.SelectSingleNode("//ZBGY:U_006", nsmgr1).InnerText = xn.Attributes["Casher"].Value;
xmlSAPReturns.SelectSingleNode("//ZBGY:U_007", nsmgr1).InnerText = xn.Attributes["Class"].Value;
xmlSAPReturns.SelectSingleNode("//ZBGY:U_008", nsmgr1).InnerText = xn.Attributes["Item"].Value;
//xmlSAPReturns.SelectSingleNode("//ZBGY:U_009", nsmgr1).InnerText = dbEmptyQty.ToString();
F2 = true;
m = m + 1;
}
else
{
xmlNodeList = GetEmptyReturnOrderLineXML(xmlSAPReturnsCopy);
InsertReturnBatchLine(ref xmlSAPReturns, xmlSAPReturnsCopy, m, ChuanHuoPiCi, dbEmptyQty, "N");
xmlNodeList.Item(0).SelectSingleNode("//ZBGY:ItemCode", nsmgr1).InnerText = ChuanHuo;
xmlNodeList.Item(0).SelectSingleNode("//ZBGY:PriceAfterVAT", nsmgr1).InnerText = xn.Attributes["Price"].Value;
xmlNodeList.Item(0).SelectSingleNode("//ZBGY:Quantity", nsmgr1).InnerText = dbEmptyQty.ToString();
xmlNodeList.Item(0).SelectSingleNode("//ZBGY:VatGroup", nsmgr1).InnerText = "x0";
xmlNodeList.Item(0).SelectSingleNode("//ZBGY:WarehouseCode", nsmgr1).InnerText = m_Depart.Store;
xmlNodeList.Item(0).SelectSingleNode("//ZBGY:U_001", nsmgr1).InnerText = xn.Attributes["OrderID"].Value; //订单号
xmlNodeList.Item(0).SelectSingleNode("//ZBGY:U_002", nsmgr1).InnerText = sl["U_002"].ToString(); //
xmlNodeList.Item(0).SelectSingleNode("//ZBGY:U_003", nsmgr1).InnerText = xn.Attributes["Saler"].Value;
xmlNodeList.Item(0).SelectSingleNode("//ZBGY:U_004", nsmgr1).InnerText = sl["U_004"].ToString();
xmlNodeList.Item(0).SelectSingleNode("//ZBGY:U_005", nsmgr1).InnerText = xn.Attributes["VIPID"].Value;
xmlNodeList.Item(0).SelectSingleNode("//ZBGY:U_006", nsmgr1).InnerText = xn.Attributes["Casher"].Value;
xmlNodeList.Item(0).SelectSingleNode("//ZBGY:U_007", nsmgr1).InnerText = xn.Attributes["Class"].Value;
xmlNodeList.Item(0).SelectSingleNode("//ZBGY:U_008", nsmgr1).InnerText = xn.Attributes["Item"].Value;
//xmlNodeList.Item(0).SelectSingleNode("//ZBGY:U_009", nsmgr1).InnerText = dbEmptyQty.ToString();
xmlSAPReturns = DIxmlObj.InsertNodeToXMLDocument(xmlSAPReturns, xmlNodeList.Item(0), "Document_Lines");
m = m + 1;
}
Peter200694013 2010-04-30
  • 打赏
  • 举报
回复
什么意思?

62,046

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧