|
反馈BUG
程序版本: |
FineUI V4.10 |
浏览器: |
Chrome IE10 其它(请在帖子中注明浏览器及版本) |
BUG截图: |
|
BUG地址: |
- |
问题描述,当编辑完“数量”之后,直接点击“进价”,这时候数量的值改变,金额计算完成,这时改变“进价”,再将光标移到“数量”上,“进价”的值无法给变。
//失去焦点(结束编辑)
protected void Grid1_AfterEdit(object sender, GridAfterEditEventArgs e)
{
Dictionary<int, Dictionary<string, object>> modifiedDict = Grid1.GetModifiedDict();
for (int i = 0, count = table.Rows.Count; i < count; i++)
{
if (modifiedDict.ContainsKey(i))
{
Dictionary<string, object> rowDict = modifiedDict;
DataRow rowData = table.Rows;
if (rowDict.ContainsKey("sl"))//数量
{
if (rowDict["sl"].ToString() != "")
{
if (Convert.ToDouble(rowDict["sl"]) >= 0)
{
rowData["sl"] = -Convert.ToDouble(rowDict["sl"]);
}
else
{
rowData["sl"] = rowDict["sl"];
}
}
}
if (rowDict.ContainsKey("jj"))//进价
{
rowData["jj"] = rowDict["jj"];
}
if (rowDict.ContainsKey("bz"))//备注
{
rowData["bz"] = rowDict["bz"];
}
}
}
double pz = 0; double sl = 0; double je = 0;
foreach (DataRow dr in table.Rows)
{
if (dr["id"].ToString() != table.Compute("max(id)", "").ToString())
{
pz++;
if (dr["sl"].ToString() != "")
{
sl += -Convert.ToDouble(dr["sl"]);
}
if (dr["sl"].ToString() != "" && dr["jj"].ToString() != "")
{
dr["je"] = -Convert.ToDouble(dr["sl"]) * Convert.ToDouble(dr["jj"]);
je += Convert.ToDouble(dr["je"]);
}
else
{
dr["je"] = 0;
je += Convert.ToDouble(dr["je"]);
}
}
}
this.TextBox2.Text = pz.ToString();
this.TextBox3.Text = sl.ToString();
this.TextBox4.Text = je.ToString();
BindGrid();
}
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|