C/S 客户端数据错误 现在有个C#编写的ERP程序 在数据库里取值放到前台 但是现在有一部分客户端显示正确值(2800) 一部分客户端显示错误值(这个值比真实值小,是2241) ,后台代码是一样的,为什么两台机器有这个差异呢这是什么原因 大家有遇到过吗 ? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 double byzgsl = 0; double byzgje = 0; //单据和运费以及初始数据继续暂估入库(Inclassify=16或21或41) dt = bs.getDatabySQL("Data", "select isnull(sum(sl),0) as sl,isnull(sum(je6),0) as je from Material_ViewStoreHouseIn where (inclassify=15 or inclassify=21 or inclassify=41) and (inventorycoding='" + txtCoding.Text + "') and (date>='" + dpby1.Value.ToString("yyyy-MM-dd") + "') and (date<='" + dp3.Value.ToString("yyyy-MM-dd") + "')and(StoreHouseCoding='" + Convert.ToString(StoreHouse.Tag) + "')and(GoodsPlaceCoding='" + Convert.ToString(GoodsPlace.Tag) + "') and (invoicestate='未到') and (checkflag=1)"); if (dt.Rows.Count > 0) { double sl = Convert.ToDouble(dt.Rows[0]["sl"]); sl = num(sl.ToString("f3")); byzgsl += sl; byzgje += Convert.ToDouble(dt.Rows[0]["je"]); } else { byzgsl = 0; byzgje = 0; } //正常入库但是发票没到 dt = bs.getDatabySQL("Data", "select isnull(sum(sl),0) as sl,isnull(sum(je6),0) as je from Material_ViewStoreHouseIn where (inventorycoding='" + txtCoding.Text + "') and (invoicestate='未到') and inclassify=1 and (isnull(hostname,'')='')and(StoreHouseCoding='" + Convert.ToString(StoreHouse.Tag) + "')and(GoodsPlaceCoding='" + Convert.ToString(GoodsPlace.Tag) + "') and date>='" + rq1 + "' and date<='" + rq2 + "'"); if (dt.Rows.Count > 0) { byzgsl += Convert.ToDouble(dt.Rows[0]["sl"]); byzgje += Convert.ToDouble(dt.Rows[0]["je"]); } else { byzgsl = 0; byzgje = 0; } txtSL4.Text = byzgsl.ToString("0.0000"); txtJE4.Text = byzgje.ToString("0.00"); 设置断点跟踪一下SQL语句吧!看看取值的情况。 winform程序打包问题 这是不是VS的一个漏洞啊?请教 在一段时间内判断一件事情有没有发生 用treeview 替换ComboBox的下拉列框 vs2005 中 web应用程序如何打包 ? 100分求解:数组排序问题。要求不移动元素,按大小排序后的顺序在另一个数组记录,而且要考虑相同值情况。 求:NDoc For VS 2005(RTM.0502727-4200) 奇怪的问题,各位帮帮忙! 字符串的问题 反序列化的问题 C# WINFORM 鼠标事件问题 C# float m=1.0f; 我怎么格式成1.000并输出还是1.000?
double byzgje = 0;
//单据和运费以及初始数据继续暂估入库(Inclassify=16或21或41)
dt = bs.getDatabySQL("Data", "select isnull(sum(sl),0) as sl,isnull(sum(je6),0) as je from Material_ViewStoreHouseIn where (inclassify=15 or inclassify=21 or inclassify=41) and (inventorycoding='" + txtCoding.Text + "') and (date>='" + dpby1.Value.ToString("yyyy-MM-dd") + "') and (date<='" + dp3.Value.ToString("yyyy-MM-dd") + "')and(StoreHouseCoding='" + Convert.ToString(StoreHouse.Tag) + "')and(GoodsPlaceCoding='" + Convert.ToString(GoodsPlace.Tag) + "') and (invoicestate='未到') and (checkflag=1)");
if (dt.Rows.Count > 0)
{
double sl = Convert.ToDouble(dt.Rows[0]["sl"]);
sl = num(sl.ToString("f3")); byzgsl += sl;
byzgje += Convert.ToDouble(dt.Rows[0]["je"]);
}
else
{
byzgsl = 0;
byzgje = 0;
}
//正常入库但是发票没到
dt = bs.getDatabySQL("Data", "select isnull(sum(sl),0) as sl,isnull(sum(je6),0) as je from Material_ViewStoreHouseIn where (inventorycoding='" + txtCoding.Text + "') and (invoicestate='未到') and inclassify=1 and (isnull(hostname,'')='')and(StoreHouseCoding='" + Convert.ToString(StoreHouse.Tag) + "')and(GoodsPlaceCoding='" + Convert.ToString(GoodsPlace.Tag) + "') and date>='" + rq1 + "' and date<='" + rq2 + "'");
if (dt.Rows.Count > 0)
{
byzgsl += Convert.ToDouble(dt.Rows[0]["sl"]);
byzgje += Convert.ToDouble(dt.Rows[0]["je"]);
}
else
{
byzgsl = 0;
byzgje = 0;
}
txtSL4.Text = byzgsl.ToString("0.0000");
txtJE4.Text = byzgje.ToString("0.00");