提交代码

This commit is contained in:
高飞 2024-09-04 08:50:19 +08:00
parent d8438a5c76
commit 05fdae93a8
5 changed files with 247 additions and 21 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress>false</Use64BitIISExpress>
<IISExpressSSLPort />

View File

@ -12,7 +12,7 @@
<appSettings>
<!--连接字符串-->
<!--<add key="ConnectionString" value="Server=.;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>-->
<add key="ConnectionString" value="Server=.\SQL2012;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>
<add key="ConnectionString" value="Server=.;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>
<!--系统名称-->
<add key="SystemName" value="智慧施工管理信息系统V1.0"/>
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/Images/;"/>

View File

@ -131,22 +131,22 @@ namespace FineUIPro.Web.ZHGL.Environmental
Grid1.Rows[0].CellCssClasses[5] = "f-grid-cell-uneditable";
Grid1.Rows[14].CellCssClasses[4] = "f-grid-cell-uneditable";
Grid1.Rows[14].CellCssClasses[5] = "f-grid-cell-uneditable";
//Grid1.Rows[16].CellCssClasses[4] = "f-grid-cell-uneditable";
//Grid1.Rows[16].CellCssClasses[5] = "f-grid-cell-uneditable";
Grid1.Rows[16].CellCssClasses[4] = "f-grid-cell-uneditable";
Grid1.Rows[16].CellCssClasses[5] = "f-grid-cell-uneditable";
//Grid1.Rows[17].CellCssClasses[4] = "f-grid-cell-uneditable";
//Grid1.Rows[17].CellCssClasses[5] = "f-grid-cell-uneditable";
Grid1.Rows[18].CellCssClasses[4] = "f-grid-cell-uneditable";
Grid1.Rows[18].CellCssClasses[5] = "f-grid-cell-uneditable";
//Grid1.Rows[20].CellCssClasses[4] = "f-grid-cell-uneditable";
//Grid1.Rows[20].CellCssClasses[5] = "f-grid-cell-uneditable";
Grid1.Rows[20].CellCssClasses[4] = "f-grid-cell-uneditable";
Grid1.Rows[20].CellCssClasses[5] = "f-grid-cell-uneditable";
//Grid1.Rows[21].CellCssClasses[4] = "f-grid-cell-uneditable";
//Grid1.Rows[21].CellCssClasses[5] = "f-grid-cell-uneditable";
//Grid1.Rows[22].CellCssClasses[4] = "f-grid-cell-uneditable";
//Grid1.Rows[22].CellCssClasses[5] = "f-grid-cell-uneditable";
Grid1.Rows[22].CellCssClasses[4] = "f-grid-cell-uneditable";
Grid1.Rows[22].CellCssClasses[5] = "f-grid-cell-uneditable";
//Grid1.Rows[24].CellCssClasses[4] = "f-grid-cell-uneditable";
//Grid1.Rows[24].CellCssClasses[5] = "f-grid-cell-uneditable";
//Grid1.Rows[36].CellCssClasses[4] = "f-grid-cell-uneditable";
//Grid1.Rows[36].CellCssClasses[5] = "f-grid-cell-uneditable";
Grid1.Rows[36].CellCssClasses[4] = "f-grid-cell-uneditable";
Grid1.Rows[36].CellCssClasses[5] = "f-grid-cell-uneditable";
Grid1.Rows[58].CellCssClasses[4] = "f-grid-cell-uneditable";
Grid1.Rows[58].CellCssClasses[5] = "f-grid-cell-uneditable";
}
@ -542,8 +542,8 @@ namespace FineUIPro.Web.ZHGL.Environmental
private void GetData()
{
decimal E6 = 0, F6 = 0, E7 = 0, F7 = 0, E8, F8, E9 = 0, F9 = 0, E10 = 0, F10 = 0, E11 = 0, F11 = 0, E12 = 0, F12 = 0, E13 = 0, F13 = 0, E14 = 0, F14 = 0, E15 = 0, F15 = 0, E16 = 0, F16 = 0, E17 = 0, F17 = 0, E18 = 0, F18 = 0, E20 = 0, F20 = 0, E21 = 0, F21 = 0, E22 = 0, F22 = 0,
E24 = 0, F24 = 0, E25 = 0, F25 = 0, E26 = 0, F26 = 0, E27 = 0, F27 = 0, E28, F28, E29 = 0, F29 = 0, E30, F30, E31, F31, E32, F32, E33, F33, E34, F34, E35, F35, E36, F36, E37, F37, E38, F38, E39, F39, E40, F40, E41 = 0, F41 = 0,
E42, F42, E43, F43, E44, F44, E45, F45, E46, F46, E47, F47, E48, F48, E49, F49, E50, F50, E51, F51, E52, F52, E53, F53, E54, F54, E55, F55,
E24 = 0, F24 = 0, E25 = 0, F25 = 0, E26 = 0, F26 = 0, E27 = 0, F27 = 0, E28 = 0, F28 = 0, E29 = 0, F29 = 0, E30, F30, E31, F31, E32, F32, E33, F33, E34, F34, E35, F35, E36, F36, E37, F37, E38, F38, E39, F39, E40, F40, E41 = 0, F41 = 0,
E42 = 0, F42 = 0, E43, F43, E44, F44, E45, F45, E46, F46, E47, F47, E48, F48, E49, F49, E50, F50, E51, F51, E52, F52, E53, F53, E54, F54, E55, F55,
E56, F56, E57, F57, E58, F58, E59, F59, E60, F60, E61, F61, E62, F62, E64 = 0, F64 = 0, E65 = 0, F65 = 0;
JArray mergedData = Grid1.GetMergedData();
foreach (JObject mergedRow in mergedData)
@ -1105,6 +1105,18 @@ namespace FineUIPro.Web.ZHGL.Environmental
{
this.Grid1.Rows[14].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[14].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[14].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[14].Values[4].ToString()), 2).ToString() + "%";
}
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E22 > 0)
{
this.Grid1.Rows[16].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E22, 4);
}
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F22 > 0)
{
this.Grid1.Rows[16].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) * 10000 / F22, 4);
}
if (!string.IsNullOrEmpty(this.Grid1.Rows[16].Values[4].ToString()) && this.Grid1.Rows[16].Values[4].ToString() != "0" && !string.IsNullOrEmpty(this.Grid1.Rows[16].Values[5].ToString()))
{
this.Grid1.Rows[16].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[16].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[16].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[16].Values[4].ToString()), 2).ToString() + "%";
}
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E24 > 0)
{
this.Grid1.Rows[18].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E24, 4);
@ -1117,6 +1129,42 @@ namespace FineUIPro.Web.ZHGL.Environmental
{
this.Grid1.Rows[18].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[18].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[18].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[18].Values[4].ToString()), 2).ToString() + "%";
}
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E26 > 0)
{
this.Grid1.Rows[20].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E26, 4);
}
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F26 > 0)
{
this.Grid1.Rows[20].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) * 10000 / F26, 4);
}
if (!string.IsNullOrEmpty(this.Grid1.Rows[20].Values[4].ToString()) && this.Grid1.Rows[20].Values[4].ToString() != "0" && !string.IsNullOrEmpty(this.Grid1.Rows[20].Values[5].ToString()))
{
this.Grid1.Rows[20].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[20].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[20].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[20].Values[4].ToString()), 2).ToString() + "%";
}
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E28 > 0)
{
this.Grid1.Rows[22].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E28, 4);
}
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F28 > 0)
{
this.Grid1.Rows[22].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) * 10000 / F28, 4);
}
if (!string.IsNullOrEmpty(this.Grid1.Rows[22].Values[4].ToString()) && this.Grid1.Rows[22].Values[4].ToString() != "0" && !string.IsNullOrEmpty(this.Grid1.Rows[22].Values[5].ToString()))
{
this.Grid1.Rows[22].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[22].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[22].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[22].Values[4].ToString()), 2).ToString() + "%";
}
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E42 > 0)
{
this.Grid1.Rows[36].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E42, 4);
}
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F42 > 0)
{
this.Grid1.Rows[36].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) * 10000 / F42, 4);
}
if (!string.IsNullOrEmpty(this.Grid1.Rows[36].Values[4].ToString()) && this.Grid1.Rows[36].Values[4].ToString() != "0" && !string.IsNullOrEmpty(this.Grid1.Rows[36].Values[5].ToString()))
{
this.Grid1.Rows[36].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[36].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[36].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[36].Values[4].ToString()), 2).ToString() + "%";
}
if (E64 > 0 && E65 > 0 && E20 > 0)
{
this.Grid1.Rows[58].Values[4] = decimal.Round((E64 + E65) / E20, 4);
@ -1232,6 +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;
}
Save("add");
ShowNotify("保存成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
@ -1239,11 +1307,51 @@ namespace FineUIPro.Web.ZHGL.Environmental
protected void btnUpdata_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;
}
Save("updata");
}
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;
}
Save("submit");
}
#endregion

View File

@ -124,8 +124,16 @@ namespace FineUIPro.Web.ZHGL.Environmental
Grid1.Rows[0].CellCssClasses[5] = "f-grid-cell-uneditable";
Grid1.Rows[15].CellCssClasses[4] = "f-grid-cell-uneditable";
Grid1.Rows[15].CellCssClasses[5] = "f-grid-cell-uneditable";
Grid1.Rows[17].CellCssClasses[4] = "f-grid-cell-uneditable";
Grid1.Rows[17].CellCssClasses[5] = "f-grid-cell-uneditable";
Grid1.Rows[19].CellCssClasses[4] = "f-grid-cell-uneditable";
Grid1.Rows[19].CellCssClasses[5] = "f-grid-cell-uneditable";
Grid1.Rows[21].CellCssClasses[4] = "f-grid-cell-uneditable";
Grid1.Rows[21].CellCssClasses[5] = "f-grid-cell-uneditable";
Grid1.Rows[23].CellCssClasses[4] = "f-grid-cell-uneditable";
Grid1.Rows[23].CellCssClasses[5] = "f-grid-cell-uneditable";
Grid1.Rows[68].CellCssClasses[4] = "f-grid-cell-uneditable";
Grid1.Rows[68].CellCssClasses[5] = "f-grid-cell-uneditable";
Grid1.Rows[96].CellCssClasses[4] = "f-grid-cell-uneditable";
Grid1.Rows[96].CellCssClasses[5] = "f-grid-cell-uneditable";
}
@ -140,20 +148,22 @@ namespace FineUIPro.Web.ZHGL.Environmental
Grid1.Rows[0].CellCssClasses[5] = "f-grid-cell-uneditable";
Grid1.Rows[15].CellCssClasses[4] = "f-grid-cell-uneditable";
Grid1.Rows[15].CellCssClasses[5] = "f-grid-cell-uneditable";
//Grid1.Rows[17].CellCssClasses[4] = "f-grid-cell-uneditable";
//Grid1.Rows[17].CellCssClasses[5] = "f-grid-cell-uneditable";
Grid1.Rows[17].CellCssClasses[4] = "f-grid-cell-uneditable";
Grid1.Rows[17].CellCssClasses[5] = "f-grid-cell-uneditable";
//Grid1.Rows[18].CellCssClasses[4] = "f-grid-cell-uneditable";
//Grid1.Rows[18].CellCssClasses[5] = "f-grid-cell-uneditable";
Grid1.Rows[19].CellCssClasses[4] = "f-grid-cell-uneditable";
Grid1.Rows[19].CellCssClasses[5] = "f-grid-cell-uneditable";
//Grid1.Rows[21].CellCssClasses[4] = "f-grid-cell-uneditable";
//Grid1.Rows[21].CellCssClasses[5] = "f-grid-cell-uneditable";
Grid1.Rows[21].CellCssClasses[4] = "f-grid-cell-uneditable";
Grid1.Rows[21].CellCssClasses[5] = "f-grid-cell-uneditable";
//Grid1.Rows[22].CellCssClasses[4] = "f-grid-cell-uneditable";
//Grid1.Rows[22].CellCssClasses[5] = "f-grid-cell-uneditable";
//Grid1.Rows[23].CellCssClasses[4] = "f-grid-cell-uneditable";
//Grid1.Rows[23].CellCssClasses[5] = "f-grid-cell-uneditable";
Grid1.Rows[23].CellCssClasses[4] = "f-grid-cell-uneditable";
Grid1.Rows[23].CellCssClasses[5] = "f-grid-cell-uneditable";
//Grid1.Rows[33].CellCssClasses[4] = "f-grid-cell-uneditable";
//Grid1.Rows[33].CellCssClasses[5] = "f-grid-cell-uneditable";
Grid1.Rows[68].CellCssClasses[4] = "f-grid-cell-uneditable";
Grid1.Rows[68].CellCssClasses[5] = "f-grid-cell-uneditable";
Grid1.Rows[96].CellCssClasses[4] = "f-grid-cell-uneditable";
Grid1.Rows[96].CellCssClasses[5] = "f-grid-cell-uneditable";
}
@ -792,10 +802,10 @@ namespace FineUIPro.Web.ZHGL.Environmental
private void GetData()
{
decimal E6 = 0, F6 = 0, E7 = 0, F7 = 0, E8, F8, E9, F9, E10 = 0, F10 = 0, E11 = 0, F11 = 0, E12 = 0, F12 = 0, E13 = 0, F13 = 0, E14 = 0, F14 = 0, E15 = 0, F15 = 0, E16 = 0, F16 = 0, E17 = 0, F17 = 0, E18 = 0, F18 = 0, E19 = 0, F19 = 0,
E21 = 0, F21 = 0, E22 = 0, F22 = 0, E23 = 0, F23 = 0, E25 = 0, F25 = 0, E26 = 0, F26 = 0, E27 = 0, F27 = 0, E28 = 0, F28 = 0, E29, F29, E30, F30, E31, F31, E32, F32, E33, F33, E34, F34, E35, F35, E36, F36, E37, F37, E38, F38, E39, F39, E40, F40, E41, F41,
E21 = 0, F21 = 0, E22 = 0, F22 = 0, E23 = 0, F23 = 0, E25 = 0, F25 = 0, E26 = 0, F26 = 0, E27 = 0, F27 = 0, E28 = 0, F28 = 0, E29 = 0, F29 = 0, E30, F30, E31, F31, E32, F32, E33, F33, E34, F34, E35, F35, E36, F36, E37, F37, E38, F38, E39, F39, E40, F40, E41, F41,
E42, F42, E43, F43, E44, F44, E45, F45, E46, F46, E47, F47, E48, F48, E49, F49, E50, F50, E51, F51, E52, F52, E53, F53, E54, F54, E55, F55,
E56, F56, E57, F57, E58, F58, E59, F59, E60, F60, E61, F61, E62, F62, E63, F63, E64, F64, E65, F65, E66, F66, E67, F67, E68, F68, E69, F69,
E70, F70, E71, F71, E72, F72, E73, F73, E74, F74, E75, F75, E76, F76, E77, F77, E78, F78, E79, F79, E80, F80, E81, F81, E82, F82, E83, F83,
E70, F70, E71, F71, E72, F72, E73, F73, E74 = 0, F74 = 0, E75, F75, E76, F76, E77, F77, E78, F78, E79, F79, E80, F80, E81, F81, E82, F82, E83, F83,
E84, F84, E85, F85, E86, F86, E87, F87, E88, F88, E89, F89, E90, F90, E91, F91, E92, F92, E93, F93, E94, F94, E95, F95, E96, F96, E97, F97,
E98, F98, E99, F99, E100, F100, E102 = 0, F102 = 0, E103 = 0, F103 = 0;
JArray mergedData = Grid1.GetMergedData();
@ -1700,6 +1710,18 @@ namespace FineUIPro.Web.ZHGL.Environmental
{
this.Grid1.Rows[15].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[15].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[15].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[15].Values[4].ToString()), 2).ToString() + "%";
}
if (E6 > 0 && E23 > 0)
{
this.Grid1.Rows[17].Values[4] = decimal.Round(E6 * 10000 / E23, 4);
}
if (F6 > 0 && F23 > 0)
{
this.Grid1.Rows[17].Values[5] = decimal.Round(F6 * 10000 / F23, 4);
}
if (!string.IsNullOrEmpty(this.Grid1.Rows[17].Values[4].ToString()) && this.Grid1.Rows[17].Values[4].ToString() != "0" && !string.IsNullOrEmpty(this.Grid1.Rows[17].Values[5].ToString()))
{
this.Grid1.Rows[17].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[17].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[17].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[17].Values[4].ToString()), 2).ToString() + "%";
}
if (E6 > 0 && E25 > 0)
{
this.Grid1.Rows[19].Values[4] = decimal.Round(E6 * 10000 / E25, 4);
@ -1712,6 +1734,42 @@ namespace FineUIPro.Web.ZHGL.Environmental
{
this.Grid1.Rows[19].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[19].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[19].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[19].Values[4].ToString()), 2).ToString() + "%";
}
if (E6 > 0 && E27 > 0)
{
this.Grid1.Rows[21].Values[4] = decimal.Round(E6 * 10000 / E27, 4);
}
if (F6 > 0 && F27 > 0)
{
this.Grid1.Rows[21].Values[5] = decimal.Round(F6 * 10000 / F27, 4);
}
if (!string.IsNullOrEmpty(this.Grid1.Rows[21].Values[4].ToString()) && this.Grid1.Rows[21].Values[4].ToString() != "0" && !string.IsNullOrEmpty(this.Grid1.Rows[21].Values[5].ToString()))
{
this.Grid1.Rows[21].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[21].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[21].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[21].Values[4].ToString()), 2).ToString() + "%";
}
if (E6 > 0 && E29 > 0)
{
this.Grid1.Rows[23].Values[4] = decimal.Round(E6 * 10000 / E29, 4);
}
if (F6 > 0 && F29 > 0)
{
this.Grid1.Rows[23].Values[5] = decimal.Round(F6 * 10000 / F29, 4);
}
if (!string.IsNullOrEmpty(this.Grid1.Rows[23].Values[4].ToString()) && this.Grid1.Rows[23].Values[4].ToString() != "0" && !string.IsNullOrEmpty(this.Grid1.Rows[23].Values[5].ToString()))
{
this.Grid1.Rows[23].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[23].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[23].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[23].Values[4].ToString()), 2).ToString() + "%";
}
if (E6 > 0 && E74 > 0)
{
this.Grid1.Rows[68].Values[4] = decimal.Round(E6 * 10000 / E74, 4);
}
if (F6 > 0 && F74 > 0)
{
this.Grid1.Rows[68].Values[5] = decimal.Round(F6 * 10000 / F74, 4);
}
if (!string.IsNullOrEmpty(this.Grid1.Rows[68].Values[4].ToString()) && this.Grid1.Rows[68].Values[4].ToString() != "0" && !string.IsNullOrEmpty(this.Grid1.Rows[68].Values[5].ToString()))
{
this.Grid1.Rows[68].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[68].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[68].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[68].Values[4].ToString()), 2).ToString() + "%";
}
if (E102 > 0 && E103 > 0 && E21 > 0)
{
this.Grid1.Rows[96].Values[4] = decimal.Round((E102 + E103) / E21, 4);
@ -1844,6 +1902,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 == "19" || sortIndex == "69" || sortIndex == "70")
{
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());
@ -1851,11 +1929,51 @@ namespace FineUIPro.Web.ZHGL.Environmental
protected void btnUpdata_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 == "19" || sortIndex == "69" || sortIndex == "70")
{
if (Funs.GetNewDecimalOrZero(System.Web.HttpUtility.HtmlDecode(values.Value<string>("ThisYearValue"))) == 0)
{
isEmpty = true;
break;
}
}
}
if (isEmpty)
{
ShowNotify("工业总产值(可比价)、万元产值二氧化碳排放(可比价)和二氧化碳排放量不能为空,必须填报数据!", MessageBoxIcon.Warning);
return;
}
Save("updata");
}
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 == "19" || sortIndex == "69" || sortIndex == "70")
{
if (Funs.GetNewDecimalOrZero(System.Web.HttpUtility.HtmlDecode(values.Value<string>("ThisYearValue"))) == 0)
{
isEmpty = true;
break;
}
}
}
if (isEmpty)
{
ShowNotify("工业总产值(可比价)、万元产值二氧化碳排放(可比价)和二氧化碳排放量不能为空,必须填报数据!", MessageBoxIcon.Warning);
return;
}
Save("submit");
}
#endregion

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress />
<IISExpressSSLPort />