| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 907 人关注过本帖
标题:[求助]有关"核对"的问题
只看楼主 加入收藏
ivory_tt
Rank: 1
等 级:新手上路
帖 子:58
专家分:0
注 册:2006-3-1
收藏
得分:0 
[求助]
怎么每人里我

2007-02-12 14:55
bygg
Rank: 16Rank: 16Rank: 16Rank: 16
来 自:乖乖的心中
等 级:版主
威 望:241
帖 子:13555
专家分:3076
注 册:2006-10-23
收藏
得分:0 
你有问题吗?

飘过~~
2007-02-12 15:56
cyyu_ryh
Rank: 8Rank: 8
等 级:贵宾
威 望:45
帖 子:1899
专家分:176
注 册:2006-10-21
收藏
得分:0 
不可能哦
这么清楚呢?
我再修改了下,看是否清楚.

有事无事都密我. MSN: cyyu_ryh@hotmail.co.jp E-mail: cyyu_ryh@
2007-02-13 08:51
Kendy123456
Rank: 10Rank: 10Rank: 10
等 级:贵宾
威 望:62
帖 子:2720
专家分:0
注 册:2007-1-3
收藏
得分:0 
你的需求看得很明白
但是不明白你的问题在哪.

你总归有点代码吧 难道要别人做一个完整的给你?

2007-02-13 11:40
bygg
Rank: 16Rank: 16Rank: 16Rank: 16
来 自:乖乖的心中
等 级:版主
威 望:241
帖 子:13555
专家分:3076
注 册:2006-10-23
收藏
得分:0 
我觉得就是一个SQL语言..

[此贴子已经被作者于2007-2-13 12:33:55编辑过]



飘过~~
2007-02-13 12:33
cyyu_ryh
Rank: 8Rank: 8
等 级:贵宾
威 望:45
帖 子:1899
专家分:176
注 册:2006-10-21
收藏
得分:0 
[求助]请大家看下第二页,帮忙改下

我把代码修改了下,核对是可以了,但是提示还不行.只要点"核对"按钮就报错.主要是获取物资的名称,现在无法获取.
Input string was not in a correct format.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.FormatException: Input string was not in a correct format.

Source Error:


Line 208:MinCount[i] = int.Parse(this.gv_Massage.Rows[i].Cells[4].Text.Trim()); //获取最低数量值
Line 209: SaveCount[i] = int.Parse(this.gv_TakesInventoryMessage.Rows[i].Cells[2].Text.Trim());//获取库存数量
Line 210: m_MaterailCaption[i] = int.Parse(this.gv_Massage.Rows[i].Cells[3].Text.Trim());//获取物资名称
Line 211: if (MinCount[i] < SaveCount[i]) //当最低数量小于库存数量
Line 212: {

Source File: d:\Csharp\MaterialMIS\MaterialMIS\MaterialInfo\TakesInventory.aspx.cs Line: 210


代码如下(红色为相关的代码):

protected void btn_DataCheckup_Click(object sender, EventArgs e)
{
int row = this.gv_Massage.Rows.Count; //取物资盘存信息清单的行数
int rows = this.gv_TakesInventoryMessage.Rows.Count; //取物资库存信息表的行数
//比较行数
if (row != rows)
{
ScriptUtils.AlertAndFocus("数据表中的行数不一致,不能进行核对!", "txt_ID", this);
return;
}
else
{
//定义数组w
int[] MinCount = new int[20];
int[] SaveCount = new int[20];
int[] m_MaterailCaption = new int[20];
for (int i = 0; i < rows; i++)
{
//获取列的值
MinCount[i] = int.Parse(this.gv_Massage.Rows[i].Cells[4].Text.Trim());//获取最低数量值
SaveCount[i] = int.Parse(this.gv_TakesInventoryMessage.Rows[i].Cells[2].Text.Trim());//获取库存数量
m_MaterailCaption[i] = int.Parse(this.gv_Massage.Rows[i].Cells[3].Text.Trim()); //获取物资名称
if (MinCount[i] < SaveCount[i]) //当最低数量小于库存数量
{
lb_ErrorMessage.Text += "<font color='#ff0000'>";
lb_ErrorMessage.Text += "物资名称为:['"+ m_MaterailCaption +"'],数据不一致,表现为盘亏,请修改.";
lb_ErrorMessage.Text += "</font>";
}
else
{
if (MinCount[i] > SaveCount[i]) //当最低数量大于库存数量
{
lb_ErrorMessage.Text += "<font color='#ff0000'>";
lb_ErrorMessage.Text += "物资名称为:['"+ m_MaterailCaption +"'],数据不一致,表现为盘溢,请修改.";
lb_ErrorMessage.Text += "</font>";
}
else { }
}
}
}




[此贴子已经被作者于2007-2-26 15:56:32编辑过]


有事无事都密我. MSN: cyyu_ryh@hotmail.co.jp E-mail: cyyu_ryh@
2007-02-13 13:03
快速回复:[求助]有关"核对"的问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.024809 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved