提交代码
This commit is contained in:
@@ -1280,26 +1280,26 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
bool isEmpty = false;
|
||||
foreach (JObject mergedRow in Grid1.GetMergedData())
|
||||
{
|
||||
JObject values = mergedRow.Value<JObject>("values");
|
||||
int rowIndex = mergedRow.Value<int>("index");
|
||||
string sortIndex = values.Value<string>("SortIndex");
|
||||
if (sortIndex == "18" || sortIndex == "37" || sortIndex == "38")
|
||||
{
|
||||
if (Funs.GetNewDecimalOrZero(System.Web.HttpUtility.HtmlDecode(values.Value<string>("ThisYearValue"))) == 0)
|
||||
{
|
||||
isEmpty = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isEmpty)
|
||||
{
|
||||
ShowNotify("营业收入(可比价)、万元收入二氧化碳排放(可比价)和二氧化碳排放量不能为空,必须填报数据!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
//bool isEmpty = false;
|
||||
//foreach (JObject mergedRow in Grid1.GetMergedData())
|
||||
//{
|
||||
// JObject values = mergedRow.Value<JObject>("values");
|
||||
// int rowIndex = mergedRow.Value<int>("index");
|
||||
// string sortIndex = values.Value<string>("SortIndex");
|
||||
// if (sortIndex == "18" || sortIndex == "37" || sortIndex == "38")
|
||||
// {
|
||||
// if (Funs.GetNewDecimalOrZero(System.Web.HttpUtility.HtmlDecode(values.Value<string>("ThisYearValue"))) == 0)
|
||||
// {
|
||||
// isEmpty = true;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//if (isEmpty)
|
||||
//{
|
||||
// ShowNotify("营业收入(可比价)、万元收入二氧化碳排放(可比价)和二氧化碳排放量不能为空,必须填报数据!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
Save("add");
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
@@ -1332,26 +1332,26 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||
|
||||
protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
{
|
||||
bool isEmpty = false;
|
||||
foreach (JObject mergedRow in Grid1.GetMergedData())
|
||||
{
|
||||
JObject values = mergedRow.Value<JObject>("values");
|
||||
int rowIndex = mergedRow.Value<int>("index");
|
||||
string sortIndex = values.Value<string>("SortIndex");
|
||||
if (sortIndex == "18" || sortIndex == "37" || sortIndex == "38")
|
||||
{
|
||||
if (Funs.GetNewDecimalOrZero(System.Web.HttpUtility.HtmlDecode(values.Value<string>("ThisYearValue"))) == 0)
|
||||
{
|
||||
isEmpty = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isEmpty)
|
||||
{
|
||||
ShowNotify("营业收入(可比价)、万元收入二氧化碳排放(可比价)和二氧化碳排放量不能为空,必须填报数据!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
//bool isEmpty = false;
|
||||
//foreach (JObject mergedRow in Grid1.GetMergedData())
|
||||
//{
|
||||
// JObject values = mergedRow.Value<JObject>("values");
|
||||
// int rowIndex = mergedRow.Value<int>("index");
|
||||
// string sortIndex = values.Value<string>("SortIndex");
|
||||
// if (sortIndex == "18" || sortIndex == "37" || sortIndex == "38")
|
||||
// {
|
||||
// if (Funs.GetNewDecimalOrZero(System.Web.HttpUtility.HtmlDecode(values.Value<string>("ThisYearValue"))) == 0)
|
||||
// {
|
||||
// isEmpty = true;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//if (isEmpty)
|
||||
//{
|
||||
// ShowNotify("营业收入(可比价)、万元收入二氧化碳排放(可比价)和二氧化碳排放量不能为空,必须填报数据!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
Save("submit");
|
||||
}
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user