This commit is contained in:
佘春生 2024-10-21 15:53:48 +08:00
commit bc0aedc836
8 changed files with 31 additions and 61 deletions

6
.gitignore vendored
View File

@ -107,3 +107,9 @@ HJGL_ZH/BLL/bin/Release/NPOI.OpenXmlFormats.dll
/HJGL_ZH/Model /HJGL_ZH/Model
/HJGL_ZH_2024.10.21.rar /HJGL_ZH_2024.10.21.rar
/HJGL_ZH/WebAPI/Areas/HelpPage/SampleGeneration /HJGL_ZH/WebAPI/Areas/HelpPage/SampleGeneration
/HJGL_ZH/UpgradeLog2.htm
/HJGL_ZH/Model/bin/Release/Model.dll
/HJGL_ZH/Model/bin/Release/Model.pdb
/HJGL_ZH/Model/obj/Debug/Model.csproj.CoreCompileInputs.cache
/HJGL_ZH/Model/obj/Debug/Model.csprojAssemblyReference.cache
/HJGL_ZH/WebAPI/WebAPI.csproj.user

View File

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Data.SqlClient; using System.Data.SqlClient;
using System.Data; using System.Data;
using BLL; using BLL;
using System.Linq;
namespace FineUIPro.Web.HJGL.CheckManage namespace FineUIPro.Web.HJGL.CheckManage
{ {

View File

@ -118,7 +118,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport
{ {
string strSql = "select v.*,newid() as New_ID from (SELECT distinct * FROM HJGL_View_InspectionBatch WHERE 1=1"; string strSql = "select v.*,newid() as New_ID from (SELECT distinct * FROM HJGL_View_InspectionBatch WHERE 1=1";
List<SqlParameter> listStr = new List<SqlParameter>(); List<SqlParameter> listStr = new List<SqlParameter>();
if (this.drpProjectId.SelectedValue != null && this.drpProjectId.SelectedValue!="null") if (this.drpProjectId.SelectedValue != null && this.drpProjectId.SelectedValue != "null")
{ {
strSql += " AND ProjectId = @ProjectId"; strSql += " AND ProjectId = @ProjectId";
listStr.Add(new SqlParameter("@ProjectId", this.drpProjectId.SelectedValue)); listStr.Add(new SqlParameter("@ProjectId", this.drpProjectId.SelectedValue));
@ -155,7 +155,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport
{ {
this.GetShowColumn(c.Columns); this.GetShowColumn(c.Columns);
} }
} }
#endregion #endregion
@ -192,7 +192,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport
// BindGrid(); // BindGrid();
//} //}
//#endregion //#endregion
#region #region
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{ {
@ -227,7 +227,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport
#endregion #endregion
#region #region
/// 导出按钮 /// 导出按钮
/// </summary> /// </summary>
/// <param name="sender"></param> /// <param name="sender"></param>
@ -244,23 +244,19 @@ namespace FineUIPro.Web.HJGL.WeldingReport
// n++; // n++;
//} //}
Model.Sys_UserShowColumns c = BLL.Sys_UserShowColumnsService.GetColumnsByUserId(this.CurrUser.UserId, "3"); Model.Sys_UserShowColumns c = BLL.Sys_UserShowColumnsService.GetColumnsByUserId(this.CurrUser.UserId, "3");
List<string> columns = new List<string>(); List<string> columns = new List<string>();
if (c != null) if (c != null)
{
string[] items = c.Columns.Split(',');
columns = new List<string>(items);
}
else
{
for (int i=1; i <= Grid1.Columns.Count; i++)
{
columns.Add(i.ToString());
}
}
if (!columns.Contains("0"))
{ {
columns.Add("0"); string[] items = ("0," + c.Columns).Split(',');
columns = new List<string>(items);
}
else
{
for (int i = 1; i <= Grid1.Columns.Count; i++)
{
columns.Add(i.ToString());
}
} }
Response.ClearContent(); Response.ClearContent();
string filename = Funs.GetNewFileName(); string filename = Funs.GetNewFileName();
@ -295,9 +291,9 @@ namespace FineUIPro.Web.HJGL.WeldingReport
{ {
if (column.ColumnIndex == 0) if (column.ColumnIndex == 0)
{ {
sb.AppendFormat("<td align='center' style='width:45px;'>{0}</td>", column.HeaderText); sb.AppendFormat("<td align='center' style='width:118px;'>{0}</td>", column.HeaderText);
} }
if (column.ColumnIndex == 1) else if (column.ColumnIndex == 1)
{ {
sb.AppendFormat("<td align='center' style='width:118px;'>{0}</td>", column.HeaderText); sb.AppendFormat("<td align='center' style='width:118px;'>{0}</td>", column.HeaderText);
} }
@ -389,6 +385,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport
} }
} }
sb.Append("</tr>"); sb.Append("</tr>");
int a = 1;
foreach (GridRow row in grid.Rows) foreach (GridRow row in grid.Rows)
{ {
sb.Append("<tr>"); sb.Append("<tr>");
@ -398,6 +395,10 @@ namespace FineUIPro.Web.HJGL.WeldingReport
if (columnIndexs.Contains(columnIndex)) if (columnIndexs.Contains(columnIndex))
{ {
string html = value.ToString(); string html = value.ToString();
if (columnIndex == 0)
{
html = a.ToString();
}
if (html.StartsWith(Grid.TEMPLATE_PLACEHOLDER_PREFIX)) if (html.StartsWith(Grid.TEMPLATE_PLACEHOLDER_PREFIX))
{ {
// 模板列 // 模板列
@ -430,6 +431,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport
} }
columnIndex++; columnIndex++;
} }
a++;
sb.Append("</tr>"); sb.Append("</tr>");
} }
sb.Append("</table>"); sb.Append("</table>");

Binary file not shown.

Binary file not shown.

View File

@ -1 +0,0 @@
57339f4a363b9faca664a99231f321d7a604e379b8ea1faf26c3882a6bc59476

View File

@ -1,38 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress />
<IISExpressSSLPort />
<IISExpressAnonymousAuthentication />
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<UseGlobalApplicationHostFile />
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
</PropertyGroup>
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<StartPageUrl>
</StartPageUrl>
<StartAction>CurrentPage</StartAction>
<AspNetDebugging>True</AspNetDebugging>
<SilverlightDebugging>False</SilverlightDebugging>
<NativeDebugging>False</NativeDebugging>
<SQLDebugging>False</SQLDebugging>
<ExternalProgram>
</ExternalProgram>
<StartExternalURL>
</StartExternalURL>
<StartCmdLineArguments>
</StartCmdLineArguments>
<StartWorkingDirectory>
</StartWorkingDirectory>
<EnableENC>True</EnableENC>
<AlwaysStartWebServerOnDebug>True</AlwaysStartWebServerOnDebug>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
</Project>