diff --git a/DataBase/版本日志/SGGLDB_WH_2024-05-01-bwj.sql b/DataBase/版本日志/SGGLDB_WH_2024-05-01-bwj.sql
new file mode 100644
index 00000000..149a8d2c
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_WH_2024-05-01-bwj.sql
@@ -0,0 +1,45 @@
+alter table Comprehensive_DesignDetails alter column RemarCode int
+go
+alter table Comprehensive_GeneralPlanApproval alter column RemarkCode int
+go
+alter table Comprehensive_MajorPlanApproval alter column RemarkCode int
+go
+alter table Inspection_Test_Plan alter column RemarkCode int
+go
+alter table Comprehensive_NCRManagement alter column RemarkCode int
+go
+alter table Comprehensive_SpecialEquipment alter column RemarkCode int
+go
+alter table Comprehensive_PressurePipe alter column RemarkCode int
+go
+alter table Comprehensive_QualityAccident alter column RemarkCode int
+go
+update Comprehensive_DesignDrawings set RemarkCode =null where RemarkCode='19021-30003-ST21-04~05'
+update Comprehensive_DesignDrawings set RemarkCode =null where RemarkCode='19021-48112-ST25-01~04'
+update Comprehensive_DesignDrawings set RemarkCode =null where RemarkCode='19021-30001-ST46-01~05'
+update Comprehensive_DesignDrawings set RemarkCode =null where RemarkCode='19021-30602-ST21-01~02'
+update Comprehensive_DesignDrawings set RemarkCode =null where RemarkCode='F022BFQ001N421'
+update Comprehensive_DesignDrawings set RemarkCode =null where RemarkCode='19021-30001-ST25-01~10'
+update Comprehensive_DesignDrawings set RemarkCode =null where RemarkCode='19021-48105-ST21-01~04'
+update Comprehensive_DesignDrawings set RemarkCode =null where RemarkCode='19021-30001-ST25-11~21'
+update Comprehensive_DesignDrawings set RemarkCode =null where RemarkCode='úװ'
+update Comprehensive_DesignDrawings set RemarkCode =null where RemarkCode='19021-48106-ST21-01~012'
+update Comprehensive_DesignDrawings set RemarkCode =null where RemarkCode='19021-48110-ST21-01~02'
+update Comprehensive_DesignDrawings set RemarkCode =null where RemarkCode='19021-30001-ST45-01~05'
+update Comprehensive_DesignDrawings set RemarkCode =null where RemarkCode='19021-48103-ST21-01~05'
+update Comprehensive_DesignDrawings set RemarkCode =null where RemarkCode='F22BFU001N421'
+update Comprehensive_DesignDrawings set RemarkCode =null where RemarkCode='19021-48101-ST21-04~05'
+update Comprehensive_DesignDrawings set RemarkCode =null where RemarkCode='19021-30100-ST40-01'
+update Comprehensive_DesignDrawings set RemarkCode =null where RemarkCode=''
+update Comprehensive_DesignDrawings set RemarkCode =null where RemarkCode='F022BGT001N421'
+update Comprehensive_DesignDrawings set RemarkCode =null where RemarkCode='19021-24002-ST25-01~07'
+update Comprehensive_DesignDrawings set RemarkCode =null where RemarkCode='19021-48101-ST35-13'
+update Comprehensive_DesignDrawings set RemarkCode =null where RemarkCode='19021-48101-ST35-11'
+update Comprehensive_DesignDrawings set RemarkCode =null where RemarkCode='շװ'
+update Comprehensive_DesignDrawings set RemarkCode =null where RemarkCode='19021-48109-ST21-01'
+update Comprehensive_DesignDrawings set RemarkCode =null where RemarkCode='19021-30001-ST03-01~04'
+go
+alter table Comprehensive_DesignDrawings alter column RemarkCode int
+go
+alter table Comprehensive_ReviewDrawings alter column RemarkCode int
+go
\ No newline at end of file
diff --git a/SGGL/BLL/CQMS/Comprehensive/DesignDetailsService.cs b/SGGL/BLL/CQMS/Comprehensive/DesignDetailsService.cs
index bbb685b6..11cac15c 100644
--- a/SGGL/BLL/CQMS/Comprehensive/DesignDetailsService.cs
+++ b/SGGL/BLL/CQMS/Comprehensive/DesignDetailsService.cs
@@ -168,6 +168,7 @@ namespace BLL
newDesignDetails.Status = designDetails.Status;
newDesignDetails.AuditMan = designDetails.AuditMan;
newDesignDetails.JoinPersonNum = designDetails.JoinPersonNum;
+ newDesignDetails.RemarCode = designDetails.RemarCode;
db.SubmitChanges();
}
diff --git a/SGGL/BLL/CQMS/Comprehensive/GeneralPlanApprovalService.cs b/SGGL/BLL/CQMS/Comprehensive/GeneralPlanApprovalService.cs
index 649bb780..9c01f2d8 100644
--- a/SGGL/BLL/CQMS/Comprehensive/GeneralPlanApprovalService.cs
+++ b/SGGL/BLL/CQMS/Comprehensive/GeneralPlanApprovalService.cs
@@ -143,6 +143,7 @@ namespace BLL
newGeneralPlanApproval.ImplementationDeviation = generalPlanApproval.ImplementationDeviation;
newGeneralPlanApproval.AttachUrl = generalPlanApproval.AttachUrl;
newGeneralPlanApproval.UnitWorkId = generalPlanApproval.UnitWorkId;
+ newGeneralPlanApproval.RemarkCode = generalPlanApproval.RemarkCode;
db.SubmitChanges();
}
}
diff --git a/SGGL/BLL/CQMS/Comprehensive/MajorPlanApprovalService.cs b/SGGL/BLL/CQMS/Comprehensive/MajorPlanApprovalService.cs
index 74d664ec..d0efc0c7 100644
--- a/SGGL/BLL/CQMS/Comprehensive/MajorPlanApprovalService.cs
+++ b/SGGL/BLL/CQMS/Comprehensive/MajorPlanApprovalService.cs
@@ -149,6 +149,7 @@ namespace BLL
newMajorPlanApproval.AttachUrl = majorPlanApproval.AttachUrl;
newMajorPlanApproval.UnitWorkId = majorPlanApproval.UnitWorkId;
newMajorPlanApproval.ExpertReviewMan = majorPlanApproval.ExpertReviewMan;
+ newMajorPlanApproval.RemarkCode = majorPlanApproval.RemarkCode;
newMajorPlanApproval.IsReview = majorPlanApproval.IsReview;
db.SubmitChanges();
diff --git a/SGGL/BLL/CQMS/Comprehensive/NCRManagementService.cs b/SGGL/BLL/CQMS/Comprehensive/NCRManagementService.cs
index 1e5b5755..f02c6d4b 100644
--- a/SGGL/BLL/CQMS/Comprehensive/NCRManagementService.cs
+++ b/SGGL/BLL/CQMS/Comprehensive/NCRManagementService.cs
@@ -149,6 +149,7 @@ namespace BLL
newNCRManagement.Status = nCRManagement.Status;
newNCRManagement.Problem = nCRManagement.Problem;
newNCRManagement.Measure = nCRManagement.Measure;
+ newNCRManagement.RemarkCode = nCRManagement.RemarkCode;
db.SubmitChanges();
}
}
diff --git a/SGGL/BLL/CQMS/Comprehensive/PressurePipeService.cs b/SGGL/BLL/CQMS/Comprehensive/PressurePipeService.cs
index 6c4dc9ed..62991c6f 100644
--- a/SGGL/BLL/CQMS/Comprehensive/PressurePipeService.cs
+++ b/SGGL/BLL/CQMS/Comprehensive/PressurePipeService.cs
@@ -127,6 +127,7 @@ namespace BLL
newPressurePipe.IssuedReportNumber = PressurePipe.IssuedReportNumber;
newPressurePipe.Status = PressurePipe.Status;
newPressurePipe.ReportTime = PressurePipe.ReportTime;
+ newPressurePipe.RemarkCode = PressurePipe.RemarkCode;
db.SubmitChanges();
}
}
diff --git a/SGGL/BLL/CQMS/Comprehensive/QualityAccidentService.cs b/SGGL/BLL/CQMS/Comprehensive/QualityAccidentService.cs
index 406f17bf..10aba676 100644
--- a/SGGL/BLL/CQMS/Comprehensive/QualityAccidentService.cs
+++ b/SGGL/BLL/CQMS/Comprehensive/QualityAccidentService.cs
@@ -127,6 +127,7 @@ namespace BLL
newQualityAccident.AttachUrl = QualityAccident.AttachUrl;
newQualityAccident.UnitWorkId = QualityAccident.UnitWorkId;
newQualityAccident.Status = QualityAccident.Status;
+ newQualityAccident.RemarkCode = QualityAccident.RemarkCode;
db.SubmitChanges();
}
}
diff --git a/SGGL/BLL/CQMS/Comprehensive/SpecialEquipmentService.cs b/SGGL/BLL/CQMS/Comprehensive/SpecialEquipmentService.cs
index 67a8835c..7f697c09 100644
--- a/SGGL/BLL/CQMS/Comprehensive/SpecialEquipmentService.cs
+++ b/SGGL/BLL/CQMS/Comprehensive/SpecialEquipmentService.cs
@@ -130,6 +130,7 @@ namespace BLL
newEquipment.MonitoringReportNumber = SpecialEquipment.MonitoringReportNumber;
newEquipment.Status = SpecialEquipment.Status;
newEquipment.PositionNum = SpecialEquipment.PositionNum;
+ newEquipment.RemarkCode = SpecialEquipment.RemarkCode;
db.SubmitChanges();
}
}
diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs
index 762826be..fb4b0ca1 100644
--- a/SGGL/BLL/Common/Const.cs
+++ b/SGGL/BLL/Common/Const.cs
@@ -3259,12 +3259,12 @@ namespace BLL
///
/// 设计交底导入模板文件原始虚拟路径
///
- public const string DesignDetailsTemplateUrl = "File\\Excel\\DataIn\\设计交底导入模板.xls";
+ public const string DesignDetailsTemplateUrl = "File\\Excel\\DataIn\\设计交底管理导入模板.xls";
///
/// 图纸会审记录导入模板文件原始虚拟路径
///
- public const string ReviewDrawingsTemplateUrl = "File\\Excel\\DataIn\\图纸会审记录导入模板.xls";
+ public const string ReviewDrawingsTemplateUrl = "File\\Excel\\DataIn\\图纸会审管理导入模板.xls";
///
/// 检验试验计划导入模板文件原始虚拟路径
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosure.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosure.aspx
index 5cbee3b9..08f047ec 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosure.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosure.aspx
@@ -15,7 +15,7 @@
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosure.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosure.aspx.cs
index 844a4050..b1957133 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosure.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosure.aspx.cs
@@ -32,7 +32,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
public void BindGrid()
{
string strSql = @"select C.ConTechnologyDisclosureId, C.ProjectId, C.CNProfessionalId, C.DisclosureCode, C.DisclosureName,C.UnitId,C.DisclosureMan,C.DisclosureDate, C.UnitWorkId,C.AttendMan,
- C.CompileMan, C.CompileDate, C.RemarkCode,CN.ProfessionalName,u.UnitName
+ C.CompileMan, C.CompileDate, C.RemarkCode,CN.ProfessionalName,u.UnitName,C.RemarkCode
from Comprehensive_ConTechnologyDisclosure C
left join Base_CNProfessional CN on C.CNProfessionalId=CN.CNProfessionalId
left join Base_Unit u on u.UnitId = C.UnitId
@@ -262,7 +262,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
lists = lists.OrderBy(x => x.RemarkCode);
if (lists != null)
{
- string projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
+ string projectName = BLL.ProjectService.GetShortNameByProjectId(this.CurrUser.LoginProjectId);
newUrl = uploadfilepath.Replace("施工技术交底管理导入模板", "施工技术交底管理("+projectName+DateTime.Now.ToString("yyyyMMdd")+")");
File.Copy(uploadfilepath, newUrl);
// 第一步:读取文件流
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistribution.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistribution.aspx.cs
index 1c6e24f2..8f25abfc 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistribution.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistribution.aspx.cs
@@ -27,7 +27,7 @@ namespace FineUIPro.Web.Comprehensive
{
string strSql = @"select DataDistributionId, ProjectId, SendDate, FileCode, FileName, Status,
SendMan, ReceivingUnit, ReceivingMan, (case when FileType='1' then '纸质' ELSE '电子' end)AS FileType, CopiesCount, (case when IsReply='True' then '是' else '否' end) as IsReply, ReplyCode,
- ReplyDate, Remark, AttachUrl, CompileMan, CompileDate,CN.ProfessionalName
+ ReplyDate, Remark, AttachUrl, CompileMan, CompileDate,CN.ProfessionalName
from Comprehensive_DataDistribution C
left join Base_CNProfessional CN on C.CNProfessionalId=CN.CNProfessionalId
where C.ProjectId = @ProjectId";
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDoc.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDoc.aspx.cs
index 5e1bd28c..528aca21 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDoc.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDoc.aspx.cs
@@ -350,7 +350,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
lists = lists.OrderBy(x => x.RemarkCode);
if (lists != null)
{
- string projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
+ string projectName = BLL.ProjectService.GetShortNameByProjectId(this.CurrUser.LoginProjectId);
newUrl = uploadfilepath.Replace("资料收发文登记记录导入模板", "资料收发文登记记录(" + projectName + "" + DateTime.Now.ToString("yyyyMMdd") + ")");
File.Copy(uploadfilepath, newUrl);
// 第一步:读取文件流
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrder.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrder.aspx
index 38d2bc1a..90fa1098 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrder.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrder.aspx
@@ -15,7 +15,7 @@
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrder.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrder.aspx.cs
index 71057464..474ecd6f 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrder.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrder.aspx.cs
@@ -45,7 +45,8 @@ namespace FineUIPro.Web.Comprehensive
C.ImplementationFrontState,
CN.ProfessionalName,
C.Status,
- C.CompleteDate
+ C.CompleteDate,
+ C.RemarkCode
from Comprehensive_DesignChangeOrder C "
+ @" left join Base_CNProfessional CN on C.CNProfessionalId=CN.CNProfessionalId "
+ @" where C.ProjectId = @ProjectId";
@@ -314,7 +315,7 @@ namespace FineUIPro.Web.Comprehensive
lists = lists.OrderBy(x => x.RemarkCode);
if (lists != null)
{
- string projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
+ string projectName = BLL.ProjectService.GetShortNameByProjectId(this.CurrUser.LoginProjectId);
newUrl = uploadfilepath.Replace("设计变更单导入模板", "设计变更单(" + projectName + DateTime.Now.ToString("yyyyMMdd") + ")");
File.Copy(uploadfilepath, newUrl);
// 第一步:读取文件流
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx
index 57482e4c..d3b260b5 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx
@@ -15,7 +15,7 @@
@@ -29,6 +29,9 @@
+
+
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx.cs
index 055e20fd..3ce2d892 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx.cs
@@ -3,6 +3,7 @@ using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
+using System.IO;
using System.Linq;
namespace FineUIPro.Web.Comprehensive
{
@@ -26,7 +27,7 @@ namespace FineUIPro.Web.Comprehensive
public void BindGrid()
{
string strSql = @"select DesignDetailsId,DesignDetailsCode, DetailsMan, DetailsDate, UnitWorkId,Status,
- UnitName, AttachUrl, CompileMan, CN.ProfessionalName
+ UnitName, AttachUrl, CompileMan, CN.ProfessionalName,C.RemarCode
from Comprehensive_DesignDetails C
left join Base_CNProfessional CN on C.CNProfessionalId=CN.CNProfessionalId
where C.ProjectId = @ProjectId";
@@ -230,6 +231,35 @@ namespace FineUIPro.Web.Comprehensive
return "";
}
}
+
+ public static string ConvertState(object Status)
+ {
+ if (Status != null)
+ {
+ if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReCompile)
+ {
+ return "重报";
+ }
+ else if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReJect)
+ {
+ return "驳回";
+ }
+ else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Compile)
+ {
+ return "编制";
+ }
+ else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Audit)
+ {
+ return "待审批";
+ }
+ else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Complete)
+ {
+ return "审批完成";
+ }
+ }
+
+ return "编制";
+ }
#endregion
#region 获取按钮权限
@@ -271,36 +301,7 @@ namespace FineUIPro.Web.Comprehensive
}
}
#endregion
-
- public static string ConvertState(object Status)
- {
- if (Status != null)
- {
- if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReCompile)
- {
- return "重报";
- }
- else if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReJect)
- {
- return "驳回";
- }
- else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Compile)
- {
- return "编制";
- }
- else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Audit)
- {
- return "待审批";
- }
- else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Complete)
- {
- return "审批完成";
- }
- }
-
- return "编制";
- }
-
+
#region 导入
///
/// 导入按钮
@@ -312,5 +313,145 @@ namespace FineUIPro.Web.Comprehensive
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("DesignDetailsDataIn.aspx", "导入 - ")));
}
#endregion
+
+ #region 导出按钮
+ /// 导出按钮
+ ///
+ ///
+ ///
+ protected void btnOut_Click(object sender, EventArgs e)
+ {
+ string rootPath = Server.MapPath("~/");
+ string initTemplatePath = Const.DesignDetailsTemplateUrl;
+ string uploadfilepath = string.Empty;
+ string newUrl = string.Empty;
+ uploadfilepath = rootPath + initTemplatePath;
+
+ var lists = (from x in Funs.DB.Comprehensive_DesignDetails
+ where x.ProjectId == this.CurrUser.LoginProjectId
+ select x);
+ if (sdrpCNProfessionalId.SelectedValue != BLL.Const._Null)
+ {
+ lists = lists.Where(x => x.CNProfessionalId == sdrpCNProfessionalId.SelectedValue);
+ }
+ lists = lists.OrderBy(x => x.RemarCode);
+ if (lists != null)
+ {
+ string projectName = BLL.ProjectService.GetShortNameByProjectId(this.CurrUser.LoginProjectId);
+ newUrl = uploadfilepath.Replace("设计交底管理导入模板", "设计交底管理(" + projectName+ DateTime.Now.ToString("yyyyMMdd") + ")");
+ File.Copy(uploadfilepath, newUrl);
+ // 第一步:读取文件流
+ NPOI.SS.UserModel.IWorkbook workbook;
+ using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read))
+ {
+ //workbook = new NPOI.XSSF.UserModel.XSSFWorkbook(stream);
+ workbook = new NPOI.HSSF.UserModel.HSSFWorkbook(stream);
+ }
+ // 创建单元格样式
+ NPOI.SS.UserModel.ICellStyle cellStyle = workbook.CreateCellStyle();
+ cellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
+ cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
+ var font = workbook.CreateFont();
+ font.FontHeightInPoints = 11;
+ cellStyle.SetFont(font);
+ NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
+ cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
+ cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
+ var font0 = workbook.CreateFont();
+ font0.FontHeightInPoints = 12;
+ font0.IsBold = true;
+ cellStyle0.SetFont(font0);
+ // 第二步:创建新数据行
+ NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
+ NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
+ NPOI.SS.UserModel.ICell cell;
+ int i = 2;
+ foreach (var item in lists)
+ {
+ // 第二步:创建新数据行
+ row = sheet.CreateRow(i);
+ // 添加数据
+ cell = row.CreateCell(0);
+ cell.CellStyle = cellStyle;
+ string proName = string.Empty;
+ var cnp = BLL.CNProfessionalService.GetCNProfessional(item.CNProfessionalId);
+ if (cnp != null)
+ {
+ proName = cnp.ProfessionalName;
+ }
+ cell.SetCellValue(proName);//专业
+
+ cell = row.CreateCell(1);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.DesignDetailsCode);//文件号
+
+ cell = row.CreateCell(2);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.DetailsMan);//交底人
+
+ cell = row.CreateCell(3);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.DetailsDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.DetailsDate) : "");//交底日期
+
+ cell = row.CreateCell(4);
+ cell.CellStyle = cellStyle;
+ string unitWorkName = string.Empty;
+ if (!string.IsNullOrEmpty(item.UnitWorkId))
+ {
+ unitWorkName = ConvertUnitWork(item.UnitWorkId);
+ }
+ cell.SetCellValue(unitWorkName);//单位工程
+
+ cell = row.CreateCell(5);
+ cell.CellStyle = cellStyle;
+ string unitName = string.Empty;
+ if (!string.IsNullOrEmpty(item.UnitName))
+ {
+ unitName = ConvertCarryUnit(item.UnitName);
+ }
+ cell.SetCellValue(unitName);//参加单位
+
+ cell = row.CreateCell(6);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.JoinPersonNum.HasValue ? item.JoinPersonNum.ToString() : "");//参加人数
+
+ cell = row.CreateCell(7);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.RemarCode.HasValue ? item.RemarCode.ToString() : "");//标志编号
+
+ i++;
+ }
+ // 第三步:写入文件流
+ using (FileStream stream = new FileStream(newUrl, FileMode.Create, FileAccess.Write))
+ {
+ workbook.Write(stream);
+ workbook.Close();
+ }
+ string fileName = Path.GetFileName(newUrl);
+ FileInfo info = new FileInfo(newUrl);
+ long fileSize = info.Length;
+ Response.Clear();
+ Response.ContentType = "application/x-zip-compressed";
+ Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
+ Response.AddHeader("Content-Length", fileSize.ToString());
+ Response.TransmitFile(newUrl, 0, fileSize);
+ Response.Flush();
+ Response.Close();
+ File.Delete(newUrl);
+ }
+ else
+ {
+ Alert.ShowInTop("当前无记录,无法导出!", MessageBoxIcon.Warning);
+ }
+ }
+ #endregion
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx.designer.cs
index aabbb362..a0108d6f 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx.designer.cs
@@ -93,6 +93,15 @@ namespace FineUIPro.Web.Comprehensive {
///
protected global::FineUIPro.Button btnImport;
+ ///
+ /// btnOut 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnOut;
+
///
/// lblPageIndex 控件。
///
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsDataIn.aspx.cs
index 27ff5bae..11c6711e 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsDataIn.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsDataIn.aspx.cs
@@ -178,7 +178,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
&& x.SuperUnitWork == null
select x;
- for (int i = 0; i < ir; i++)
+ for (int i = 1; i < ir; i++)
{
string row0 = pds.Rows[i][0].ToString();
if (!string.IsNullOrEmpty(row0))
@@ -255,6 +255,17 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
result += (i + 2).ToString() + "," + "标志编号" + "," + "此项为必填项!" + "|";
}
+ else
+ {
+ try
+ {
+ int t = Convert.ToInt32(row7);
+ }
+ catch (Exception)
+ {
+ result += (i + 2).ToString() + "," + "标志编号" + "," + "[" + row7 + "]错误!" + "|";
+ }
+ }
}
if (!string.IsNullOrEmpty(result))
{
@@ -404,13 +415,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive
&& x.SuperUnitWork == null
select x;
- for (int i = 0; i < ir; i++)
+ for (int i = 1; i < ir; i++)
{
Model.Comprehensive_DesignDetails oldViewInfo = new Model.Comprehensive_DesignDetails();
string row0 = pds.Rows[i][0].ToString().Trim();
var cn = cns.Where(y => y.ProfessionalName == row0).FirstOrDefault();
- oldViewInfo = oldViewInfos.Where(x => x.RemarCode == pds.Rows[i][7].ToString().Trim()
+ oldViewInfo = oldViewInfos.Where(x => x.RemarCode ==Funs.GetNewInt(pds.Rows[i][7].ToString().Trim())
).FirstOrDefault();
if (oldViewInfo == null)
{
@@ -430,7 +441,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
des.UnitName = BLL.UnitService.GetUnitIds(pds.Rows[i][5].ToString().Trim());
}
des.JoinPersonNum = Funs.GetNewInt(pds.Rows[i][6].ToString().Trim());
- des.RemarCode = pds.Rows[i][7].ToString().Trim();
+ des.RemarCode = Funs.GetNewInt(pds.Rows[i][7].ToString().Trim());
des.CompileMan = this.CurrUser.UserId;
des.CompileDate = DateTime.Now;
des.Status = BLL.Const.Comprehensive_Compile;
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsEdit.aspx
index 07c72260..8903ba25 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsEdit.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsEdit.aspx
@@ -39,7 +39,8 @@
-
+ <%----%>
+
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsEdit.aspx.cs
index a18c938c..32679055 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsEdit.aspx.cs
@@ -71,6 +71,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
this.txtJoinPersonNum.Text = designDetails.JoinPersonNum.ToString();
}
+ this.txtRemarkCode.Text = designDetails.RemarCode.HasValue ? designDetails.RemarCode.ToString() : "";
var auditApprove = DesignDetailsApproveService.GetAuditApprove(designDetails.DesignDetailsId, BLL.Const.Comprehensive_Audit);
if (auditApprove != null)
{
@@ -133,6 +134,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
this.drpUnitWorks.Readonly = true;
this.drpAudit.Readonly = true;
+ this.txtRemarkCode.Readonly = true;
//this.btnAttach.Enabled = false;
@@ -174,6 +176,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
return;
}
+ var q = Funs.DB.Comprehensive_DesignDetails.FirstOrDefault(x => x.RemarCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignDetailsId != this.DesignDetailsId || (this.DesignDetailsId == null && x.DesignDetailsId != null)));
+ if (q != null)
+ {
+ Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
+ return;
+ }
Model.Comprehensive_DesignDetails designDetails = new Model.Comprehensive_DesignDetails();
designDetails.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
@@ -214,6 +222,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
unitIds = unitIds.Substring(0, unitIds.LastIndexOf(","));
}
designDetails.UnitName = unitIds;
+ designDetails.RemarCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
if (string.IsNullOrEmpty(this.DesignDetailsId))
{
if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
@@ -254,6 +263,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
return;
}
+ var q = Funs.DB.Comprehensive_DesignDetails.FirstOrDefault(x => x.RemarCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignDetailsId != this.DesignDetailsId || (this.DesignDetailsId == null && x.DesignDetailsId != null)));
+ if (q != null)
+ {
+ Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
+ return;
+ }
+
Model.Comprehensive_DesignDetails designDetails = new Model.Comprehensive_DesignDetails();
designDetails.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
@@ -294,6 +310,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
unitIds = unitIds.Substring(0, unitIds.LastIndexOf(","));
}
designDetails.UnitName = unitIds;
+ designDetails.RemarCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
if (string.IsNullOrEmpty(this.DesignDetailsId))
{
if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsEdit.aspx.designer.cs
index e332d44a..965fc383 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsEdit.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsEdit.aspx.designer.cs
@@ -103,13 +103,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
protected global::FineUIPro.NumberBox txtJoinPersonNum;
///
- /// TextBox1 控件。
+ /// txtRemarkCode 控件。
///
///
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.TextBox TextBox1;
+ protected global::FineUIPro.NumberBox txtRemarkCode;
///
/// Panel2 控件。
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawings.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawings.aspx
index a3b29823..c83b8e00 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawings.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawings.aspx
@@ -15,7 +15,7 @@
@@ -35,6 +35,9 @@
+
+
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawings.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawings.aspx.cs
index c5e13e95..7f8dc3d6 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawings.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawings.aspx.cs
@@ -3,6 +3,7 @@ using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
+using System.IO;
using System.Linq;
namespace FineUIPro.Web.Comprehensive
@@ -272,6 +273,36 @@ namespace FineUIPro.Web.Comprehensive
return "";
}
}
+
+ public static string ConvertState(object Status)
+ {
+ if (Status != null)
+ {
+ if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReCompile)
+ {
+ return "重报";
+ }
+ else if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReJect)
+ {
+ return "驳回";
+ }
+ else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Compile)
+ {
+ return "编制";
+ }
+ else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Audit)
+ {
+ return "待审批";
+ }
+ else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Complete)
+ {
+ return "审批完成";
+ }
+ }
+
+ return "编制";
+ }
+
#endregion
#region 获取按钮权限
@@ -314,33 +345,177 @@ namespace FineUIPro.Web.Comprehensive
}
#endregion
- public static string ConvertState(object Status)
+ #region 导出按钮
+ /// 导出按钮
+ ///
+ ///
+ ///
+ protected void btnOut_Click(object sender, EventArgs e)
{
- if (Status != null)
- {
- if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReCompile)
- {
- return "重报";
- }
- else if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReJect)
- {
- return "驳回";
- }
- else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Compile)
- {
- return "编制";
- }
- else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Audit)
- {
- return "待审批";
- }
- else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Complete)
- {
- return "审批完成";
- }
- }
+ string rootPath = Server.MapPath("~/");
+ string initTemplatePath = Const.DesignDrawingsDataInUrl;
+ string uploadfilepath = string.Empty;
+ string newUrl = string.Empty;
+ uploadfilepath = rootPath + initTemplatePath;
- return "编制";
+ var lists = (from x in Funs.DB.Comprehensive_DesignDrawings
+ where x.ProjectId == this.CurrUser.LoginProjectId
+ select x);
+ if (sdrpCNProfessionalId.SelectedValue != BLL.Const._Null)
+ {
+ lists = lists.Where(x => x.CNProfessionalId == sdrpCNProfessionalId.SelectedValue);
+ }
+ if (!string.IsNullOrEmpty(this.stxtReceiveDate.Text.Trim()))
+ {
+ lists = lists.Where(x => x.ReceiveDate ==Funs.GetNewDateTime(stxtReceiveDate.Text.Trim()));
+ }
+ if (!string.IsNullOrEmpty(this.stxtSendDate.Text.Trim()))
+ {
+ lists = lists.Where(x => x.SendDate == Funs.GetNewDateTime(stxtSendDate.Text.Trim()));
+ }
+ lists = lists.OrderBy(x => x.RemarkCode);
+ if (lists != null)
+ {
+ string projectName = BLL.ProjectService.GetShortNameByProjectId(this.CurrUser.LoginProjectId);
+ newUrl = uploadfilepath.Replace("图纸收发记录导入模板", "图纸收发记录(" + projectName + DateTime.Now.ToString("yyyyMMdd") + ")");
+ File.Copy(uploadfilepath, newUrl);
+ // 第一步:读取文件流
+ NPOI.SS.UserModel.IWorkbook workbook;
+ using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read))
+ {
+ //workbook = new NPOI.XSSF.UserModel.XSSFWorkbook(stream);
+ workbook = new NPOI.HSSF.UserModel.HSSFWorkbook(stream);
+ }
+ // 创建单元格样式
+ NPOI.SS.UserModel.ICellStyle cellStyle = workbook.CreateCellStyle();
+ cellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
+ cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
+ var font = workbook.CreateFont();
+ font.FontHeightInPoints = 11;
+ cellStyle.SetFont(font);
+ NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
+ cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
+ cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
+ var font0 = workbook.CreateFont();
+ font0.FontHeightInPoints = 12;
+ font0.IsBold = true;
+ cellStyle0.SetFont(font0);
+ // 第二步:创建新数据行
+ NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
+ NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
+ NPOI.SS.UserModel.ICell cell;
+ int i = 2;
+ foreach (var item in lists)
+ {
+ // 第二步:创建新数据行
+ row = sheet.CreateRow(i);
+ // 添加数据
+ //cell = row.CreateCell(0);
+ //cell.CellStyle = cellStyle;
+ //string unitName = string.Empty;
+ //if (!string.IsNullOrEmpty(item.UnitId))
+ //{
+ // unitName = BLL.UnitService.GetUnitNameByUnitId(item.UnitId);
+ //}
+ //cell.SetCellValue(unitName);//报批单位
+
+ cell = row.CreateCell(0);
+ cell.CellStyle = cellStyle;
+ string proName = string.Empty;
+ var cnp = BLL.CNProfessionalService.GetCNProfessional(item.CNProfessionalId);
+ if (cnp != null)
+ {
+ proName = cnp.ProfessionalName;
+ }
+ cell.SetCellValue(proName);//专业
+
+ cell = row.CreateCell(1);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.DesignDrawingsCode);//设计图纸编号
+
+ cell = row.CreateCell(2);
+ cell.CellStyle = cellStyle;
+ string unitWorkName = string.Empty;
+ if (!string.IsNullOrEmpty(item.UnitWorkId))
+ {
+ unitWorkName = ConvertUnitWork(item.UnitWorkId);
+ }
+ cell.SetCellValue(unitWorkName);//单位工程
+
+ cell = row.CreateCell(3);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.DesignDrawingsContent);//图纸内容
+
+ cell = row.CreateCell(4);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.Edition);//版次
+
+ cell = row.CreateCell(5);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.PageNumber.HasValue ? item.PageNumber.ToString() : "");//页数
+
+ cell = row.CreateCell(6);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.ReceiveDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.ReceiveDate) : "");//接收日期
+
+ cell = row.CreateCell(7);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.SendDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.SendDate) : "");//发送日期
+
+ cell = row.CreateCell(8);
+ cell.CellStyle = cellStyle;
+ string unitName = string.Empty;
+ if (!string.IsNullOrEmpty(item.ReceiveUnits))
+ {
+ unitName = ConvertCarryUnit(item.ReceiveUnits);
+ }
+ cell.SetCellValue(unitName);//接收单位
+
+ cell = row.CreateCell(9);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.ReceiveMan);//接收人
+
+ cell = row.CreateCell(10);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.Remark);//备注
+
+ cell = row.CreateCell(11);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.RemarkCode.HasValue ? item.RemarkCode.ToString() : "");//标志编号
+
+ i++;
+ }
+ // 第三步:写入文件流
+ using (FileStream stream = new FileStream(newUrl, FileMode.Create, FileAccess.Write))
+ {
+ workbook.Write(stream);
+ workbook.Close();
+ }
+ string fileName = Path.GetFileName(newUrl);
+ FileInfo info = new FileInfo(newUrl);
+ long fileSize = info.Length;
+ Response.Clear();
+ Response.ContentType = "application/x-zip-compressed";
+ Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
+ Response.AddHeader("Content-Length", fileSize.ToString());
+ Response.TransmitFile(newUrl, 0, fileSize);
+ Response.Flush();
+ Response.Close();
+ File.Delete(newUrl);
+ }
+ else
+ {
+ Alert.ShowInTop("当前无记录,无法导出!", MessageBoxIcon.Warning);
+ }
}
+ #endregion
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawings.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawings.aspx.designer.cs
index 56749638..f525714d 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawings.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawings.aspx.designer.cs
@@ -7,13 +7,11 @@
// 自动生成>
//------------------------------------------------------------------------------
-namespace FineUIPro.Web.Comprehensive
-{
-
-
- public partial class DesignDrawings
- {
-
+namespace FineUIPro.Web.Comprehensive {
+
+
+ public partial class DesignDrawings {
+
///
/// form1 控件。
///
@@ -22,7 +20,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
-
+
///
/// PageManager1 控件。
///
@@ -31,7 +29,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.PageManager PageManager1;
-
+
///
/// Panel1 控件。
///
@@ -40,7 +38,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Panel Panel1;
-
+
///
/// Grid1 控件。
///
@@ -49,7 +47,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Grid Grid1;
-
+
///
/// ToolSearch 控件。
///
@@ -58,7 +56,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Toolbar ToolSearch;
-
+
///
/// sdrpCNProfessionalId 控件。
///
@@ -67,7 +65,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList sdrpCNProfessionalId;
-
+
///
/// stxtReceiveDate 控件。
///
@@ -76,7 +74,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DatePicker stxtReceiveDate;
-
+
///
/// stxtSendDate 控件。
///
@@ -85,7 +83,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DatePicker stxtSendDate;
-
+
///
/// btnSearch 控件。
///
@@ -94,7 +92,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnSearch;
-
+
///
/// btnNew 控件。
///
@@ -103,7 +101,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnNew;
-
+
///
/// btnImport 控件。
///
@@ -112,7 +110,16 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnImport;
-
+
+ ///
+ /// btnOut 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnOut;
+
///
/// lblPageIndex 控件。
///
@@ -121,7 +128,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.WebControls.Label lblPageIndex;
-
+
///
/// Label2 控件。
///
@@ -130,7 +137,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.WebControls.Label Label2;
-
+
///
/// Label3 控件。
///
@@ -139,7 +146,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.WebControls.Label Label3;
-
+
///
/// txtStatus 控件。
///
@@ -148,7 +155,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.WebControls.Label txtStatus;
-
+
///
/// lbtnFileUrl 控件。
///
@@ -157,7 +164,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.WebControls.LinkButton lbtnFileUrl;
-
+
///
/// ToolbarText1 控件。
///
@@ -166,7 +173,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.ToolbarText ToolbarText1;
-
+
///
/// ddlPageSize 控件。
///
@@ -175,7 +182,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList ddlPageSize;
-
+
///
/// Window1 控件。
///
@@ -184,7 +191,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Window Window1;
-
+
///
/// Window2 控件。
///
@@ -193,7 +200,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Window Window2;
-
+
///
/// WindowAtt 控件。
///
@@ -202,7 +209,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Window WindowAtt;
-
+
///
/// Menu1 控件。
///
@@ -211,7 +218,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Menu Menu1;
-
+
///
/// btnMenuModify 控件。
///
@@ -220,7 +227,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.MenuButton btnMenuModify;
-
+
///
/// btnMenuDel 控件。
///
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsDataIn.aspx.cs
index 8faf6310..d867b7cb 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsDataIn.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsDataIn.aspx.cs
@@ -178,7 +178,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
&& x.SuperUnitWork == null
select x;
- for (int i = 0; i < ir; i++)
+ for (int i = 1; i < ir; i++)
{
string row0 = pds.Rows[i][0].ToString();
if (string.IsNullOrEmpty(row0))
@@ -215,9 +215,16 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
string row5 = pds.Rows[i][5].ToString();
- if (string.IsNullOrEmpty(row5))
+ if (!string.IsNullOrEmpty(row5))
{
- result += (i + 2).ToString() + "," + "标识编号" + "," + "此项为必填项!" + "|";
+ try
+ {
+ Int32 date = Convert.ToInt32(row5.Trim());
+ }
+ catch (Exception)
+ {
+ result += (i + 2).ToString() + "," + "页数" + "," + "[" + row5 + "]错误!" + "|";
+ }
}
string row6 = pds.Rows[i][6].ToString();
@@ -225,11 +232,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
try
{
- Int32 date = Convert.ToInt32(row6.Trim());
+ DateTime date = Convert.ToDateTime(row6.Trim());
}
catch (Exception)
{
- result += (i + 2).ToString() + "," + "页数" + "," + "[" + row6 + "]错误!" + "|";
+ result += (i + 2).ToString() + "," + "接收日期" + "," + "[" + row6 + "]错误!" + "|";
}
}
@@ -242,27 +249,14 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
catch (Exception)
{
- result += (i + 2).ToString() + "," + "接收日期" + "," + "[" + row7 + "]错误!" + "|";
+ result += (i + 2).ToString() + "," + "发送日期" + "," + "[" + row7 + "]错误!" + "|";
}
}
string row8 = pds.Rows[i][8].ToString();
if (!string.IsNullOrEmpty(row8))
{
- try
- {
- DateTime date = Convert.ToDateTime(row8.Trim());
- }
- catch (Exception)
- {
- result += (i + 2).ToString() + "," + "发送日期" + "," + "[" + row8 + "]错误!" + "|";
- }
- }
-
- string row9 = pds.Rows[i][9].ToString();
- if (!string.IsNullOrEmpty(row9))
- {
- string[] reunit = row9.Split(',');
+ string[] reunit = row8.Split(',');
foreach (string unit in reunit)
{
var u = units.Where(x => x.UnitName == unit.Trim()).FirstOrDefault();
@@ -272,6 +266,23 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
}
}
+
+ string row11 = pds.Rows[i][11].ToString();
+ if (string.IsNullOrEmpty(row11))
+ {
+ result += (i + 2).ToString() + "," + "标识编号" + "," + "此项为必填项!" + "|";
+ }
+ else
+ {
+ try
+ {
+ int t = Convert.ToInt32(row11);
+ }
+ catch (Exception)
+ {
+ result += (i + 2).ToString() + "," + "标识编号" + "," + "[" + row11 + "]错误!" + "|";
+ }
+ }
}
if (!string.IsNullOrEmpty(result))
{
@@ -421,12 +432,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
&& x.SuperUnitWork == null
select x;
- for (int i = 0; i < ir; i++)
+ for (int i = 1; i < ir; i++)
{
Model.Comprehensive_DesignDrawings oldViewInfo = new Model.Comprehensive_DesignDrawings();
string row0 = pds.Rows[i][0].ToString().Trim();
var cn = cns.Where(y => y.ProfessionalName == row0).FirstOrDefault();
- oldViewInfo = oldViewInfos.Where(x => x.RemarkCode == pds.Rows[i][5].ToString().Trim()
+ oldViewInfo = oldViewInfos.Where(x => x.RemarkCode ==Funs.GetNewInt(pds.Rows[i][11].ToString().Trim())
).FirstOrDefault();
if (oldViewInfo == null)
{
@@ -441,25 +452,25 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
des.DesignDrawingsContent = pds.Rows[i][3].ToString().Trim();//图纸内容
des.Edition = pds.Rows[i][4].ToString().Trim();//版次
- des.RemarkCode = pds.Rows[i][5].ToString().Trim();//标志编号
+ if (!string.IsNullOrEmpty(pds.Rows[i][5].ToString().Trim()))
+ {
+ des.PageNumber = Convert.ToInt32(pds.Rows[i][5].ToString().Trim());//页数
+ }
if (!string.IsNullOrEmpty(pds.Rows[i][6].ToString().Trim()))
{
- des.PageNumber = Convert.ToInt32(pds.Rows[i][6].ToString().Trim());//页数
+ des.ReceiveDate = Convert.ToDateTime(pds.Rows[i][6].ToString().Trim());//接收日期
}
if (!string.IsNullOrEmpty(pds.Rows[i][7].ToString().Trim()))
{
- des.ReceiveDate = Convert.ToDateTime(pds.Rows[i][7].ToString().Trim());//接收日期
+ des.SendDate = Convert.ToDateTime(pds.Rows[i][7].ToString().Trim());//发送日期
}
if (!string.IsNullOrEmpty(pds.Rows[i][8].ToString().Trim()))
{
- des.SendDate = Convert.ToDateTime(pds.Rows[i][8].ToString().Trim());//发送日期
+ des.ReceiveUnits = UnitService.GetUnitIds(pds.Rows[i][8].ToString().Trim());//接收单位
}
- if (!string.IsNullOrEmpty(pds.Rows[i][9].ToString().Trim()))
- {
- des.ReceiveUnits = UnitService.GetUnitIds(pds.Rows[i][9].ToString().Trim());//接收单位
- }
- des.ReceiveMan = pds.Rows[i][10].ToString().Trim(); //接收人
- des.Remark = pds.Rows[i][11].ToString().Trim();//备注
+ des.ReceiveMan = pds.Rows[i][9].ToString().Trim(); //接收人
+ des.Remark = pds.Rows[i][10].ToString().Trim();//备注
+ des.RemarkCode = Funs.GetNewInt(pds.Rows[i][11].ToString().Trim());//标志编号
des.Status = BLL.Const.Comprehensive_Compile;
des.CompileMan = this.CurrUser.UserId;
BLL.DesignDrawingsService.AddDesignDrawings(des);
@@ -474,25 +485,25 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
oldViewInfo.DesignDrawingsContent = pds.Rows[i][3].ToString().Trim();//图纸内容
oldViewInfo.Edition = pds.Rows[i][4].ToString().Trim();//版次
- oldViewInfo.RemarkCode = pds.Rows[i][5].ToString().Trim();//标志编号
+ if (!string.IsNullOrEmpty(pds.Rows[i][5].ToString().Trim()))
+ {
+ oldViewInfo.PageNumber = Convert.ToInt32(pds.Rows[i][5].ToString().Trim());//页数
+ }
if (!string.IsNullOrEmpty(pds.Rows[i][6].ToString().Trim()))
{
- oldViewInfo.PageNumber = Convert.ToInt32(pds.Rows[i][6].ToString().Trim());//页数
+ oldViewInfo.ReceiveDate = Convert.ToDateTime(pds.Rows[i][6].ToString().Trim());//接收日期
}
if (!string.IsNullOrEmpty(pds.Rows[i][7].ToString().Trim()))
{
- oldViewInfo.ReceiveDate = Convert.ToDateTime(pds.Rows[i][7].ToString().Trim());//接收日期
+ oldViewInfo.SendDate = Convert.ToDateTime(pds.Rows[i][7].ToString().Trim());//发送日期
}
if (!string.IsNullOrEmpty(pds.Rows[i][8].ToString().Trim()))
{
- oldViewInfo.SendDate = Convert.ToDateTime(pds.Rows[i][8].ToString().Trim());//发送日期
+ oldViewInfo.ReceiveUnits = UnitService.GetUnitIds(pds.Rows[i][8].ToString().Trim());//接收单位
}
- if (!string.IsNullOrEmpty(pds.Rows[i][9].ToString().Trim()))
- {
- oldViewInfo.ReceiveUnits = UnitService.GetUnitIds(pds.Rows[i][9].ToString().Trim());//接收单位
- }
- oldViewInfo.ReceiveMan = pds.Rows[i][10].ToString().Trim(); //接收人
- oldViewInfo.Remark = pds.Rows[i][11].ToString().Trim();//备注
+ oldViewInfo.ReceiveMan = pds.Rows[i][9].ToString().Trim(); //接收人
+ oldViewInfo.Remark = pds.Rows[i][10].ToString().Trim();//备注
+ oldViewInfo.RemarkCode = Funs.GetNewInt(pds.Rows[i][11].ToString().Trim());//标志编号
oldViewInfo.CompileMan = this.CurrUser.UserId;
oldViewInfo.Status = BLL.Const.Comprehensive_Compile;
BLL.DesignDrawingsService.UpdateDesignDrawings(oldViewInfo);
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsEdit.aspx
index 97230392..c18cb356 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsEdit.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsEdit.aspx
@@ -32,7 +32,7 @@
-
+
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsEdit.aspx.cs
index 2a50a668..5d203926 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsEdit.aspx.cs
@@ -70,7 +70,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
this.txtReceiveMan.Text = designDrawings.ReceiveMan;
this.txtRemark.Text = designDrawings.Remark;
- this.txtRemarkCode.Text = designDrawings.RemarkCode;
+ this.txtRemarkCode.Text = designDrawings.RemarkCode.HasValue ? designDrawings.RemarkCode.ToString() : "";
var currApprove = DesignDrawingsApproveService.GetCurrentApprove(designDrawings.DesignDrawingsId);
@@ -171,6 +171,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
return;
}
+ var q = Funs.DB.Comprehensive_DesignDrawings.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignDrawingsId != this.DesignDrawingsId || (this.DesignDrawingsId == null && x.DesignDrawingsId != null)));
+ if (q != null)
+ {
+ Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
+ return;
+ }
Model.Comprehensive_DesignDrawings designDrawings = new Model.Comprehensive_DesignDrawings();
designDrawings.ProjectId = this.CurrUser.LoginProjectId;
@@ -184,7 +190,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
designDrawings.ReceiveMan = this.txtReceiveMan.Text.Trim();
designDrawings.Remark = this.txtRemark.Text.Trim();
designDrawings.CompileMan = this.CurrUser.UserId;
- designDrawings.RemarkCode = this.txtRemarkCode.Text.Trim();
+ designDrawings.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
{
designDrawings.AuditMan = drpAudit.SelectedValue;
@@ -251,6 +257,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
return;
}
+ var q = Funs.DB.Comprehensive_DesignDrawings.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignDrawingsId != this.DesignDrawingsId || (this.DesignDrawingsId == null && x.DesignDrawingsId != null)));
+ if (q != null)
+ {
+ Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
+ return;
+ }
Model.Comprehensive_DesignDrawings designDrawings = new Model.Comprehensive_DesignDrawings();
designDrawings.ProjectId = this.CurrUser.LoginProjectId;
designDrawings.CNProfessionalId = this.drpCNProfessionalId.SelectedValue;
@@ -263,7 +275,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
designDrawings.ReceiveMan = this.txtReceiveMan.Text.Trim();
designDrawings.Remark = this.txtRemark.Text.Trim();
designDrawings.CompileMan = this.CurrUser.UserId;
- designDrawings.RemarkCode = this.txtRemarkCode.Text.Trim();
+ designDrawings.RemarkCode =Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
{
designDrawings.AuditMan = drpAudit.SelectedValue;
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApproval.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApproval.aspx
index b7f30a56..7fddcb12 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApproval.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApproval.aspx
@@ -15,7 +15,7 @@
@@ -34,6 +34,9 @@
+
+
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApproval.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApproval.aspx.cs
index 4096ac49..946783be 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApproval.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApproval.aspx.cs
@@ -3,6 +3,7 @@ using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
+using System.IO;
using System.Linq;
namespace FineUIPro.Web.Comprehensive
@@ -33,7 +34,7 @@ namespace FineUIPro.Web.Comprehensive
{
string strSql = @"select GeneralPlanApprovalId, ProjectId, C.UnitId,PlanCode,C.CNProfessionalId,
PlanName, ApprovalDate, AuditMan, ApprovalMan, ImplementationDeviation,CompileMan,
- CompileDate, UnitWorkId,CN.ProfessionalName,u.UnitName
+ CompileDate, UnitWorkId,CN.ProfessionalName,u.UnitName,C.RemarkCode
from Comprehensive_GeneralPlanApproval C
left join Base_CNProfessional CN on C.CNProfessionalId=CN.CNProfessionalId
left join Base_Unit u on u.UnitId = c.UnitId
@@ -271,5 +272,161 @@ namespace FineUIPro.Web.Comprehensive
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("GeneralPlanApprovalDataIn.aspx", "导入 - ")));
}
#endregion
+
+ #region 导出按钮
+ /// 导出按钮
+ ///
+ ///
+ ///
+ protected void btnOut_Click(object sender, EventArgs e)
+ {
+ string rootPath = Server.MapPath("~/");
+ string initTemplatePath = Const.GeneralPlanApprovalTemplateUrl;
+ string uploadfilepath = string.Empty;
+ string newUrl = string.Empty;
+ uploadfilepath = rootPath + initTemplatePath;
+
+ var lists = (from x in Funs.DB.Comprehensive_GeneralPlanApproval
+ where x.ProjectId == this.CurrUser.LoginProjectId
+ select x);
+ if (sdrpUnitId.SelectedValue != BLL.Const._Null)
+ {
+ lists = lists.Where(x => x.UnitId == sdrpUnitId.SelectedValue);
+ }
+ if (this.drpProfessionalId.SelectedValue != BLL.Const._Null)
+ {
+ lists = lists.Where(x => x.CNProfessionalId == drpProfessionalId.SelectedValue);
+ }
+ if (!string.IsNullOrEmpty(this.txtPlanName.Text.Trim()))
+ {
+ lists = lists.Where(x => x.PlanName.Contains(this.txtPlanName.Text.Trim()));
+ }
+ lists = lists.OrderBy(x => x.RemarkCode);
+ if (lists != null)
+ {
+ string projectName = BLL.ProjectService.GetShortNameByProjectId(this.CurrUser.LoginProjectId);
+ newUrl = uploadfilepath.Replace("施工组织设计及施工方案导入模板", "施工组织设计及施工方案(" + projectName + DateTime.Now.ToString("yyyyMMdd") + ")");
+ File.Copy(uploadfilepath, newUrl);
+ // 第一步:读取文件流
+ NPOI.SS.UserModel.IWorkbook workbook;
+ using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read))
+ {
+ //workbook = new NPOI.XSSF.UserModel.XSSFWorkbook(stream);
+ workbook = new NPOI.HSSF.UserModel.HSSFWorkbook(stream);
+ }
+ // 创建单元格样式
+ NPOI.SS.UserModel.ICellStyle cellStyle = workbook.CreateCellStyle();
+ cellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
+ cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
+ var font = workbook.CreateFont();
+ font.FontHeightInPoints = 11;
+ cellStyle.SetFont(font);
+ NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
+ cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
+ cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
+ var font0 = workbook.CreateFont();
+ font0.FontHeightInPoints = 12;
+ font0.IsBold = true;
+ cellStyle0.SetFont(font0);
+ // 第二步:创建新数据行
+ NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
+ NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
+ NPOI.SS.UserModel.ICell cell;
+ int i = 2;
+ foreach (var item in lists)
+ {
+ // 第二步:创建新数据行
+ row = sheet.CreateRow(i);
+ // 添加数据
+ cell = row.CreateCell(0);
+ cell.CellStyle = cellStyle;
+ string unitName = string.Empty;
+ if (!string.IsNullOrEmpty(item.UnitId))
+ {
+ unitName = BLL.UnitService.GetUnitNameByUnitId(item.UnitId);
+ }
+ cell.SetCellValue(unitName);//报批单位
+
+ cell = row.CreateCell(1);
+ cell.CellStyle = cellStyle;
+ string proName = string.Empty;
+ var cnp = BLL.CNProfessionalService.GetCNProfessional(item.CNProfessionalId);
+ if (cnp != null)
+ {
+ proName = cnp.ProfessionalName;
+ }
+ cell.SetCellValue(proName);//专业
+
+ cell = row.CreateCell(2);
+ cell.CellStyle = cellStyle;
+ string unitWorkName = string.Empty;
+ if (!string.IsNullOrEmpty(item.UnitWorkId))
+ {
+ unitWorkName = ConvertUnitWork(item.UnitWorkId);
+ }
+ cell.SetCellValue(unitWorkName);//单位工程
+
+ cell = row.CreateCell(3);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.PlanCode);//编号
+
+ cell = row.CreateCell(4);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.PlanName);//方案名称
+
+ cell = row.CreateCell(5);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.ApprovalDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.ApprovalDate) : "");//审批日期
+
+ cell = row.CreateCell(6);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.AuditMan);//审核人
+
+ cell = row.CreateCell(7);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.ApprovalMan);//批准人
+
+ cell = row.CreateCell(8);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.ImplementationDeviation);//施工总结
+
+ cell = row.CreateCell(9);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.RemarkCode.HasValue ? item.RemarkCode.ToString() : "");//标志编号
+
+ i++;
+ }
+ // 第三步:写入文件流
+ using (FileStream stream = new FileStream(newUrl, FileMode.Create, FileAccess.Write))
+ {
+ workbook.Write(stream);
+ workbook.Close();
+ }
+ string fileName = Path.GetFileName(newUrl);
+ FileInfo info = new FileInfo(newUrl);
+ long fileSize = info.Length;
+ Response.Clear();
+ Response.ContentType = "application/x-zip-compressed";
+ Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
+ Response.AddHeader("Content-Length", fileSize.ToString());
+ Response.TransmitFile(newUrl, 0, fileSize);
+ Response.Flush();
+ Response.Close();
+ File.Delete(newUrl);
+ }
+ else
+ {
+ Alert.ShowInTop("当前无记录,无法导出!", MessageBoxIcon.Warning);
+ }
+ }
+ #endregion
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApproval.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApproval.aspx.designer.cs
index ffe721a1..b19c2176 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApproval.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApproval.aspx.designer.cs
@@ -111,6 +111,15 @@ namespace FineUIPro.Web.Comprehensive {
///
protected global::FineUIPro.Button btnImport;
+ ///
+ /// btnOut 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnOut;
+
///
/// lblPageIndex 控件。
///
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalDataIn.aspx.cs
index 317d539b..2c31f4ac 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalDataIn.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalDataIn.aspx.cs
@@ -178,7 +178,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
&& x.SuperUnitWork == null
select x;
- for (int i = 0; i < ir; i++)
+ for (int i = 1; i < ir; i++)
{
string row0 = pds.Rows[i][0].ToString();
if (string.IsNullOrEmpty(row0))
@@ -246,6 +246,17 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
result += (i + 2).ToString() + "," + "标志编号" + "," + "此项为必填项!" + "|";
}
+ else
+ {
+ try
+ {
+ int t = Convert.ToInt32(row9);
+ }
+ catch (Exception)
+ {
+ result += (i + 2).ToString() + "," + "标志编号" + "," + "[" + row9 + "]错误!" + "|";
+ }
+ }
}
if (!string.IsNullOrEmpty(result))
{
@@ -395,13 +406,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive
&& x.SuperUnitWork == null
select x;
- for (int i = 0; i < ir; i++)
+ for (int i = 1; i < ir; i++)
{
Model.Comprehensive_GeneralPlanApproval oldViewInfo = new Model.Comprehensive_GeneralPlanApproval();
string row0 = pds.Rows[i][0].ToString().Trim();
string row1 = pds.Rows[i][1].ToString().Trim();
var cn = cns.Where(y => y.ProfessionalName == row1).FirstOrDefault();
- oldViewInfo = oldViewInfos.Where(x => x.RemarkCode == pds.Rows[i][9].ToString().Trim()
+ oldViewInfo = oldViewInfos.Where(x => x.RemarkCode == Funs.GetNewInt(pds.Rows[i][9].ToString().Trim())
).FirstOrDefault();
if (oldViewInfo == null)
{
@@ -419,8 +430,8 @@ namespace FineUIPro.Web.CQMS.Comprehensive
des.ApprovalDate = Funs.GetNewDateTime(pds.Rows[i][5].ToString().Trim());
des.AuditMan = pds.Rows[i][6].ToString().Trim();
des.ApprovalMan = pds.Rows[i][7].ToString().Trim();
- des.ImplementationDeviation = pds.Rows[i][8].ToString().Trim();
- des.RemarkCode = pds.Rows[i][9].ToString().Trim();
+ des.ImplementationDeviation = pds.Rows[i][8].ToString().Trim();
+ des.RemarkCode = Funs.GetNewInt(pds.Rows[i][9].ToString().Trim());
des.CompileMan = this.CurrUser.UserId;
des.CompileDate = DateTime.Now;
BLL.GeneralPlanApprovalService.AddGeneralPlanApproval(des);
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx
index 9c396189..173618dd 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx
@@ -16,7 +16,7 @@
-
+
@@ -55,6 +55,7 @@
+
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx.cs
index 7fde8d81..b39dbdef 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx.cs
@@ -64,6 +64,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
this.txtAuditMan.Text = generalPlanApproval.AuditMan;
this.txtApprovalMan.Text = generalPlanApproval.ApprovalMan;
this.txtImplementationDeviation.Text = generalPlanApproval.ImplementationDeviation;
+ this.txtRemarkCode.Text = generalPlanApproval.RemarkCode.HasValue ? generalPlanApproval.RemarkCode.ToString() : "";
}
else
{
@@ -90,6 +91,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
return;
}
+ var q = Funs.DB.Comprehensive_GeneralPlanApproval.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.GeneralPlanApprovalId != this.GeneralPlanApprovalId || (this.GeneralPlanApprovalId == null && x.GeneralPlanApprovalId != null)));
+ if (q != null)
+ {
+ Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
+ return;
+ }
Model.Comprehensive_GeneralPlanApproval generalPlanApproval = new Model.Comprehensive_GeneralPlanApproval();
generalPlanApproval.ProjectId = this.CurrUser.LoginProjectId;
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
@@ -120,6 +127,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
ids = ids.Substring(0, ids.LastIndexOf(","));
}
generalPlanApproval.UnitWorkId = ids;
+ generalPlanApproval.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
if (string.IsNullOrEmpty(this.GeneralPlanApprovalId))
{
if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx.designer.cs
index 0ca06991..11a041d3 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx.designer.cs
@@ -147,6 +147,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
///
protected global::FineUIPro.Button btnAttach;
+ ///
+ /// txtRemarkCode 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtRemarkCode;
+
///
/// Toolbar1 控件。
///
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipment.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipment.aspx.cs
index fc883381..a7627848 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipment.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipment.aspx.cs
@@ -309,7 +309,7 @@ namespace FineUIPro.Web.Comprehensive
lists = lists.OrderBy(x => x.RemarkCode);
if (lists != null)
{
- var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
+ var projectName = BLL.ProjectService.GetShortNameByProjectId(this.CurrUser.LoginProjectId);
newUrl = uploadfilepath.Replace("设备材料报验导入模板", "设备材料报验(" + projectName + "" + DateTime.Now.ToString("yyyyMMdd") + ")");
File.Copy(uploadfilepath, newUrl);
// 第一步:读取文件流
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx
index e22ec66a..2c66e751 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx
@@ -26,7 +26,7 @@
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx.cs
index fd56334b..b788b077 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx.cs
@@ -34,7 +34,7 @@ namespace FineUIPro.Web.Comprehensive
{
string strSql = @"select InspectionMachineId, InspectionMachineCode, U.UnitName,CN.ProfessionalName ,Status,
InspectionMachineName, SpecificationModel, NextTestDate, TestCycle, C.InspectionDate,
- InspectionDate CompileDate, (CASE WHEN IsVerification=1 THEN '是' WHEN IsVerification=0 THEN '否' ELSE '' END) AS IsVerification, InspectionType, LeaveDate, UnitsCount
+ InspectionDate CompileDate, (CASE WHEN IsVerification=1 THEN '是' WHEN IsVerification=0 THEN '否' ELSE '' END) AS IsVerification, InspectionType, LeaveDate, UnitsCount,C.RemarkCode
from Comprehensive_InspectionMachine C
left join Base_Unit U on C.UnitId=U.UnitId
left join Base_CNProfessional CN on C.CNProfessionalId=CN.CNProfessionalId
@@ -328,7 +328,7 @@ namespace FineUIPro.Web.Comprehensive
lists = lists.OrderBy(x => x.RemarkCode);
if (lists != null)
{
- string projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
+ string projectName = BLL.ProjectService.GetShortNameByProjectId(this.CurrUser.LoginProjectId);
newUrl = uploadfilepath.Replace("机具报验导入模板", "机具报验("+ projectName+DateTime.Now.ToString("yyyyMMdd")+ ")");
File.Copy(uploadfilepath, newUrl);
// 第一步:读取文件流
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx
index bf771998..e67a17df 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx
@@ -27,7 +27,7 @@
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx.cs
index 72302fe0..570f9cb5 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx.cs
@@ -35,7 +35,7 @@ namespace FineUIPro.Web.Comprehensive
string strSql = @"select InspectionPersonId, InspectionPersonCode, PersonName, Status,
CertificateNumber, QualifiedProjectCode, ValidityDate, ApprovalTime,
DepartureTime, AttachUrl,CompileMan, CompileDate,
- IsOnSite, UnitWorkId,U.UnitName,CN.ProfessionalName ,P.PostName
+ IsOnSite, UnitWorkId,U.UnitName,CN.ProfessionalName ,P.PostName,C.RemarkCode
from Comprehensive_InspectionPerson C
left join Base_Unit U on C.UnitId=U.UnitId
left join Base_CNProfessional CN on C.CNProfessionalId=CN.CNProfessionalId
@@ -395,7 +395,7 @@ namespace FineUIPro.Web.Comprehensive
lists = lists.OrderBy(x => x.RemarkCode);
if (lists != null)
{
- string projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
+ string projectName = BLL.ProjectService.GetShortNameByProjectId(this.CurrUser.LoginProjectId);
newUrl = uploadfilepath.Replace("人员报验导入模板", "人员报验(" + projectName + DateTime.Now.ToString("yyyyMMdd") + ")");
File.Copy(uploadfilepath, newUrl);
// 第一步:读取文件流
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlan.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlan.aspx
index 18df54e4..1ee77feb 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlan.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlan.aspx
@@ -16,7 +16,7 @@
@@ -35,6 +35,9 @@
+
+
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlan.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlan.aspx.cs
index 387c99ea..70b59d90 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlan.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlan.aspx.cs
@@ -3,6 +3,7 @@ using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
+using System.IO;
using System.Linq;
namespace FineUIPro.Web.CQMS.Comprehensive
@@ -31,7 +32,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
///
public void BindGrid()
{
- string strSql = @"select C.*,CN.ProfessionalName,C.CNProfessionalId,C.UnitId,u.UnitName
+ string strSql = @"select C.*,CN.ProfessionalName,C.CNProfessionalId,C.UnitId,u.UnitName,C.RemarkCode
from Inspection_Test_Plan C
left join Base_CNProfessional CN on C.CNProfessionalId=CN.CNProfessionalId
left join Base_Unit as u on u.UnitId = C.UnitId
@@ -237,5 +238,148 @@ namespace FineUIPro.Web.CQMS.Comprehensive
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("InspectionTestPlanDataIn.aspx", "导入 - ")));
}
#endregion
+
+ #region 导出按钮
+ /// 导出按钮
+ ///
+ ///
+ ///
+ protected void btnOut_Click(object sender, EventArgs e)
+ {
+ string rootPath = Server.MapPath("~/");
+ string initTemplatePath = Const.InspectionTestPlanTemplateUrl;
+ string uploadfilepath = string.Empty;
+ string newUrl = string.Empty;
+ uploadfilepath = rootPath + initTemplatePath;
+
+ var lists = (from x in Funs.DB.Inspection_Test_Plan
+ where x.ProjectId == this.CurrUser.LoginProjectId
+ select x);
+ if (sdrpUnitId.SelectedValue != BLL.Const._Null)
+ {
+ lists = lists.Where(x => x.UnitId == sdrpUnitId.SelectedValue);
+ }
+ if (drpCNPr.SelectedValue != BLL.Const._Null)
+ {
+ lists = lists.Where(x => x.CNProfessionalId == drpCNPr.SelectedValue);
+ }
+ if (!string.IsNullOrEmpty(this.txtPlanName.Text.Trim()))
+ {
+ lists = lists.Where(x => x.PlanName.Contains(this.txtPlanName.Text.Trim()));
+ }
+ lists = lists.OrderBy(x => x.RemarkCode);
+ if (lists != null)
+ {
+ string projectName = BLL.ProjectService.GetShortNameByProjectId(this.CurrUser.LoginProjectId);
+ newUrl = uploadfilepath.Replace("检验试验计划导入模板.xls", "检验试验计划(" + projectName + DateTime.Now.ToString("yyyyMMdd") + ").xls");
+ File.Copy(uploadfilepath, newUrl);
+ // 第一步:读取文件流
+ NPOI.SS.UserModel.IWorkbook workbook;
+ using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read))
+ {
+ //workbook = new NPOI.XSSF.UserModel.XSSFWorkbook(stream);
+ workbook = new NPOI.HSSF.UserModel.HSSFWorkbook(stream);
+ }
+ // 创建单元格样式
+ NPOI.SS.UserModel.ICellStyle cellStyle = workbook.CreateCellStyle();
+ cellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
+ cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
+ var font = workbook.CreateFont();
+ font.FontHeightInPoints = 11;
+ cellStyle.SetFont(font);
+ NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
+ cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
+ cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
+ var font0 = workbook.CreateFont();
+ font0.FontHeightInPoints = 12;
+ font0.IsBold = true;
+ cellStyle0.SetFont(font0);
+ // 第二步:创建新数据行
+ NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
+ NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
+ NPOI.SS.UserModel.ICell cell;
+ int i = 2;
+ foreach (var item in lists)
+ {
+ // 第二步:创建新数据行
+ row = sheet.CreateRow(i);
+ // 添加数据
+ cell = row.CreateCell(0);
+ cell.CellStyle = cellStyle;
+ string unitName = string.Empty;
+ if (!string.IsNullOrEmpty(item.UnitId))
+ {
+ unitName = BLL.UnitService.GetUnitNameByUnitId(item.UnitId);
+ }
+ cell.SetCellValue(unitName);//报批单位
+
+ cell = row.CreateCell(1);
+ cell.CellStyle = cellStyle;
+ string proName = string.Empty;
+ var cnp = BLL.CNProfessionalService.GetCNProfessional(item.CNProfessionalId);
+ if (cnp != null)
+ {
+ proName = cnp.ProfessionalName;
+ }
+ cell.SetCellValue(proName);//专业
+
+ cell = row.CreateCell(2);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.PlanCode);//编号
+
+ cell = row.CreateCell(3);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.PlanName);//检验试验计划名称
+
+ cell = row.CreateCell(4);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.ApprovalDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.ApprovalDate) : "");//审批日期
+
+ cell = row.CreateCell(5);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.ApprovalMan);//审批人
+
+ cell = row.CreateCell(6);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.AuditMan);//审核人
+
+ cell = row.CreateCell(7);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.RemarkCode.HasValue ? item.RemarkCode.ToString() : "");//标志编号
+
+ i++;
+ }
+ // 第三步:写入文件流
+ using (FileStream stream = new FileStream(newUrl, FileMode.Create, FileAccess.Write))
+ {
+ workbook.Write(stream);
+ workbook.Close();
+ }
+ string fileName = Path.GetFileName(newUrl);
+ FileInfo info = new FileInfo(newUrl);
+ long fileSize = info.Length;
+ Response.Clear();
+ Response.ContentType = "application/x-zip-compressed";
+ Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
+ Response.AddHeader("Content-Length", fileSize.ToString());
+ Response.TransmitFile(newUrl, 0, fileSize);
+ Response.Flush();
+ Response.Close();
+ File.Delete(newUrl);
+ }
+ else
+ {
+ Alert.ShowInTop("当前无记录,无法导出!", MessageBoxIcon.Warning);
+ }
+ }
+ #endregion
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlan.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlan.aspx.designer.cs
index 1452997b..2d81c6a1 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlan.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlan.aspx.designer.cs
@@ -111,6 +111,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
///
protected global::FineUIPro.Button btnImport;
+ ///
+ /// btnOut 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnOut;
+
///
/// lblPageIndex 控件。
///
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlanDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlanDataIn.aspx.cs
index 493d6f11..33ab05e9 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlanDataIn.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlanDataIn.aspx.cs
@@ -170,7 +170,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
var cns = from x in Funs.DB.Base_CNProfessional select x;
- for (int i = 0; i < ir; i++)
+ for (int i = 1; i < ir; i++)
{
string row0 = pds.Rows[i][0].ToString().Trim();
if (!string.IsNullOrEmpty(row0))
@@ -195,6 +195,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive
result += (i + 2).ToString() + "," + "专业名称" + "," + "[" + row1 + "]不存在!" + "|";
}
}
+ else
+ {
+ result += (i + 2).ToString() + "," + "专业名称" + "," + "此项为必填项!" + "|";
+ }
string row2 = pds.Rows[i][2].ToString();
if (string.IsNullOrEmpty(row2))
@@ -220,6 +224,17 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
result += (i + 2).ToString() + "," + "标志编号" + "," + "此项为必填项!" + "|";
}
+ else
+ {
+ try
+ {
+ int t = Convert.ToInt32(row7);
+ }
+ catch (Exception)
+ {
+ result += (i + 2).ToString() + "," + "标志编号" + "," + "[" + row7 + "]错误!" + "|";
+ }
+ }
}
if (!string.IsNullOrEmpty(result))
{
@@ -363,9 +378,9 @@ namespace FineUIPro.Web.CQMS.Comprehensive
var oldViewInfos = from x in Funs.DB.Inspection_Test_Plan
where x.ProjectId == this.CurrUser.LoginProjectId
select x;
- for (int i = 0; i < ir; i++)
+ for (int i = 1; i < ir; i++)
{
- var oldViewInfo = oldViewInfos.Where(x => x.RemarkCode == pds.Rows[i][7].ToString().Trim()).FirstOrDefault();
+ var oldViewInfo = oldViewInfos.Where(x => x.RemarkCode == Funs.GetNewInt(pds.Rows[i][7].ToString().Trim())).FirstOrDefault();
if (oldViewInfo == null)
{
Model.Inspection_Test_Plan Ins = new Model.Inspection_Test_Plan();
@@ -384,7 +399,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Ins.ApprovalDate = Funs.GetNewDateTime(pds.Rows[i][4].ToString().Trim());
Ins.AuditMan = pds.Rows[i][5].ToString().Trim();
Ins.ApprovalMan= pds.Rows[i][6].ToString().Trim();
- Ins.RemarkCode= pds.Rows[i][7].ToString().Trim();
+ Ins.RemarkCode= Funs.GetNewInt(pds.Rows[i][7].ToString().Trim());
Ins.CreateMan = this.CurrUser.UserId;
Ins.CreateDate = DateTime.Now;
BLL.InspectionTestPlanService.Insert(Ins);
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlanEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlanEdit.aspx
index b1dc5644..6345b696 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlanEdit.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlanEdit.aspx
@@ -39,7 +39,7 @@
-
+
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlanEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlanEdit.aspx.cs
index 956c07f0..5acb22a7 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlanEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlanEdit.aspx.cs
@@ -61,6 +61,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
this.txtAuditMan.Text = model.AuditMan;
this.txtApprovalMan.Text = model.ApprovalMan;
this.txtRemarks.Text = model.Remarks;
+ this.txtRemarkCode.Text = model.RemarkCode.HasValue ? model.RemarkCode.ToString() : "";
}
else
{
@@ -104,6 +105,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
return;
}
+ var q = Funs.DB.Inspection_Test_Plan.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.Id != this.Id || (this.Id == null && x.Id != null)));
+ if (q != null)
+ {
+ Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
+ return;
+ }
var majorPlanApproval = new Model.Inspection_Test_Plan();
majorPlanApproval.ProjectId = this.CurrUser.LoginProjectId;
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
@@ -124,7 +131,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
majorPlanApproval.AuditMan = this.txtAuditMan.Text.Trim();
majorPlanApproval.ApprovalMan = this.txtApprovalMan.Text.Trim();
majorPlanApproval.Remarks = this.txtRemarks.Text.Trim();
-
+ majorPlanApproval.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
if (string.IsNullOrEmpty(this.Id))
{
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlanEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlanEdit.aspx.designer.cs
index 006a5798..f3aafdd2 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlanEdit.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlanEdit.aspx.designer.cs
@@ -7,13 +7,11 @@
// 自动生成>
//------------------------------------------------------------------------------
-namespace FineUIPro.Web.CQMS.Comprehensive
-{
-
-
- public partial class InspectionTestPlanEdit
- {
-
+namespace FineUIPro.Web.CQMS.Comprehensive {
+
+
+ public partial class InspectionTestPlanEdit {
+
///
/// form1 控件。
///
@@ -22,7 +20,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
-
+
///
/// PageManager1 控件。
///
@@ -31,7 +29,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.PageManager PageManager1;
-
+
///
/// SimpleForm1 控件。
///
@@ -40,7 +38,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Form SimpleForm1;
-
+
///
/// drpUnitId 控件。
///
@@ -49,7 +47,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpUnitId;
-
+
///
/// drpCNProfessionalId 控件。
///
@@ -58,7 +56,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpCNProfessionalId;
-
+
///
/// txtPlanCode 控件。
///
@@ -67,7 +65,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtPlanCode;
-
+
///
/// txtPlanName 控件。
///
@@ -76,7 +74,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtPlanName;
-
+
///
/// txtApprovalDate 控件。
///
@@ -85,7 +83,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DatePicker txtApprovalDate;
-
+
///
/// txtAuditMan 控件。
///
@@ -94,7 +92,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtAuditMan;
-
+
///
/// txtApprovalMan 控件。
///
@@ -103,16 +101,16 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtApprovalMan;
-
+
///
- /// Label13 控件。
+ /// txtRemarkCode 控件。
///
///
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.Label Label13;
-
+ protected global::FineUIPro.NumberBox txtRemarkCode;
+
///
/// txtRemarks 控件。
///
@@ -121,7 +119,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextArea txtRemarks;
-
+
///
/// Panel2 控件。
///
@@ -130,7 +128,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Panel Panel2;
-
+
///
/// Label1 控件。
///
@@ -139,7 +137,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Label Label1;
-
+
///
/// btnAttach 控件。
///
@@ -148,7 +146,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnAttach;
-
+
///
/// Toolbar1 控件。
///
@@ -157,7 +155,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Toolbar Toolbar1;
-
+
///
/// hdAttachUrl 控件。
///
@@ -166,7 +164,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.HiddenField hdAttachUrl;
-
+
///
/// btnSave 控件。
///
@@ -175,7 +173,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnSave;
-
+
///
/// WindowAtt 控件。
///
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApproval.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApproval.aspx
index 2d658334..a21337d8 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApproval.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApproval.aspx
@@ -15,7 +15,7 @@
@@ -34,6 +34,9 @@
+
+
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApproval.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApproval.aspx.cs
index 5403d302..3e65c307 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApproval.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApproval.aspx.cs
@@ -3,6 +3,7 @@ using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
+using System.IO;
using System.Linq;
namespace FineUIPro.Web.Comprehensive
@@ -34,7 +35,7 @@ namespace FineUIPro.Web.Comprehensive
string strSql = @"select MajorPlanApprovalId, ProjectId, PlanCode, PlanName, ReviewMan, ApprovalDate,
AuditMan, ApprovalMan, ImplementationDeviation, AttachUrl, CompileMan, CompileDate,
UnitWorkId,CN.ProfessionalName,C.CNProfessionalId,C.UnitId,u.UnitName ,
- case IsReview when 1 then '是' else '否' end as IsReview
+ case IsReview when 1 then '是' else '否' end as IsReview,C.RemarkCode
from Comprehensive_MajorPlanApproval C
left join Base_CNProfessional CN on C.CNProfessionalId=CN.CNProfessionalId
left join Base_Unit as u on u.UnitId = C.UnitId
@@ -272,5 +273,169 @@ namespace FineUIPro.Web.Comprehensive
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("MajorPlanApprovalDataIn.aspx", "导入 - ")));
}
#endregion
+
+ #region 导出按钮
+ /// 导出按钮
+ ///
+ ///
+ ///
+ protected void btnOut_Click(object sender, EventArgs e)
+ {
+ string rootPath = Server.MapPath("~/");
+ string initTemplatePath = Const.MajorPlanApprovalTemplateUrl;
+ string uploadfilepath = string.Empty;
+ string newUrl = string.Empty;
+ uploadfilepath = rootPath + initTemplatePath;
+
+ var lists = (from x in Funs.DB.Comprehensive_MajorPlanApproval
+ where x.ProjectId == this.CurrUser.LoginProjectId
+ select x);
+ if (sdrpUnitId.SelectedValue != BLL.Const._Null)
+ {
+ lists = lists.Where(x => x.UnitId == sdrpUnitId.SelectedValue);
+ }
+ if (drpCNPr.SelectedValue != BLL.Const._Null)
+ {
+ lists = lists.Where(x => x.CNProfessionalId == drpCNPr.SelectedValue);
+ }
+ if (!string.IsNullOrEmpty(this.txtPlanName.Text.Trim()))
+ {
+ lists = lists.Where(x => x.PlanName.Contains(this.txtPlanName.Text.Trim()));
+ }
+ lists = lists.OrderBy(x => x.RemarkCode);
+ if (lists != null)
+ {
+ string projectName = BLL.ProjectService.GetShortNameByProjectId(this.CurrUser.LoginProjectId);
+ newUrl = uploadfilepath.Replace("超过一定规模的危大施工方案导入模板", "超过一定规模的危大施工方案(" + projectName + DateTime.Now.ToString("yyyyMMdd") + ")");
+ File.Copy(uploadfilepath, newUrl);
+ // 第一步:读取文件流
+ NPOI.SS.UserModel.IWorkbook workbook;
+ using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read))
+ {
+ //workbook = new NPOI.XSSF.UserModel.XSSFWorkbook(stream);
+ workbook = new NPOI.HSSF.UserModel.HSSFWorkbook(stream);
+ }
+ // 创建单元格样式
+ NPOI.SS.UserModel.ICellStyle cellStyle = workbook.CreateCellStyle();
+ cellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
+ cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
+ var font = workbook.CreateFont();
+ font.FontHeightInPoints = 11;
+ cellStyle.SetFont(font);
+ NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
+ cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
+ cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
+ var font0 = workbook.CreateFont();
+ font0.FontHeightInPoints = 12;
+ font0.IsBold = true;
+ cellStyle0.SetFont(font0);
+ // 第二步:创建新数据行
+ NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
+ NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
+ NPOI.SS.UserModel.ICell cell;
+ int i = 2;
+ foreach (var item in lists)
+ {
+ // 第二步:创建新数据行
+ row = sheet.CreateRow(i);
+ // 添加数据
+ cell = row.CreateCell(0);
+ cell.CellStyle = cellStyle;
+ string unitName = string.Empty;
+ if (!string.IsNullOrEmpty(item.UnitId))
+ {
+ unitName = BLL.UnitService.GetUnitNameByUnitId(item.UnitId);
+ }
+ cell.SetCellValue(unitName);//报批单位
+
+ cell = row.CreateCell(1);
+ cell.CellStyle = cellStyle;
+ string proName = string.Empty;
+ var cnp = BLL.CNProfessionalService.GetCNProfessional(item.CNProfessionalId);
+ if (cnp != null)
+ {
+ proName = cnp.ProfessionalName;
+ }
+ cell.SetCellValue(proName);//专业
+
+ cell = row.CreateCell(2);
+ cell.CellStyle = cellStyle;
+ string unitWorkName = string.Empty;
+ if (!string.IsNullOrEmpty(item.UnitWorkId))
+ {
+ unitWorkName = ConvertUnitWork(item.UnitWorkId);
+ }
+ cell.SetCellValue(unitWorkName);//单位工程
+
+ cell = row.CreateCell(3);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.PlanCode);//编号
+
+ cell = row.CreateCell(4);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.PlanName);//方案名称
+
+ cell = row.CreateCell(5);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.ReviewMan);//评审人员
+
+ cell = row.CreateCell(6);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.ApprovalDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.ApprovalDate) : "");//审批日期
+
+ cell = row.CreateCell(7);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.AuditMan);//审核人
+
+ cell = row.CreateCell(8);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.ApprovalMan);//批准人
+
+ cell = row.CreateCell(9);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.ExpertReviewMan);//专家评审人员
+
+ cell = row.CreateCell(10);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.IsReview == true ? "是" : "否");//是否通过专家评审
+
+ cell = row.CreateCell(11);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.RemarkCode.HasValue ? item.RemarkCode.ToString() : "");//标志编号
+
+ i++;
+ }
+ // 第三步:写入文件流
+ using (FileStream stream = new FileStream(newUrl, FileMode.Create, FileAccess.Write))
+ {
+ workbook.Write(stream);
+ workbook.Close();
+ }
+ string fileName = Path.GetFileName(newUrl);
+ FileInfo info = new FileInfo(newUrl);
+ long fileSize = info.Length;
+ Response.Clear();
+ Response.ContentType = "application/x-zip-compressed";
+ Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
+ Response.AddHeader("Content-Length", fileSize.ToString());
+ Response.TransmitFile(newUrl, 0, fileSize);
+ Response.Flush();
+ Response.Close();
+ File.Delete(newUrl);
+ }
+ else
+ {
+ Alert.ShowInTop("当前无记录,无法导出!", MessageBoxIcon.Warning);
+ }
+ }
+ #endregion
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApproval.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApproval.aspx.designer.cs
index 6c0b02fa..2b9c7008 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApproval.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApproval.aspx.designer.cs
@@ -111,6 +111,15 @@ namespace FineUIPro.Web.Comprehensive {
///
protected global::FineUIPro.Button btnImport;
+ ///
+ /// btnOut 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnOut;
+
///
/// lblPageIndex 控件。
///
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalDataIn.aspx.cs
index 39113f7c..976e4f5b 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalDataIn.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalDataIn.aspx.cs
@@ -178,7 +178,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
&& x.SuperUnitWork == null
select x;
- for (int i = 0; i < ir; i++)
+ for (int i = 1; i < ir; i++)
{
string row0 = pds.Rows[i][0].ToString();
if (string.IsNullOrEmpty(row0))
@@ -400,13 +400,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive
&& x.SuperUnitWork == null
select x;
- for (int i = 0; i < ir; i++)
+ for (int i = 1; i < ir; i++)
{
Model.Comprehensive_MajorPlanApproval oldViewInfo = new Model.Comprehensive_MajorPlanApproval();
string row0 = pds.Rows[i][0].ToString().Trim();
string row1 = pds.Rows[i][1].ToString().Trim();
var cn = cns.Where(y => y.ProfessionalName == row1).FirstOrDefault();
- oldViewInfo = oldViewInfos.Where(x => x.RemarkCode == pds.Rows[i][11].ToString().Trim()
+ oldViewInfo = oldViewInfos.Where(x => x.RemarkCode == Funs.GetNewInt(pds.Rows[i][11].ToString().Trim())
).FirstOrDefault();
if (oldViewInfo == null)
{
@@ -427,7 +427,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
des.ApprovalMan = pds.Rows[i][8].ToString().Trim();
des.ExpertReviewMan = pds.Rows[i][9].ToString().Trim();
des.IsReview = pds.Rows[i][10].ToString().Trim() == "是" ? true : false;
- des.RemarkCode = pds.Rows[i][11].ToString().Trim();
+ des.RemarkCode = Funs.GetNewInt(pds.Rows[i][11].ToString().Trim());
des.CompileMan = this.CurrUser.UserId;
des.CompileDate = DateTime.Now;
BLL.MajorPlanApprovalService.AddMajorPlanApproval(des);
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalEdit.aspx
index 62c7633e..2df44ca1 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalEdit.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalEdit.aspx
@@ -53,8 +53,8 @@
-
-
+
+ <%----%>
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalEdit.aspx.cs
index e620735c..cd64a4e1 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalEdit.aspx.cs
@@ -66,7 +66,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
this.txtApprovalMan.Text = majorPlanApproval.ApprovalMan;
//this.txtImplementationDeviation.Text = majorPlanApproval.ImplementationDeviation;
this.txtExpertReviewMan.Text = majorPlanApproval.ExpertReviewMan;
-
+ this.txtRemarkCode.Text = majorPlanApproval.RemarkCode.HasValue ? majorPlanApproval.RemarkCode.ToString() : "";
this.rblIsReview.SelectedValue = majorPlanApproval.IsReview.HasValue && majorPlanApproval.IsReview == true ? "true" : "false";
}
else
@@ -90,6 +90,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
return;
}
+ var q = Funs.DB.Comprehensive_MajorPlanApproval.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.MajorPlanApprovalId != this.MajorPlanApprovalId || (this.MajorPlanApprovalId == null && x.MajorPlanApprovalId != null)));
+ if (q != null)
+ {
+ Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
+ return;
+ }
Model.Comprehensive_MajorPlanApproval majorPlanApproval = new Model.Comprehensive_MajorPlanApproval();
majorPlanApproval.ProjectId = this.CurrUser.LoginProjectId;
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
@@ -131,7 +137,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
majorPlanApproval.IsReview = false;
}
-
+ majorPlanApproval.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
if (string.IsNullOrEmpty(this.MajorPlanApprovalId))
{
if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalEdit.aspx.designer.cs
index 800e451c..829af817 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalEdit.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalEdit.aspx.designer.cs
@@ -7,13 +7,11 @@
// 自动生成>
//------------------------------------------------------------------------------
-namespace FineUIPro.Web.CQMS.Comprehensive
-{
-
-
- public partial class MajorPlanApprovalEdit
- {
-
+namespace FineUIPro.Web.CQMS.Comprehensive {
+
+
+ public partial class MajorPlanApprovalEdit {
+
///
/// form1 控件。
///
@@ -22,7 +20,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
-
+
///
/// PageManager1 控件。
///
@@ -31,7 +29,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.PageManager PageManager1;
-
+
///
/// SimpleForm1 控件。
///
@@ -40,7 +38,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Form SimpleForm1;
-
+
///
/// drpUnitId 控件。
///
@@ -49,7 +47,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpUnitId;
-
+
///
/// drpCNProfessionalId 控件。
///
@@ -58,7 +56,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpCNProfessionalId;
-
+
///
/// drpUnitWorkIds 控件。
///
@@ -67,7 +65,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpUnitWorkIds;
-
+
///
/// txtPlanCode 控件。
///
@@ -76,7 +74,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtPlanCode;
-
+
///
/// txtPlanName 控件。
///
@@ -85,7 +83,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtPlanName;
-
+
///
/// txtReviewMan 控件。
///
@@ -94,7 +92,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtReviewMan;
-
+
///
/// txtApprovalDate 控件。
///
@@ -103,7 +101,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DatePicker txtApprovalDate;
-
+
///
/// txtAuditMan 控件。
///
@@ -112,7 +110,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtAuditMan;
-
+
///
/// txtApprovalMan 控件。
///
@@ -121,7 +119,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtApprovalMan;
-
+
///
/// txtExpertReviewMan 控件。
///
@@ -130,7 +128,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtExpertReviewMan;
-
+
///
/// rblIsReview 控件。
///
@@ -139,7 +137,16 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.RadioButtonList rblIsReview;
-
+
+ ///
+ /// txtRemarkCode 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtRemarkCode;
+
///
/// Panel2 控件。
///
@@ -148,7 +155,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Panel Panel2;
-
+
///
/// Label1 控件。
///
@@ -157,7 +164,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Label Label1;
-
+
///
/// btnAttach 控件。
///
@@ -166,7 +173,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnAttach;
-
+
///
/// Toolbar1 控件。
///
@@ -175,7 +182,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Toolbar Toolbar1;
-
+
///
/// hdAttachUrl 控件。
///
@@ -184,7 +191,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.HiddenField hdAttachUrl;
-
+
///
/// btnSave 控件。
///
@@ -193,7 +200,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnSave;
-
+
///
/// WindowAtt 控件。
///
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx
index a6024155..e9c8a125 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx
@@ -15,7 +15,7 @@
@@ -34,6 +34,9 @@
+
+
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx.cs
index 717d0d45..e2034bc8 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx.cs
@@ -3,6 +3,7 @@ using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
+using System.IO;
using System.Linq;
@@ -30,7 +31,7 @@ namespace FineUIPro.Web.Comprehensive
{
string strSql = @"select NCRManagementId, ProjectId, SendUnit, NCRCode, Contents,Problem,Measure,IssuedDate, ReceiveUnit,Status,
ClosedDate, CompleteDate, ResponsibleMan, AttachUrl, ImplementationFrontState,
- CompileMan, UnitWorkId,CN.ProfessionalName,C.CNProfessionalId,u.UnitName
+ CompileMan, UnitWorkId,CN.ProfessionalName,C.CNProfessionalId,u.UnitName,C.RemarkCode
from Comprehensive_NCRManagement C
left join Base_CNProfessional CN on C.CNProfessionalId=CN.CNProfessionalId
left join Base_Unit u on u.UnitId = C.SendUnit
@@ -245,6 +246,35 @@ namespace FineUIPro.Web.Comprehensive
return "";
}
}
+
+ public static string ConvertState(object Status)
+ {
+ if (Status != null)
+ {
+ if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReCompile)
+ {
+ return "重报";
+ }
+ else if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReJect)
+ {
+ return "驳回";
+ }
+ else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Compile)
+ {
+ return "编制";
+ }
+ else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Audit)
+ {
+ return "待审批";
+ }
+ else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Complete)
+ {
+ return "审批完成";
+ }
+ }
+
+ return "编制";
+ }
#endregion
#region 导入
@@ -299,33 +329,186 @@ namespace FineUIPro.Web.Comprehensive
}
#endregion
- public static string ConvertState(object Status)
+ #region 导出按钮
+ /// 导出按钮
+ ///
+ ///
+ ///
+ protected void btnOut_Click(object sender, EventArgs e)
{
- if (Status != null)
- {
- if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReCompile)
- {
- return "重报";
- }
- else if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReJect)
- {
- return "驳回";
- }
- else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Compile)
- {
- return "编制";
- }
- else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Audit)
- {
- return "待审批";
- }
- else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Complete)
- {
- return "审批完成";
- }
- }
+ string rootPath = Server.MapPath("~/");
+ string initTemplatePath = Const.NCRManagementDataInUrl;
+ string uploadfilepath = string.Empty;
+ string newUrl = string.Empty;
+ uploadfilepath = rootPath + initTemplatePath;
- return "编制";
+ var lists = (from x in Funs.DB.Comprehensive_NCRManagement
+ where x.ProjectId == this.CurrUser.LoginProjectId
+ select x);
+ if (sdrpUnitId.SelectedValue != BLL.Const._Null)
+ {
+ lists = lists.Where(x => x.SendUnit == sdrpUnitId.SelectedValue);
+ }
+ if (this.drpProfessionalId.SelectedValue != BLL.Const._Null)
+ {
+ lists = lists.Where(x => x.CNProfessionalId == drpProfessionalId.SelectedValue);
+ }
+ if (!string.IsNullOrEmpty(this.txtNCRCode.Text.Trim()))
+ {
+ lists = lists.Where(x => x.NCRCode.Contains(this.txtNCRCode.Text.Trim()));
+ }
+ lists = lists.OrderBy(x => x.RemarkCode);
+ if (lists != null)
+ {
+ string projectName = BLL.ProjectService.GetShortNameByProjectId(this.CurrUser.LoginProjectId);
+ newUrl = uploadfilepath.Replace("NCR管理导入模板", "NCR管理(" + projectName + DateTime.Now.ToString("yyyyMMdd") + ")");
+ File.Copy(uploadfilepath, newUrl);
+ // 第一步:读取文件流
+ NPOI.SS.UserModel.IWorkbook workbook;
+ using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read))
+ {
+ //workbook = new NPOI.XSSF.UserModel.XSSFWorkbook(stream);
+ workbook = new NPOI.HSSF.UserModel.HSSFWorkbook(stream);
+ }
+ // 创建单元格样式
+ NPOI.SS.UserModel.ICellStyle cellStyle = workbook.CreateCellStyle();
+ cellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
+ cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
+ var font = workbook.CreateFont();
+ font.FontHeightInPoints = 11;
+ cellStyle.SetFont(font);
+ NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
+ cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
+ cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
+ var font0 = workbook.CreateFont();
+ font0.FontHeightInPoints = 12;
+ font0.IsBold = true;
+ cellStyle0.SetFont(font0);
+ // 第二步:创建新数据行
+ NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
+ NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
+ NPOI.SS.UserModel.ICell cell;
+ int i = 2;
+ foreach (var item in lists)
+ {
+ // 第二步:创建新数据行
+ row = sheet.CreateRow(i);
+ // 添加数据
+ cell = row.CreateCell(0);
+ cell.CellStyle = cellStyle;
+ string unitName = string.Empty;
+ if (!string.IsNullOrEmpty(item.SendUnit))
+ {
+ unitName = BLL.UnitService.GetUnitNameByUnitId(item.SendUnit);
+ }
+ cell.SetCellValue(unitName);//发出单位
+
+ cell = row.CreateCell(1);
+ cell.CellStyle = cellStyle;
+ string proName = string.Empty;
+ var cnp = BLL.CNProfessionalService.GetCNProfessional(item.CNProfessionalId);
+ if (cnp != null)
+ {
+ proName = cnp.ProfessionalName;
+ }
+ cell.SetCellValue(proName);//专业
+
+ cell = row.CreateCell(2);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.NCRCode);//NCR单号
+
+ cell = row.CreateCell(3);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.Contents);//主要内容
+
+ cell = row.CreateCell(4);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.IssuedDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.IssuedDate) : "");//下发日期
+
+ cell = row.CreateCell(5);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.Problem);//问题类别
+
+ cell = row.CreateCell(6);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.Measure);//改进措施
+
+ cell = row.CreateCell(7);
+ cell.CellStyle = cellStyle;
+ string unitWorkName = string.Empty;
+ if (!string.IsNullOrEmpty(item.UnitWorkId))
+ {
+ unitWorkName = ConvertUnitWork(item.UnitWorkId);
+ }
+ cell.SetCellValue(unitWorkName);//单位工程
+
+ cell = row.CreateCell(8);
+ cell.CellStyle = cellStyle;
+ string receiveUnitName = string.Empty;
+ if (!string.IsNullOrEmpty(item.ReceiveUnit))
+ {
+ receiveUnitName = ConvertCarryUnit(item.ReceiveUnit);
+ }
+ cell.SetCellValue(receiveUnitName);//接收单位
+
+ cell = row.CreateCell(9);
+ cell.CellStyle = cellStyle;
+ string state = string.Empty;
+ if (!string.IsNullOrEmpty(item.ImplementationFrontState))
+ {
+ state = item.ImplementationFrontState;
+ }
+ cell.SetCellValue(state);//实施状态
+
+ cell = row.CreateCell(10);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.ResponsibleMan);//责任人
+
+ cell = row.CreateCell(11);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.ClosedDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.ClosedDate) : "");//要求封闭日期
+
+ cell = row.CreateCell(12);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.CompleteDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.CompleteDate) : "");//完成日期
+
+ cell = row.CreateCell(13);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.RemarkCode.HasValue ? item.RemarkCode.ToString() : "");//标志编号
+
+ i++;
+ }
+ // 第三步:写入文件流
+ using (FileStream stream = new FileStream(newUrl, FileMode.Create, FileAccess.Write))
+ {
+ workbook.Write(stream);
+ workbook.Close();
+ }
+ string fileName = Path.GetFileName(newUrl);
+ FileInfo info = new FileInfo(newUrl);
+ long fileSize = info.Length;
+ Response.Clear();
+ Response.ContentType = "application/x-zip-compressed";
+ Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
+ Response.AddHeader("Content-Length", fileSize.ToString());
+ Response.TransmitFile(newUrl, 0, fileSize);
+ Response.Flush();
+ Response.Close();
+ File.Delete(newUrl);
+ }
+ else
+ {
+ Alert.ShowInTop("当前无记录,无法导出!", MessageBoxIcon.Warning);
+ }
}
+ #endregion
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx.designer.cs
index dab173ea..4b7b49c1 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx.designer.cs
@@ -7,13 +7,11 @@
// 自动生成>
//------------------------------------------------------------------------------
-namespace FineUIPro.Web.Comprehensive
-{
-
-
- public partial class NCRManagement
- {
-
+namespace FineUIPro.Web.Comprehensive {
+
+
+ public partial class NCRManagement {
+
///
/// form1 控件。
///
@@ -22,7 +20,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
-
+
///
/// PageManager1 控件。
///
@@ -31,7 +29,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.PageManager PageManager1;
-
+
///
/// Panel1 控件。
///
@@ -40,7 +38,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Panel Panel1;
-
+
///
/// Grid1 控件。
///
@@ -49,7 +47,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Grid Grid1;
-
+
///
/// ToolSearch 控件。
///
@@ -58,7 +56,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Toolbar ToolSearch;
-
+
///
/// sdrpUnitId 控件。
///
@@ -67,7 +65,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList sdrpUnitId;
-
+
///
/// drpProfessionalId 控件。
///
@@ -76,7 +74,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpProfessionalId;
-
+
///
/// txtNCRCode 控件。
///
@@ -85,7 +83,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtNCRCode;
-
+
///
/// btnSearch 控件。
///
@@ -94,7 +92,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnSearch;
-
+
///
/// btnNew 控件。
///
@@ -103,7 +101,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnNew;
-
+
///
/// btnImport 控件。
///
@@ -112,7 +110,16 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnImport;
-
+
+ ///
+ /// btnOut 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnOut;
+
///
/// lblPageIndex 控件。
///
@@ -121,7 +128,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.WebControls.Label lblPageIndex;
-
+
///
/// Label2 控件。
///
@@ -130,7 +137,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.WebControls.Label Label2;
-
+
///
/// Label3 控件。
///
@@ -139,7 +146,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.WebControls.Label Label3;
-
+
///
/// txtStatus 控件。
///
@@ -148,7 +155,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.WebControls.Label txtStatus;
-
+
///
/// lbtnFileUrl 控件。
///
@@ -157,7 +164,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.WebControls.LinkButton lbtnFileUrl;
-
+
///
/// ToolbarText1 控件。
///
@@ -166,7 +173,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.ToolbarText ToolbarText1;
-
+
///
/// ddlPageSize 控件。
///
@@ -175,7 +182,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList ddlPageSize;
-
+
///
/// Window1 控件。
///
@@ -184,7 +191,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Window Window1;
-
+
///
/// Window2 控件。
///
@@ -193,7 +200,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Window Window2;
-
+
///
/// WindowAtt 控件。
///
@@ -202,7 +209,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Window WindowAtt;
-
+
///
/// Menu1 控件。
///
@@ -211,7 +218,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Menu Menu1;
-
+
///
/// btnMenuModify 控件。
///
@@ -220,7 +227,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.MenuButton btnMenuModify;
-
+
///
/// btnMenuDel 控件。
///
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementDataIn.aspx.cs
index e82972b2..645fc344 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementDataIn.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementDataIn.aspx.cs
@@ -178,7 +178,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
&& x.SuperUnitWork == null
select x;
- for (int i = 0; i < ir; i++)
+ for (int i = 1; i < ir; i++)
{
string row0 = pds.Rows[i][0].ToString();
if (string.IsNullOrEmpty(row0))
@@ -304,6 +304,17 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
result += (i + 2).ToString() + "," + "标志编号" + "," + "此项为必填项!" + "|";
}
+ else
+ {
+ try
+ {
+ int t = Convert.ToInt32(row13);
+ }
+ catch (Exception)
+ {
+ result += (i + 2).ToString() + "," + "标志编号" + "," + "[" + row13 + "]错误!" + "|";
+ }
+ }
}
if (!string.IsNullOrEmpty(result))
{
@@ -453,13 +464,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive
&& x.SuperUnitWork == null
select x;
- for (int i = 0; i < ir; i++)
+ for (int i = 1; i < ir; i++)
{
Model.Comprehensive_NCRManagement oldViewInfo = new Model.Comprehensive_NCRManagement();
string row0 = pds.Rows[i][0].ToString().Trim();
string row1 = pds.Rows[i][1].ToString().Trim();
var cn = cns.Where(y => y.ProfessionalName == row1).FirstOrDefault();
- oldViewInfo = oldViewInfos.Where(x => x.RemarkCode == pds.Rows[i][13].ToString().Trim()
+ oldViewInfo = oldViewInfos.Where(x => x.RemarkCode ==Funs.GetNewInt( pds.Rows[i][13].ToString().Trim())
).FirstOrDefault();
if (oldViewInfo == null)
{
@@ -495,7 +506,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
des.CompleteDate = Convert.ToDateTime(pds.Rows[i][12].ToString().Trim());
}
- des.RemarkCode = pds.Rows[i][13].ToString().Trim();
+ des.RemarkCode = Funs.GetNewInt(pds.Rows[i][13].ToString().Trim());
des.Status = BLL.Const.Comprehensive_Compile;
des.CompileMan = this.CurrUser.UserId;
BLL.NCRManagementService.AddNCRManagement(des);
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx
index bd1f658c..15914813 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx
@@ -27,12 +27,6 @@
-
-
-
-
-
-
@@ -43,7 +37,13 @@
-
+
+
+
+
+
+
+
@@ -51,8 +51,6 @@
-
-
@@ -64,8 +62,7 @@
-
-
+
@@ -94,12 +91,9 @@
-
+
-
-
-
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs
index f2b305c4..b6763aba 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs
@@ -84,7 +84,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
this.ddlProblem.SelectedValue = nCRManagement.Problem;
}
this.txtMeasure.Text = nCRManagement.Measure;
-
+ this.txtRemarkCode.Text = nCRManagement.RemarkCode.HasValue ? nCRManagement.RemarkCode.ToString() : "";
this.txtResponsibleMan.Text = nCRManagement.ResponsibleMan;
//this.txtImplementationFrontState.Text = nCRManagement.ImplementationFrontState;
@@ -153,6 +153,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
this.drpAudit.Readonly = true;
this.ddlProblem.Readonly = true;
//this.btnAttach.Enabled = false;
+ this.txtRemarkCode.Readonly = true;
}
@@ -199,6 +200,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
return;
}
+
+ var q = Funs.DB.Comprehensive_NCRManagement.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.NCRManagementId != this.NCRManagementId || (this.NCRManagementId == null && x.NCRManagementId != null)));
+ if (q != null)
+ {
+ Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
+ return;
+ }
Model.Comprehensive_NCRManagement nCRManagement = new Model.Comprehensive_NCRManagement();
nCRManagement.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
@@ -264,6 +272,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
unitIds = unitIds.Substring(0, unitIds.LastIndexOf(","));
}
nCRManagement.ReceiveUnit = unitIds;
+ nCRManagement.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
if (string.IsNullOrEmpty(this.NCRManagementId))
{
if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
@@ -318,6 +327,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
return;
}
+ var q = Funs.DB.Comprehensive_NCRManagement.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.NCRManagementId != this.NCRManagementId || (this.NCRManagementId == null && x.NCRManagementId != null)));
+ if (q != null)
+ {
+ Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
+ return;
+ }
Model.Comprehensive_NCRManagement nCRManagement = new Model.Comprehensive_NCRManagement();
nCRManagement.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.designer.cs
index 9d5d8213..90068363 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.designer.cs
@@ -75,15 +75,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
///
protected global::FineUIPro.DatePicker txtIssuedDate;
- ///
- /// txtContents 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.TextArea txtContents;
-
///
/// ddlProblem 控件。
///
@@ -93,6 +84,24 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
///
protected global::FineUIPro.DropDownList ddlProblem;
+ ///
+ /// txtRemarkCode 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtRemarkCode;
+
+ ///
+ /// txtContents 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextArea txtContents;
+
///
/// txtMeasure 控件。
///
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipe.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipe.aspx
index a3559007..40e52253 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipe.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipe.aspx
@@ -16,7 +16,7 @@
@@ -32,6 +32,9 @@
+
+
@@ -96,7 +99,7 @@
+ Width="900px" Height="400px">
+ ///
+ ///
+ protected void btnOut_Click(object sender, EventArgs e)
+ {
+ string rootPath = Server.MapPath("~/");
+ string initTemplatePath = Const.PressurePipeTemplateUrl;
+ string uploadfilepath = string.Empty;
+ string newUrl = string.Empty;
+ uploadfilepath = rootPath + initTemplatePath;
+
+ var lists = (from x in Funs.DB.Comprehensive_PressurePipe
+ where x.Projctid == this.CurrUser.LoginProjectId
+ select x);
+ if (sdrpUnitId.SelectedValue != BLL.Const._Null)
+ {
+ lists = lists.Where(x => x.UnitId == sdrpUnitId.SelectedValue);
+ }
+ lists = lists.OrderBy(x => x.RemarkCode);
+ if (lists != null)
+ {
+ string projectName = BLL.ProjectService.GetShortNameByProjectId(this.CurrUser.LoginProjectId);
+ newUrl = uploadfilepath.Replace("压力管道管理导入模板", "压力管道管理(" + projectName + DateTime.Now.ToString("yyyyMMdd") + ")");
+ File.Copy(uploadfilepath, newUrl);
+ // 第一步:读取文件流
+ NPOI.SS.UserModel.IWorkbook workbook;
+ using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read))
+ {
+ //workbook = new NPOI.XSSF.UserModel.XSSFWorkbook(stream);
+ workbook = new NPOI.HSSF.UserModel.HSSFWorkbook(stream);
+ }
+ // 创建单元格样式
+ NPOI.SS.UserModel.ICellStyle cellStyle = workbook.CreateCellStyle();
+ cellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
+ cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
+ var font = workbook.CreateFont();
+ font.FontHeightInPoints = 11;
+ cellStyle.SetFont(font);
+ NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
+ cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
+ cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
+ var font0 = workbook.CreateFont();
+ font0.FontHeightInPoints = 12;
+ font0.IsBold = true;
+ cellStyle0.SetFont(font0);
+ // 第二步:创建新数据行
+ NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
+ NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
+ NPOI.SS.UserModel.ICell cell;
+ int i = 2;
+ foreach (var item in lists)
+ {
+ // 第二步:创建新数据行
+ row = sheet.CreateRow(i);
+ // 添加数据
+ cell = row.CreateCell(0);
+ cell.CellStyle = cellStyle;
+ string unitName = string.Empty;
+ if (!string.IsNullOrEmpty(item.UnitId))
+ {
+ unitName = BLL.UnitService.GetUnitNameByUnitId(item.UnitId);
+ }
+ cell.SetCellValue(unitName);//所属单位
+
+ cell = row.CreateCell(1);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.EstimateNumber.HasValue ? item.EstimateNumber.ToString() : "");//预计压力管道条数
+
+ cell = row.CreateCell(2);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.ActualNumber.HasValue ? item.ActualNumber.ToString() : "");//实际压力管道条数
+
+ cell = row.CreateCell(3);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.PackageNumber.HasValue ? item.PackageNumber.ToString() : "");//试压包数量
+
+ cell = row.CreateCell(4);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.CompletePackageNumber.HasValue ? item.CompletePackageNumber.ToString() : "");//已完成试压包数量
+
+ cell = row.CreateCell(5);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.PressurePipeNumber.HasValue ? item.PressurePipeNumber.ToString() : "");//已完成试压压力管道条数
+
+ cell = row.CreateCell(6);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.IssuedReportNumber.HasValue ? item.IssuedReportNumber.ToString() : "");//已完成监检报告条数
+
+ cell = row.CreateCell(7);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.ReportTime.HasValue ? string.Format("{0:yyyy-MM-dd}", item.ReportTime) : "");//填报日期
+
+ cell = row.CreateCell(8);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.RemarkCode.HasValue ? item.RemarkCode.ToString() : "");//标志编号
+
+ i++;
+ }
+ // 第三步:写入文件流
+ using (FileStream stream = new FileStream(newUrl, FileMode.Create, FileAccess.Write))
+ {
+ workbook.Write(stream);
+ workbook.Close();
+ }
+ string fileName = Path.GetFileName(newUrl);
+ FileInfo info = new FileInfo(newUrl);
+ long fileSize = info.Length;
+ Response.Clear();
+ Response.ContentType = "application/x-zip-compressed";
+ Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
+ Response.AddHeader("Content-Length", fileSize.ToString());
+ Response.TransmitFile(newUrl, 0, fileSize);
+ Response.Flush();
+ Response.Close();
+ File.Delete(newUrl);
+ }
+ else
+ {
+ Alert.ShowInTop("当前无记录,无法导出!", MessageBoxIcon.Warning);
+ }
+ }
+ #endregion
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipe.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipe.aspx.designer.cs
index 5fe01998..e1a2e135 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipe.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipe.aspx.designer.cs
@@ -93,6 +93,15 @@ namespace FineUIPro.Web.Comprehensive {
///
protected global::FineUIPro.Button btnImport;
+ ///
+ /// btnOut 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnOut;
+
///
/// lblPageIndex 控件。
///
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeDataIn.aspx.cs
index a331059b..c02ad55f 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeDataIn.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeDataIn.aspx.cs
@@ -171,7 +171,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
where y.ProjectId == this.CurrUser.LoginProjectId
select x;
- for (int i = 0; i < ir; i++)
+ for (int i = 1; i < ir; i++)
{
string row0 = pds.Rows[i][0].ToString();
if (string.IsNullOrEmpty(row0))
@@ -283,6 +283,17 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
result += (i + 2).ToString() + "," + "标志编号" + "," + "此项为必填项!" + "|";
}
+ else
+ {
+ try
+ {
+ int t = Convert.ToInt32(row8);
+ }
+ catch (Exception)
+ {
+ result += (i + 2).ToString() + "," + "标志编号" + "," + "[" + row8 + "]错误!" + "|";
+ }
+ }
}
if (!string.IsNullOrEmpty(result))
{
@@ -425,11 +436,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
where y.ProjectId == this.CurrUser.LoginProjectId
select x;
- for (int i = 0; i < ir; i++)
+ for (int i = 1; i < ir; i++)
{
Model.Comprehensive_PressurePipe oldViewInfo = new Model.Comprehensive_PressurePipe();
string row0 = pds.Rows[i][0].ToString().Trim();
- oldViewInfo = oldViewInfos.Where(x => x.RemarkCode == pds.Rows[i][8].ToString().Trim()
+ oldViewInfo = oldViewInfos.Where(x => x.RemarkCode ==Funs.GetNewInt( pds.Rows[i][8].ToString().Trim())
).FirstOrDefault();
if (oldViewInfo == null)
{
@@ -444,7 +455,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
des.PressurePipeNumber = Funs.GetNewInt(pds.Rows[i][5].ToString().Trim());
des.IssuedReportNumber = Funs.GetNewInt(pds.Rows[i][6].ToString().Trim());
des.ReportTime = Funs.GetNewDateTime(pds.Rows[i][7].ToString().Trim());
- des.RemarkCode = pds.Rows[i][8].ToString().Trim();
+ des.RemarkCode = Funs.GetNewInt(pds.Rows[i][8].ToString().Trim());
des.CompileMan = this.CurrUser.UserId;
des.Status = BLL.Const.Comprehensive_Compile;
BLL.PressurePipeService.AddPressurePipe(des);
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeEdit.aspx
index 99ee012a..77f76bed 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeEdit.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeEdit.aspx
@@ -40,10 +40,16 @@
+
+
+
+
+
+
+ LabelAlign="Right" LabelWidth="150px">
@@ -52,13 +58,12 @@
-
-
+
+ LabelAlign="Right" LabelWidth="180px">
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeEdit.aspx.cs
index 29c7c7ae..65d06056 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeEdit.aspx.cs
@@ -63,7 +63,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
this.txtReportTime.Text = string.Format("{0:yyyy-MM-dd}", pressurePipe.ReportTime);
}
-
+ this.txtRemarkCode.Text = pressurePipe.RemarkCode.HasValue ? pressurePipe.RemarkCode.ToString() : "";
var currApprove = PressurePipeApproveService.GetCurrentApprove(pressurePipe.PressurePipeId);
if (currApprove != null)
{
@@ -119,6 +119,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
this.txtPressurePipeNumber.Readonly = true;
this.drpUnit.Readonly = true;
this.txtReportTime.Readonly = true;
+ this.txtRemarkCode.Readonly = true;
this.drpAudit.Readonly = true;
@@ -163,6 +164,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择所属单位!", MessageBoxIcon.Warning);
return;
}
+ var q = Funs.DB.Comprehensive_PressurePipe.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.PressurePipeId != this.PressurePipeId || (this.PressurePipeId == null && x.PressurePipeId != null)));
+ if (q != null)
+ {
+ Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
+ return;
+ }
+
Model.Comprehensive_PressurePipe pressurePipe = new Model.Comprehensive_PressurePipe();
pressurePipe.Projctid = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
@@ -201,7 +209,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
pressurePipe.ReportTime = Convert.ToDateTime(this.txtReportTime.Text);
}
-
+ pressurePipe.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
if (string.IsNullOrEmpty(this.PressurePipeId))
{
if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
@@ -242,6 +250,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择所属单位!", MessageBoxIcon.Warning);
return;
}
+ var q = Funs.DB.Comprehensive_PressurePipe.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.PressurePipeId != this.PressurePipeId || (this.PressurePipeId == null && x.PressurePipeId != null)));
+ if (q != null)
+ {
+ Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
+ return;
+ }
Model.Comprehensive_PressurePipe pressurePipe = new Model.Comprehensive_PressurePipe();
pressurePipe.Projctid = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
@@ -280,6 +294,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
pressurePipe.ReportTime = Convert.ToDateTime(this.txtReportTime.Text);
}
+ pressurePipe.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
if (string.IsNullOrEmpty(this.PressurePipeId))
{
if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeEdit.aspx.designer.cs
index c04b9621..4d4422cf 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeEdit.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeEdit.aspx.designer.cs
@@ -7,13 +7,11 @@
// 自动生成>
//------------------------------------------------------------------------------
-namespace FineUIPro.Web.CQMS.Comprehensive
-{
-
-
- public partial class PressurePipeEdit
- {
-
+namespace FineUIPro.Web.CQMS.Comprehensive {
+
+
+ public partial class PressurePipeEdit {
+
///
/// form1 控件。
///
@@ -22,7 +20,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
-
+
///
/// PageManager1 控件。
///
@@ -31,7 +29,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.PageManager PageManager1;
-
+
///
/// SimpleForm1 控件。
///
@@ -40,7 +38,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Form SimpleForm1;
-
+
///
/// drpUnit 控件。
///
@@ -49,7 +47,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpUnit;
-
+
///
/// txtEstimateNumber 控件。
///
@@ -58,7 +56,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.NumberBox txtEstimateNumber;
-
+
///
/// txtActualNumber 控件。
///
@@ -67,7 +65,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.NumberBox txtActualNumber;
-
+
///
/// txtPackageNumber 控件。
///
@@ -76,7 +74,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.NumberBox txtPackageNumber;
-
+
///
/// txtCompletePackageNumber 控件。
///
@@ -85,7 +83,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.NumberBox txtCompletePackageNumber;
-
+
///
/// txtPressurePipeNumber 控件。
///
@@ -94,7 +92,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.NumberBox txtPressurePipeNumber;
-
+
///
/// txtIssuedReportNumber 控件。
///
@@ -103,7 +101,16 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.NumberBox txtIssuedReportNumber;
-
+
+ ///
+ /// txtRemarkCode 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtRemarkCode;
+
///
/// Panel2 控件。
///
@@ -112,7 +119,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Panel Panel2;
-
+
///
/// Label1 控件。
///
@@ -121,7 +128,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Label Label1;
-
+
///
/// btnAttach 控件。
///
@@ -130,7 +137,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnAttach;
-
+
///
/// drpAudit 控件。
///
@@ -139,7 +146,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpAudit;
-
+
///
/// txtReportTime 控件。
///
@@ -148,7 +155,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DatePicker txtReportTime;
-
+
///
/// agree 控件。
///
@@ -157,7 +164,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.FormRow agree;
-
+
///
/// rblIsAgree 控件。
///
@@ -166,7 +173,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.RadioButtonList rblIsAgree;
-
+
///
/// options 控件。
///
@@ -175,7 +182,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.FormRow options;
-
+
///
/// txtidea 控件。
///
@@ -184,7 +191,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextArea txtidea;
-
+
///
/// Toolbar1 控件。
///
@@ -193,7 +200,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Toolbar Toolbar1;
-
+
///
/// hdAttachUrl 控件。
///
@@ -202,7 +209,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.HiddenField hdAttachUrl;
-
+
///
/// btnSave 控件。
///
@@ -211,7 +218,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnSave;
-
+
///
/// btnSubmit 控件。
///
@@ -220,7 +227,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnSubmit;
-
+
///
/// WindowAtt 控件。
///
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccident.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccident.aspx
index 6d0745cd..7c73a7f9 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccident.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccident.aspx
@@ -15,7 +15,7 @@
@@ -27,6 +27,9 @@
+
+
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccident.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccident.aspx.cs
index 4fd7892f..6cd67ae8 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccident.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccident.aspx.cs
@@ -3,6 +3,7 @@ using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
+using System.IO;
using System.Linq;
namespace FineUIPro.Web.Comprehensive
@@ -31,7 +32,7 @@ namespace FineUIPro.Web.Comprehensive
{
string strSql = @"select QualityAccidentId, time, Place, DirectEconomicLoss, RemedialMeasures,Status,
ResponsibilityDetermination, CorrectiveActions, AttachUrl, CompileMan, CompileDate,
- UnitWorkId,U.UnitName
+ UnitWorkId,U.UnitName,C.RemarkCode
from Comprehensive_QualityAccident C
left join Base_Unit U on C.UnitId=U.UnitId
where C.ProjectId = @ProjectId";
@@ -282,5 +283,139 @@ namespace FineUIPro.Web.Comprehensive
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("QualityAccidentDataIn.aspx", "导入 - ")));
}
#endregion
+
+ #region 导出按钮
+ /// 导出按钮
+ ///
+ ///
+ ///
+ protected void btnOut_Click(object sender, EventArgs e)
+ {
+ string rootPath = Server.MapPath("~/");
+ string initTemplatePath = Const.QualityAccidentTemplateUrl;
+ string uploadfilepath = string.Empty;
+ string newUrl = string.Empty;
+ uploadfilepath = rootPath + initTemplatePath;
+
+ var lists = (from x in Funs.DB.Comprehensive_QualityAccident
+ where x.ProjectId == this.CurrUser.LoginProjectId
+ select x);
+ lists = lists.OrderBy(x => x.RemarkCode);
+ if (lists != null)
+ {
+ string projectName = BLL.ProjectService.GetShortNameByProjectId(this.CurrUser.LoginProjectId);
+ newUrl = uploadfilepath.Replace("质量事故处理记录导入模板", "质量事故处理记录(" + projectName + DateTime.Now.ToString("yyyyMMdd") + ")");
+ File.Copy(uploadfilepath, newUrl);
+ // 第一步:读取文件流
+ NPOI.SS.UserModel.IWorkbook workbook;
+ using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read))
+ {
+ //workbook = new NPOI.XSSF.UserModel.XSSFWorkbook(stream);
+ workbook = new NPOI.HSSF.UserModel.HSSFWorkbook(stream);
+ }
+ // 创建单元格样式
+ NPOI.SS.UserModel.ICellStyle cellStyle = workbook.CreateCellStyle();
+ cellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
+ cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
+ var font = workbook.CreateFont();
+ font.FontHeightInPoints = 11;
+ cellStyle.SetFont(font);
+ NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
+ cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
+ cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
+ var font0 = workbook.CreateFont();
+ font0.FontHeightInPoints = 12;
+ font0.IsBold = true;
+ cellStyle0.SetFont(font0);
+ // 第二步:创建新数据行
+ NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
+ NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
+ NPOI.SS.UserModel.ICell cell;
+ int i = 2;
+ foreach (var item in lists)
+ {
+ // 第二步:创建新数据行
+ row = sheet.CreateRow(i);
+ // 添加数据
+ cell = row.CreateCell(0);
+ cell.CellStyle = cellStyle;
+ string unitName = string.Empty;
+ if (!string.IsNullOrEmpty(item.UnitId))
+ {
+ unitName = BLL.UnitService.GetUnitNameByUnitId(item.UnitId);
+ }
+ cell.SetCellValue(unitName);//责任单位
+
+ cell = row.CreateCell(1);
+ cell.CellStyle = cellStyle;
+ string unitWorkName = string.Empty;
+ if (!string.IsNullOrEmpty(item.UnitWorkId))
+ {
+ unitWorkName = ConvertUnitWork(item.UnitWorkId);
+ }
+ cell.SetCellValue(unitWorkName);//单位工程
+
+ cell = row.CreateCell(2);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.Time.HasValue ? string.Format("{0:yyyy-MM-dd}",item.Time) : "");//时间
+
+ cell = row.CreateCell(3);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.Place);//地点
+
+ cell = row.CreateCell(4);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.DirectEconomicLoss);//直接经济损失(估计)原因及性质
+
+ cell = row.CreateCell(5);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.RemedialMeasures);//采取补救措施
+
+ cell = row.CreateCell(6);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.ResponsibilityDetermination);//事故责任认定
+
+ cell = row.CreateCell(7);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.CorrectiveActions);//最终整改措施
+
+ cell = row.CreateCell(8);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.RemarkCode.HasValue ? item.RemarkCode.ToString() : "");//标志编号
+
+ i++;
+ }
+ // 第三步:写入文件流
+ using (FileStream stream = new FileStream(newUrl, FileMode.Create, FileAccess.Write))
+ {
+ workbook.Write(stream);
+ workbook.Close();
+ }
+ string fileName = Path.GetFileName(newUrl);
+ FileInfo info = new FileInfo(newUrl);
+ long fileSize = info.Length;
+ Response.Clear();
+ Response.ContentType = "application/x-zip-compressed";
+ Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
+ Response.AddHeader("Content-Length", fileSize.ToString());
+ Response.TransmitFile(newUrl, 0, fileSize);
+ Response.Flush();
+ Response.Close();
+ File.Delete(newUrl);
+ }
+ else
+ {
+ Alert.ShowInTop("当前无记录,无法导出!", MessageBoxIcon.Warning);
+ }
+ }
+ #endregion
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccident.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccident.aspx.designer.cs
index fc0f5cbd..ebe584ce 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccident.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccident.aspx.designer.cs
@@ -75,6 +75,15 @@ namespace FineUIPro.Web.Comprehensive {
///
protected global::FineUIPro.Button btnImport;
+ ///
+ /// btnOut 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnOut;
+
///
/// lblPageIndex 控件。
///
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentDataIn.aspx.cs
index 6f1406ba..59f0caad 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentDataIn.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentDataIn.aspx.cs
@@ -176,7 +176,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
&& x.SuperUnitWork == null
select x;
- for (int i = 0; i < ir; i++)
+ for (int i = 1; i < ir; i++)
{
string row0 = pds.Rows[i][0].ToString();
if (string.IsNullOrEmpty(row0))
@@ -224,6 +224,17 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
result += (i + 2).ToString() + "," + "标志编号" + "," + "此项为必填项!" + "|";
}
+ else
+ {
+ try
+ {
+ int t = Convert.ToInt32(row8);
+ }
+ catch (Exception)
+ {
+ result += (i + 2).ToString() + "," + "标志编号" + "," + "[" + row8 + "]错误!" + "|";
+ }
+ }
}
if (!string.IsNullOrEmpty(result))
{
@@ -371,11 +382,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
&& x.SuperUnitWork == null
select x;
- for (int i = 0; i < ir; i++)
+ for (int i = 1; i < ir; i++)
{
Model.Comprehensive_QualityAccident oldViewInfo = new Model.Comprehensive_QualityAccident();
string row0 = pds.Rows[i][0].ToString().Trim();
- oldViewInfo = oldViewInfos.Where(x => x.RemarkCode == pds.Rows[i][8].ToString().Trim()
+ oldViewInfo = oldViewInfos.Where(x => x.RemarkCode ==Funs.GetNewInt(pds.Rows[i][8].ToString().Trim())
).FirstOrDefault();
if (oldViewInfo == null)
{
@@ -393,7 +404,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
des.RemedialMeasures = pds.Rows[i][5].ToString().Trim();
des.ResponsibilityDetermination =pds.Rows[i][6].ToString().Trim();
des.CorrectiveActions = pds.Rows[i][7].ToString().Trim();
- des.RemarkCode = pds.Rows[i][8].ToString().Trim();
+ des.RemarkCode = Funs.GetNewInt(pds.Rows[i][8].ToString().Trim());
des.CompileMan = this.CurrUser.UserId;
des.CompileDate = DateTime.Now;
des.Status = BLL.Const.Comprehensive_Compile;
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentEdit.aspx
index f311f291..b8b6fcfd 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentEdit.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentEdit.aspx
@@ -58,6 +58,7 @@
+
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentEdit.aspx.cs
index 2abfd6c8..7c08b396 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentEdit.aspx.cs
@@ -60,7 +60,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
this.drpUnitWorkId.SelectedValueArray = pressurePipe.UnitWorkId.Split(',');
}
-
+ this.txtRemarkCode.Text = pressurePipe.RemarkCode.HasValue ? pressurePipe.RemarkCode.ToString() : "";
var currApprove = QualityAccidentApproveService.GetCurrentApprove(pressurePipe.QualityAccidentId);
if (currApprove != null)
{
@@ -114,7 +114,8 @@ namespace FineUIPro.Web.CQMS.Comprehensive
this.txtTime.Readonly = true;
this.drpUnit.Readonly = true;
this.drpUnitWorkId.Readonly = true;
- this.drpAudit.Readonly = true;
+ this.drpAudit.Readonly = true;
+ this.txtRemarkCode.Readonly = true;
//this.btnAttach.Enabled = false;
}
@@ -151,6 +152,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
if (drpUnit.SelectedValue != BLL.Const._Null)
{
+ var q = Funs.DB.Comprehensive_QualityAccident.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.QualityAccidentId != this.QualityAccidentId || (this.QualityAccidentId == null && x.QualityAccidentId != null)));
+ if (q != null)
+ {
+ Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
+ return;
+ }
Model.Comprehensive_QualityAccident pressurePipe = new Model.Comprehensive_QualityAccident();
pressurePipe.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
@@ -182,6 +189,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
ids = ids.Substring(0, ids.LastIndexOf(","));
}
pressurePipe.UnitWorkId = ids;
+ pressurePipe.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
if (string.IsNullOrEmpty(this.QualityAccidentId))
{
if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
@@ -224,6 +232,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
if (drpUnit.SelectedValue != BLL.Const._Null)
{
+ var q = Funs.DB.Comprehensive_QualityAccident.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.QualityAccidentId != this.QualityAccidentId || (this.QualityAccidentId == null && x.QualityAccidentId != null)));
+ if (q != null)
+ {
+ Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
+ return;
+ }
Model.Comprehensive_QualityAccident pressurePipe = new Model.Comprehensive_QualityAccident();
pressurePipe.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
@@ -255,6 +269,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
ids = ids.Substring(0, ids.LastIndexOf(","));
}
pressurePipe.UnitWorkId = ids;
+ pressurePipe.RemarkCode =Funs.GetNewInt( this.txtRemarkCode.Text.Trim());
if (string.IsNullOrEmpty(this.QualityAccidentId))
{
if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentEdit.aspx.designer.cs
index ff9a189a..be16d369 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentEdit.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentEdit.aspx.designer.cs
@@ -7,13 +7,11 @@
// 自动生成>
//------------------------------------------------------------------------------
-namespace FineUIPro.Web.CQMS.Comprehensive
-{
-
-
- public partial class QualityAccidentEdit
- {
-
+namespace FineUIPro.Web.CQMS.Comprehensive {
+
+
+ public partial class QualityAccidentEdit {
+
///
/// form1 控件。
///
@@ -22,7 +20,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
-
+
///
/// PageManager1 控件。
///
@@ -31,7 +29,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.PageManager PageManager1;
-
+
///
/// SimpleForm1 控件。
///
@@ -40,7 +38,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Form SimpleForm1;
-
+
///
/// drpUnit 控件。
///
@@ -49,7 +47,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpUnit;
-
+
///
/// drpUnitWorkId 控件。
///
@@ -58,7 +56,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpUnitWorkId;
-
+
///
/// txtTime 控件。
///
@@ -67,7 +65,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DatePicker txtTime;
-
+
///
/// txtPlace 控件。
///
@@ -76,7 +74,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtPlace;
-
+
///
/// txtDirectEconomicLoss 控件。
///
@@ -85,7 +83,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextArea txtDirectEconomicLoss;
-
+
///
/// txtRemedialMeasures 控件。
///
@@ -94,7 +92,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextArea txtRemedialMeasures;
-
+
///
/// txtResponsibilityDetermination 控件。
///
@@ -103,7 +101,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextArea txtResponsibilityDetermination;
-
+
///
/// txtCorrectiveActions 控件。
///
@@ -112,7 +110,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextArea txtCorrectiveActions;
-
+
///
/// Panel2 控件。
///
@@ -121,7 +119,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Panel Panel2;
-
+
///
/// Label1 控件。
///
@@ -130,7 +128,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Label Label1;
-
+
///
/// btnAttach 控件。
///
@@ -139,7 +137,16 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnAttach;
-
+
+ ///
+ /// txtRemarkCode 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtRemarkCode;
+
///
/// drpAudit 控件。
///
@@ -148,7 +155,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpAudit;
-
+
///
/// agree 控件。
///
@@ -157,7 +164,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.FormRow agree;
-
+
///
/// rblIsAgree 控件。
///
@@ -166,7 +173,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.RadioButtonList rblIsAgree;
-
+
///
/// options 控件。
///
@@ -175,7 +182,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.FormRow options;
-
+
///
/// txtidea 控件。
///
@@ -184,7 +191,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextArea txtidea;
-
+
///
/// Toolbar1 控件。
///
@@ -193,7 +200,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Toolbar Toolbar1;
-
+
///
/// ToolbarFill1 控件。
///
@@ -202,7 +209,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.ToolbarFill ToolbarFill1;
-
+
///
/// hdAttachUrl 控件。
///
@@ -211,7 +218,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.HiddenField hdAttachUrl;
-
+
///
/// btnSave 控件。
///
@@ -220,7 +227,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnSave;
-
+
///
/// btnSubmit 控件。
///
@@ -229,7 +236,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnSubmit;
-
+
///
/// WindowAtt 控件。
///
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawings.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawings.aspx
index 47d044d9..26762a84 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawings.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawings.aspx
@@ -15,7 +15,7 @@
@@ -31,6 +31,9 @@
+
+
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawings.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawings.aspx.cs
index e2270f9f..7ea4448c 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawings.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawings.aspx.cs
@@ -3,6 +3,7 @@ using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
+using System.IO;
using System.Linq;
namespace FineUIPro.Web.CQMS.Comprehensive
@@ -325,5 +326,145 @@ namespace FineUIPro.Web.CQMS.Comprehensive
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("ReviewDrawingsDataIn.aspx", "导入 - ")));
}
#endregion
+
+ #region 导出按钮
+ /// 导出按钮
+ ///
+ ///
+ ///
+ protected void btnOut_Click(object sender, EventArgs e)
+ {
+ string rootPath = Server.MapPath("~/");
+ string initTemplatePath = Const.ReviewDrawingsTemplateUrl;
+ string uploadfilepath = string.Empty;
+ string newUrl = string.Empty;
+ uploadfilepath = rootPath + initTemplatePath;
+
+ var lists = (from x in Funs.DB.Comprehensive_ReviewDrawings
+ where x.ProjectId == this.CurrUser.LoginProjectId
+ select x);
+ if (sdrpCNProfessionalId.SelectedValue != BLL.Const._Null)
+ {
+ lists = lists.Where(x => x.CNProfessionalId == sdrpCNProfessionalId.SelectedValue);
+ }
+ if (!string.IsNullOrEmpty(this.txtDraCode.Text.Trim()))
+ {
+ lists = lists.Where(x => x.DraCode.Contains(this.txtDraCode.Text.Trim()));
+ }
+ lists = lists.OrderBy(x => x.RemarkCode);
+ if (lists != null)
+ {
+ string projectName = BLL.ProjectService.GetShortNameByProjectId(this.CurrUser.LoginProjectId);
+ newUrl = uploadfilepath.Replace("图纸会审管理导入模板", "图纸会审管理(" + projectName + DateTime.Now.ToString("yyyyMMdd") + ")");
+ File.Copy(uploadfilepath, newUrl);
+ // 第一步:读取文件流
+ NPOI.SS.UserModel.IWorkbook workbook;
+ using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read))
+ {
+ //workbook = new NPOI.XSSF.UserModel.XSSFWorkbook(stream);
+ workbook = new NPOI.HSSF.UserModel.HSSFWorkbook(stream);
+ }
+ // 创建单元格样式
+ NPOI.SS.UserModel.ICellStyle cellStyle = workbook.CreateCellStyle();
+ cellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
+ cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
+ var font = workbook.CreateFont();
+ font.FontHeightInPoints = 11;
+ cellStyle.SetFont(font);
+ NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
+ cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
+ cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
+ var font0 = workbook.CreateFont();
+ font0.FontHeightInPoints = 12;
+ font0.IsBold = true;
+ cellStyle0.SetFont(font0);
+ // 第二步:创建新数据行
+ NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
+ NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
+ NPOI.SS.UserModel.ICell cell;
+ int i = 2;
+ foreach (var item in lists)
+ {
+ // 第二步:创建新数据行
+ row = sheet.CreateRow(i);
+ // 添加数据
+ cell = row.CreateCell(0);
+ cell.CellStyle = cellStyle;
+ string proName = string.Empty;
+ var cnp = BLL.CNProfessionalService.GetCNProfessional(item.CNProfessionalId);
+ if (cnp != null)
+ {
+ proName = cnp.ProfessionalName;
+ }
+ cell.SetCellValue(proName);//专业
+
+ cell = row.CreateCell(1);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.DraCode);//编号
+
+ cell = row.CreateCell(2);
+ cell.CellStyle = cellStyle;
+ string unitWorkName = string.Empty;
+ if (!string.IsNullOrEmpty(item.UnitWorkId))
+ {
+ unitWorkName = ConvertUnitWork(item.UnitWorkId);
+ }
+ cell.SetCellValue(unitWorkName);//单位工程
+
+ cell = row.CreateCell(3);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.ReviewDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.ReviewDate) : "");//图纸会审日期
+
+ cell = row.CreateCell(4);
+ cell.CellStyle = cellStyle;
+ string unitName = string.Empty;
+ if (!string.IsNullOrEmpty(item.ReceiveUnits))
+ {
+ unitName = ConvertCarryUnit(item.ReceiveUnits);
+ }
+ cell.SetCellValue(unitName);//参加单位
+
+ cell = row.CreateCell(5);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.Remarks);//备注
+
+ cell = row.CreateCell(6);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.RemarkCode.HasValue ? item.RemarkCode.ToString() : "");//标志编号
+
+ i++;
+ }
+ // 第三步:写入文件流
+ using (FileStream stream = new FileStream(newUrl, FileMode.Create, FileAccess.Write))
+ {
+ workbook.Write(stream);
+ workbook.Close();
+ }
+ string fileName = Path.GetFileName(newUrl);
+ FileInfo info = new FileInfo(newUrl);
+ long fileSize = info.Length;
+ Response.Clear();
+ Response.ContentType = "application/x-zip-compressed";
+ Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
+ Response.AddHeader("Content-Length", fileSize.ToString());
+ Response.TransmitFile(newUrl, 0, fileSize);
+ Response.Flush();
+ Response.Close();
+ File.Delete(newUrl);
+ }
+ else
+ {
+ Alert.ShowInTop("当前无记录,无法导出!", MessageBoxIcon.Warning);
+ }
+ }
+ #endregion
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawings.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawings.aspx.designer.cs
index 9aef1198..2cbd88d4 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawings.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawings.aspx.designer.cs
@@ -102,6 +102,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
///
protected global::FineUIPro.Button btnImport;
+ ///
+ /// btnOut 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnOut;
+
///
/// lblPageIndex 控件。
///
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsDataIn.aspx.cs
index 3ff71672..7a8a273c 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsDataIn.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsDataIn.aspx.cs
@@ -178,7 +178,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
&& x.SuperUnitWork == null
select x;
- for (int i = 0; i < ir; i++)
+ for (int i = 1; i < ir; i++)
{
string row0 = pds.Rows[i][0].ToString();
if (string.IsNullOrEmpty(row0))
@@ -250,6 +250,17 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
result += (i + 2).ToString() + "," + "标志编号" + "," + "此项为必填项!" + "|";
}
+ else
+ {
+ try
+ {
+ int t = Convert.ToInt32(row6);
+ }
+ catch (Exception)
+ {
+ result += (i + 2).ToString() + "," + "标志编号" + "," + "[" + row6 + "]错误!" + "|";
+ }
+ }
}
if (!string.IsNullOrEmpty(result))
{
@@ -399,12 +410,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
&& x.SuperUnitWork == null
select x;
- for (int i = 0; i < ir; i++)
+ for (int i = 1; i < ir; i++)
{
Model.Comprehensive_ReviewDrawings oldViewInfo = new Model.Comprehensive_ReviewDrawings();
string row0 = pds.Rows[i][0].ToString().Trim();
var cn = cns.Where(y => y.ProfessionalName == row0).FirstOrDefault();
- oldViewInfo = oldViewInfos.Where(x => x.RemarkCode == pds.Rows[i][6].ToString().Trim()
+ oldViewInfo = oldViewInfos.Where(x => x.RemarkCode == Funs.GetNewInt(pds.Rows[i][6].ToString().Trim())
).FirstOrDefault();
if (oldViewInfo == null)
{
@@ -426,7 +437,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
des.ReceiveUnits = BLL.UnitService.GetUnitIds(pds.Rows[i][4].ToString().Trim());
}
des.Remarks = pds.Rows[i][5].ToString().Trim();
- des.RemarkCode = pds.Rows[i][6].ToString().Trim();
+ des.RemarkCode = Funs.GetNewInt(pds.Rows[i][6].ToString().Trim());
des.CreateMan = this.CurrUser.UserId;
des.CreateDate = DateTime.Now;
des.Status = BLL.Const.Comprehensive_Compile;
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsEdit.aspx
index ae1e621e..4b112c3e 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsEdit.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsEdit.aspx
@@ -30,7 +30,7 @@
-
+
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsEdit.aspx.cs
index 41d86e4b..f63213ef 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsEdit.aspx.cs
@@ -67,7 +67,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
this.drpUnitIds.SelectedValueArray = model.ReceiveUnits.Split(',');
}
this.txtRemarks.Text = model.Remarks;
-
+ this.txtRemarkCode.Text = model.RemarkCode.HasValue ? model.RemarkCode.ToString() : "";
var currApprove = DesignDrawingsApproveService.GetCurrentApprove(model.Id);
if (currApprove != null)
@@ -122,6 +122,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
this.txtRemarks.Readonly = true;
this.txtReviewDate.Readonly = true;
this.drpAudit.Readonly = true;
+ this.txtRemarkCode.Readonly = true;
//this.btnAttach.Enabled = false;
}
@@ -206,13 +207,17 @@ namespace FineUIPro.Web.CQMS.Comprehensive
///
protected void btnSave_Click(object sender, EventArgs e)
{
-
if (drpCNProfessionalId.SelectedValue == BLL.Const._Null)
{
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
return;
}
-
+ var q = Funs.DB.Comprehensive_ReviewDrawings.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.Id != this.Id || (this.Id == null && x.Id != null)));
+ if (q != null)
+ {
+ Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
+ return;
+ }
var designDrawings = new Model.Comprehensive_ReviewDrawings();
designDrawings.ProjectId = this.CurrUser.LoginProjectId;
designDrawings.CNProfessionalId = this.drpCNProfessionalId.SelectedValue;
@@ -248,6 +253,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
unitIds = unitIds.Substring(0, unitIds.LastIndexOf(","));
}
designDrawings.ReceiveUnits = unitIds;
+ designDrawings.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
if (!string.IsNullOrEmpty(this.Id))
{
designDrawings.Id = this.Id;
@@ -287,6 +293,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
return;
}
+ var q = Funs.DB.Comprehensive_ReviewDrawings.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.Id != this.Id || (this.Id == null && x.Id != null)));
+ if (q != null)
+ {
+ Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
+ return;
+ }
var designDrawings = new Model.Comprehensive_ReviewDrawings();
designDrawings.ProjectId = this.CurrUser.LoginProjectId;
designDrawings.CNProfessionalId = this.drpCNProfessionalId.SelectedValue;
@@ -322,6 +334,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
unitIds = unitIds.Substring(0, unitIds.LastIndexOf(","));
}
designDrawings.ReceiveUnits = unitIds;
+ designDrawings.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
if (!string.IsNullOrEmpty(this.Id))
{
designDrawings.Id = this.Id;
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsEdit.aspx.designer.cs
index 63a5870b..92c09c70 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsEdit.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsEdit.aspx.designer.cs
@@ -7,13 +7,11 @@
// 自动生成>
//------------------------------------------------------------------------------
-namespace FineUIPro.Web.CQMS.Comprehensive
-{
-
-
- public partial class ReviewDrawingsEdit
- {
-
+namespace FineUIPro.Web.CQMS.Comprehensive {
+
+
+ public partial class ReviewDrawingsEdit {
+
///
/// form1 控件。
///
@@ -22,7 +20,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
-
+
///
/// PageManager1 控件。
///
@@ -31,7 +29,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.PageManager PageManager1;
-
+
///
/// SimpleForm1 控件。
///
@@ -40,7 +38,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Form SimpleForm1;
-
+
///
/// drpCNProfessionalId 控件。
///
@@ -49,7 +47,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpCNProfessionalId;
-
+
///
/// drpUnitWorkIds 控件。
///
@@ -58,7 +56,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpUnitWorkIds;
-
+
///
/// txtDraCode 控件。
///
@@ -67,7 +65,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtDraCode;
-
+
///
/// txtReviewDate 控件。
///
@@ -76,7 +74,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DatePicker txtReviewDate;
-
+
///
/// drpUnitIds 控件。
///
@@ -85,7 +83,16 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpUnitIds;
-
+
+ ///
+ /// txtRemarkCode 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtRemarkCode;
+
///
/// txtRemarks 控件。
///
@@ -94,7 +101,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextArea txtRemarks;
-
+
///
/// Panel2 控件。
///
@@ -103,7 +110,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Panel Panel2;
-
+
///
/// Label1 控件。
///
@@ -112,7 +119,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Label Label1;
-
+
///
/// btnAttach 控件。
///
@@ -121,7 +128,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnAttach;
-
+
///
/// drpAudit 控件。
///
@@ -130,7 +137,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpAudit;
-
+
///
/// agree 控件。
///
@@ -139,7 +146,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.FormRow agree;
-
+
///
/// rblIsAgree 控件。
///
@@ -148,7 +155,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.RadioButtonList rblIsAgree;
-
+
///
/// options 控件。
///
@@ -157,7 +164,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.FormRow options;
-
+
///
/// txtidea 控件。
///
@@ -166,7 +173,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextArea txtidea;
-
+
///
/// Toolbar1 控件。
///
@@ -175,7 +182,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Toolbar Toolbar1;
-
+
///
/// hdAttachUrl 控件。
///
@@ -184,7 +191,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.HiddenField hdAttachUrl;
-
+
///
/// btnSave 控件。
///
@@ -193,7 +200,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnSave;
-
+
///
/// btnSubmit 控件。
///
@@ -202,7 +209,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnSubmit;
-
+
///
/// WindowAtt 控件。
///
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagement.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagement.aspx
index be81e641..045cfaf7 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagement.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagement.aspx
@@ -15,7 +15,7 @@
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagement.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagement.aspx.cs
index 836026be..ac6399c2 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagement.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagement.aspx.cs
@@ -33,7 +33,7 @@ namespace FineUIPro.Web.Comprehensive
{
string strSql = @"select VisaId,VisaCode, VisaReson, VisaDate, Status,
EstimatedCost, Confirmation, ConstructionManager, ControlManager, ProcessingState,
- AccountingExpenses,VisaContent, Remark, U.UnitName,CN.ProfessionalName ,SignMan,AuditMan,unitWork.UnitWorkName
+ AccountingExpenses,VisaContent, Remark, U.UnitName,CN.ProfessionalName ,SignMan,AuditMan,unitWork.UnitWorkName,C.RemarkCode
from Comprehensive_SiteVisaManagement C
left join Base_Unit U on C.UnitId=U.UnitId
left join Base_CNProfessional CN on C.CNProfessionalId=CN.CNProfessionalId
@@ -310,7 +310,7 @@ namespace FineUIPro.Web.Comprehensive
lists = lists.OrderBy(x => x.RemarkCode);
if (lists != null)
{
- string projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
+ string projectName = BLL.ProjectService.GetShortNameByProjectId(this.CurrUser.LoginProjectId);
newUrl = uploadfilepath.Replace("现场签证管理导入模板", "现场签证管理(" + projectName + DateTime.Now.ToString("yyyyMMdd") + ")");
File.Copy(uploadfilepath, newUrl);
// 第一步:读取文件流
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipment.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipment.aspx
index 4047a127..409872a4 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipment.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipment.aspx
@@ -16,7 +16,7 @@
@@ -34,6 +34,9 @@
+
+
@@ -98,7 +101,7 @@
+ Width="800px" Height="400px">
+ ///
+ ///
+ protected void btnOut_Click(object sender, EventArgs e)
+ {
+ string rootPath = Server.MapPath("~/");
+ string initTemplatePath = Const.SpecialEquipmentTemplateUrl;
+ string uploadfilepath = string.Empty;
+ string newUrl = string.Empty;
+ uploadfilepath = rootPath + initTemplatePath;
+
+ var lists = (from x in Funs.DB.Comprehensive_SpecialEquipment
+ where x.ProjectId == this.CurrUser.LoginProjectId
+ select x);
+ if (sdrpUnitId.SelectedValue != BLL.Const._Null)
+ {
+ lists = lists.Where(x => x.UnitId == sdrpUnitId.SelectedValue);
+ }
+ if (drpEquipmentId.SelectedValue != BLL.Const._Null)
+ {
+ lists = lists.Where(x => x.EquipmentId == drpEquipmentId.SelectedValue);
+ }
+ lists = lists.OrderBy(x => x.RemarkCode);
+ if (lists != null)
+ {
+ string projectName = BLL.ProjectService.GetShortNameByProjectId(this.CurrUser.LoginProjectId);
+ newUrl = uploadfilepath.Replace("特种设备管理导入模板", "特种设备管理(" + projectName + DateTime.Now.ToString("yyyyMMdd") + ")");
+ File.Copy(uploadfilepath, newUrl);
+ // 第一步:读取文件流
+ NPOI.SS.UserModel.IWorkbook workbook;
+ using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read))
+ {
+ //workbook = new NPOI.XSSF.UserModel.XSSFWorkbook(stream);
+ workbook = new NPOI.HSSF.UserModel.HSSFWorkbook(stream);
+ }
+ // 创建单元格样式
+ NPOI.SS.UserModel.ICellStyle cellStyle = workbook.CreateCellStyle();
+ cellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
+ cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
+ var font = workbook.CreateFont();
+ font.FontHeightInPoints = 11;
+ cellStyle.SetFont(font);
+ NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
+ cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
+ cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
+ var font0 = workbook.CreateFont();
+ font0.FontHeightInPoints = 12;
+ font0.IsBold = true;
+ cellStyle0.SetFont(font0);
+ // 第二步:创建新数据行
+ NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
+ NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
+ NPOI.SS.UserModel.ICell cell;
+ int i = 2;
+ foreach (var item in lists)
+ {
+ // 第二步:创建新数据行
+ row = sheet.CreateRow(i);
+ // 添加数据
+ cell = row.CreateCell(0);
+ cell.CellStyle = cellStyle;
+ string unitName = string.Empty;
+ if (!string.IsNullOrEmpty(item.UnitId))
+ {
+ unitName = BLL.UnitService.GetUnitNameByUnitId(item.UnitId);
+ }
+ cell.SetCellValue(unitName);//所属单位
+
+ cell = row.CreateCell(1);
+ cell.CellStyle = cellStyle;
+ string specialEquipmentName = string.Empty;
+ if (!string.IsNullOrEmpty(item.EquipmentId))
+ {
+ var specialEquipment = BLL.SpecialEquipmentService.GetSpecialEquipmentById(item.EquipmentId);
+ if (specialEquipment!=null)
+ {
+ specialEquipmentName = specialEquipment.SpecialEquipmentName;
+ }
+ }
+ cell.SetCellValue(specialEquipmentName);//设备名称
+
+ cell = row.CreateCell(2);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.SunNumber.HasValue ? item.SunNumber.ToString() : "");//总数量
+
+ cell = row.CreateCell(3);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.InformNumber.HasValue ? item.InformNumber.ToString() : "");//告知数量
+
+ cell = row.CreateCell(4);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.SubmitDataNumber.HasValue ? item.SubmitDataNumber.ToString() : "");//提交资料数量
+
+ cell = row.CreateCell(5);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.MonitoringReportNumber.HasValue ? item.MonitoringReportNumber.ToString() : "");//监检报告数量
+
+ cell = row.CreateCell(6);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.PositionNum);//位号
+
+ cell = row.CreateCell(7);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.ReportTime.HasValue ? string.Format("{0:yyyy-MM-dd}", item.ReportTime) : "");//填报日期
+
+ cell = row.CreateCell(8);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.RemarkCode.HasValue ? item.RemarkCode.ToString() : "");//标志编号
+
+ i++;
+ }
+ // 第三步:写入文件流
+ using (FileStream stream = new FileStream(newUrl, FileMode.Create, FileAccess.Write))
+ {
+ workbook.Write(stream);
+ workbook.Close();
+ }
+ string fileName = Path.GetFileName(newUrl);
+ FileInfo info = new FileInfo(newUrl);
+ long fileSize = info.Length;
+ Response.Clear();
+ Response.ContentType = "application/x-zip-compressed";
+ Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
+ Response.AddHeader("Content-Length", fileSize.ToString());
+ Response.TransmitFile(newUrl, 0, fileSize);
+ Response.Flush();
+ Response.Close();
+ File.Delete(newUrl);
+ }
+ else
+ {
+ Alert.ShowInTop("当前无记录,无法导出!", MessageBoxIcon.Warning);
+ }
+ }
+ #endregion
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipment.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipment.aspx.designer.cs
index 29610405..ddafe64d 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipment.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipment.aspx.designer.cs
@@ -102,6 +102,15 @@ namespace FineUIPro.Web.Comprehensive {
///
protected global::FineUIPro.Button btnImport;
+ ///
+ /// btnOut 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnOut;
+
///
/// lblPageIndex 控件。
///
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentDataIn.aspx.cs
index de168e7a..342928ab 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentDataIn.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentDataIn.aspx.cs
@@ -175,7 +175,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
where x.IsSpecial == true
select x;
- for (int i = 0; i < ir; i++)
+ for (int i = 1; i < ir; i++)
{
string row0 = pds.Rows[i][0].ToString();
if (string.IsNullOrEmpty(row0))
@@ -275,6 +275,17 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
result += (i + 2).ToString() + "," + "标志编号" + "," + "此项为必填项!" + "|";
}
+ else
+ {
+ try
+ {
+ int t = Convert.ToInt32(row8);
+ }
+ catch (Exception)
+ {
+ result += (i + 2).ToString() + "," + "标志编号" + "," + "[" + row8 + "]错误!" + "|";
+ }
+ }
}
if (!string.IsNullOrEmpty(result))
{
@@ -421,12 +432,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
where x.IsSpecial == true
select x;
- for (int i = 0; i < ir; i++)
+ for (int i = 1; i < ir; i++)
{
Model.Comprehensive_SpecialEquipment oldViewInfo = new Model.Comprehensive_SpecialEquipment();
string row0 = pds.Rows[i][0].ToString().Trim();
string row1 = pds.Rows[i][1].ToString().Trim();
- oldViewInfo = oldViewInfos.Where(x => x.RemarkCode == pds.Rows[i][8].ToString().Trim()
+ oldViewInfo = oldViewInfos.Where(x => x.RemarkCode == Funs.GetNewInt(pds.Rows[i][8].ToString().Trim())
).FirstOrDefault();
if (oldViewInfo == null)
{
@@ -441,7 +452,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
des.MonitoringReportNumber = Funs.GetNewInt(pds.Rows[i][5].ToString().Trim());
des.PositionNum = pds.Rows[i][6].ToString().Trim();
des.ReportTime = Funs.GetNewDateTime(pds.Rows[i][7].ToString().Trim());
- des.RemarkCode = pds.Rows[i][8].ToString().Trim();
+ des.RemarkCode = Funs.GetNewInt(pds.Rows[i][8].ToString().Trim());
des.CompileMan = this.CurrUser.UserId;
des.Status = BLL.Const.Comprehensive_Compile;
BLL.SpecialEquipmentServices.AddEquipment(des);
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentEdit.aspx
index 318daf38..74db58c7 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentEdit.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentEdit.aspx
@@ -33,7 +33,12 @@
-
+
+
+
+
+
+
x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.SpecialEquipmentId != this.SpecialEquipmentId || (this.SpecialEquipmentId == null && x.SpecialEquipmentId != null)));
+ if (q != null)
+ {
+ Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
+ return;
+ }
Model.Comprehensive_SpecialEquipment specialEquipment = new Model.Comprehensive_SpecialEquipment();
specialEquipment.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
@@ -202,7 +210,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
specialEquipment.ReportTime = Convert.ToDateTime(this.txtReportTime.Text);
}
specialEquipment.PositionNum = this.txtPositionNum.Text.Trim();
-
+ specialEquipment.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
if (string.IsNullOrEmpty(this.SpecialEquipmentId))
{
if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
@@ -242,6 +250,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择所属单位!", MessageBoxIcon.Warning);
return;
}
+ var q = Funs.DB.Comprehensive_SpecialEquipment.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.SpecialEquipmentId != this.SpecialEquipmentId || (this.SpecialEquipmentId == null && x.SpecialEquipmentId != null)));
+ if (q != null)
+ {
+ Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
+ return;
+ }
Model.Comprehensive_SpecialEquipment specialEquipment = new Model.Comprehensive_SpecialEquipment();
specialEquipment.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
@@ -277,6 +291,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
specialEquipment.ReportTime = Convert.ToDateTime(this.txtReportTime.Text);
}
specialEquipment.PositionNum = this.txtPositionNum.Text.Trim();
+ specialEquipment.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
if (string.IsNullOrEmpty(this.SpecialEquipmentId))
{
if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentEdit.aspx.designer.cs
index 511ab4a8..fbaea3d8 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentEdit.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentEdit.aspx.designer.cs
@@ -102,6 +102,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
///
protected global::FineUIPro.TextBox txtPositionNum;
+ ///
+ /// txtRemarkCode 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtRemarkCode;
+
///
/// Panel2 控件。
///
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecords.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecords.aspx
index a56facd0..fc76935c 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecords.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecords.aspx
@@ -15,7 +15,7 @@
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecords.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecords.aspx.cs
index c5f50b58..173e9d12 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecords.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecords.aspx.cs
@@ -43,7 +43,8 @@ namespace FineUIPro.Web.CQMS.Comprehensive
C.Hours,
C.KeynoteSpeaker,
C.Remark,
- CN.ProfessionalName"
+ CN.ProfessionalName,
+ C.RemarkCode"
+ @" FROM Comprehensive_TrainingRecords C "
+ @" LEFT JOIN Base_CNProfessional CN ON C.CNProfessionalId=CN.CNProfessionalId"
+ @" WHERE C.ProjectId = @ProjectId";
@@ -231,7 +232,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
lists = lists.OrderBy(x => x.RemarkCode);
if (lists != null)
{
- string projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
+ string projectName = BLL.ProjectService.GetShortNameByProjectId(this.CurrUser.LoginProjectId);
newUrl = uploadfilepath.Replace("培训记录导入模板", "培训记录(" + projectName + DateTime.Now.ToString("yyyyMMdd") + ")");
File.Copy(uploadfilepath, newUrl);
// 第一步:读取文件流
diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt
index cf907db2..bdfcd93c 100644
--- a/SGGL/FineUIPro.Web/ErrLog.txt
+++ b/SGGL/FineUIPro.Web/ErrLog.txt
@@ -85,3 +85,193 @@ IP地址:::1
出错时间:04/29/2024 23:41:10
+
+错误信息开始=====>
+错误类型:IOException
+错误信息:文件“E:\五环\SGGL_CWCEC\SGGL\FineUIPro.Web\File\Excel\DataIn\设计交底管理导入模板.xls”已经存在。
+错误堆栈:
+ 在 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
+ 在 System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
+ 在 System.IO.File.Copy(String sourceFileName, String destFileName)
+ 在 FineUIPro.Web.Comprehensive.DesignDetails.btnOut_Click(Object sender, EventArgs e) 位置 E:\五环\SGGL_CWCEC\SGGL\FineUIPro.Web\CQMS\Comprehensive\DesignDetails.aspx.cs:行号 342
+ 在 FineUIPro.Button.OnClick(EventArgs e)
+ 在 (Button , EventArgs )
+ 在 FineUIPro.Button.RaisePostBackEvent(String eventArgument)
+ 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
+ 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
+ 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+出错时间:04/30/2024 10:12:33
+出错文件:http://localhost:8579/CQMS/Comprehensive/DesignDetails.aspx
+IP地址:::1
+操作人员:JT
+
+出错时间:04/30/2024 10:12:33
+
+
+错误信息开始=====>
+错误类型:DirectoryNotFoundException
+错误信息:未能找到路径“E:\五环\SGGL_CWCEC\SGGL\FineUIPro.Web\File\Excel\DataIn\设备材料报验(史丹利新能源材料前驱体磷酸铁项目及配套工程30万吨/年湿法磷酸装置及氨站20240430).xls”的一部分。
+错误堆栈:
+ 在 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
+ 在 System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
+ 在 System.IO.File.Copy(String sourceFileName, String destFileName)
+ 在 FineUIPro.Web.Comprehensive.InspectionEquipment.btnOut_Click(Object sender, EventArgs e) 位置 E:\五环\SGGL_CWCEC\SGGL\FineUIPro.Web\CQMS\Comprehensive\InspectionEquipment.aspx.cs:行号 314
+ 在 FineUIPro.Button.OnClick(EventArgs e)
+ 在 (Button , EventArgs )
+ 在 FineUIPro.Button.RaisePostBackEvent(String eventArgument)
+ 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
+ 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
+ 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+出错时间:04/30/2024 15:20:59
+出错文件:http://localhost:8579/CQMS/Comprehensive/InspectionEquipment.aspx
+IP地址:::1
+操作人员:JT
+
+出错时间:04/30/2024 15:20:59
+
+
+错误信息开始=====>
+错误类型:ArgumentException
+错误信息:提供的 URI 方案“http”无效,应为“https”。
+参数名: via
+错误堆栈:
+ 在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
+ 在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
+ 在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
+ 在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
+ 在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
+ 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
+ 在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.ChannelFactory`1.CreateChannel()
+ 在 System.ServiceModel.ClientBase`1.CreateChannel()
+ 在 System.ServiceModel.ClientBase`1.CreateChannelInternal()
+ 在 System.ServiceModel.ClientBase`1.get_Channel()
+ 在 BLL.CNCECHSSEService.HSSEServiceClient.GetSupervise_SubUnitReportListToSUB() 位置 E:\五环\SGGL_CWCEC\SGGL\BLL\Service References\CNCECHSSEService\Reference.cs:行号 14204
+ 在 BLL.CNCECHSSEWebService.getSupervise_SubUnitReport() 位置 E:\五环\SGGL_CWCEC\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 2181
+出错时间:04/30/2024 19:18:03
+出错时间:04/30/2024 19:18:03
+
+
+错误信息开始=====>
+错误类型:ArgumentException
+错误信息:提供的 URI 方案“http”无效,应为“https”。
+参数名: via
+错误堆栈:
+ 在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
+ 在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
+ 在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
+ 在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
+ 在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
+ 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
+ 在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.ChannelFactory`1.CreateChannel()
+ 在 System.ServiceModel.ClientBase`1.CreateChannel()
+ 在 System.ServiceModel.ClientBase`1.CreateChannelInternal()
+ 在 System.ServiceModel.ClientBase`1.get_Channel()
+ 在 BLL.CNCECHSSEService.HSSEServiceClient.GetCheck_CheckInfo_Table8ItemListToSUB(String unitId) 位置 E:\五环\SGGL_CWCEC\SGGL\BLL\Service References\CNCECHSSEService\Reference.cs:行号 14228
+ 在 BLL.CNCECHSSEWebService.getCheck_CheckInfo_Table8Item() 位置 E:\五环\SGGL_CWCEC\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 2046
+出错时间:04/30/2024 19:18:03
+出错时间:04/30/2024 19:18:03
+
+
+错误信息开始=====>
+错误类型:ArgumentException
+错误信息:提供的 URI 方案“http”无效,应为“https”。
+参数名: via
+错误堆栈:
+ 在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
+ 在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
+ 在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
+ 在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
+ 在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
+ 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
+ 在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.ChannelFactory`1.CreateChannel()
+ 在 System.ServiceModel.ClientBase`1.CreateChannel()
+ 在 System.ServiceModel.ClientBase`1.CreateChannelInternal()
+ 在 System.ServiceModel.ClientBase`1.get_Channel()
+ 在 BLL.CNCECHSSEService.HSSEServiceClient.GetCheck_CheckRectifyListToSUB(String unitId) 位置 E:\五环\SGGL_CWCEC\SGGL\BLL\Service References\CNCECHSSEService\Reference.cs:行号 14220
+ 在 BLL.CNCECHSSEWebService.getCheck_CheckRectify() 位置 E:\五环\SGGL_CWCEC\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 1942
+出错时间:04/30/2024 19:18:03
+出错时间:04/30/2024 19:18:03
+
+
+错误信息开始=====>
+错误类型:ArgumentException
+错误信息:提供的 URI 方案“http”无效,应为“https”。
+参数名: via
+错误堆栈:
+ 在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
+ 在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
+ 在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
+ 在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
+ 在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
+ 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
+ 在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.ChannelFactory`1.CreateChannel()
+ 在 System.ServiceModel.ClientBase`1.CreateChannel()
+ 在 System.ServiceModel.ClientBase`1.CreateChannelInternal()
+ 在 System.ServiceModel.ClientBase`1.get_Channel()
+ 在 BLL.CNCECHSSEService.HSSEServiceClient.GetInformation_UrgeReportToSUB(String unitId) 位置 E:\五环\SGGL_CWCEC\SGGL\BLL\Service References\CNCECHSSEService\Reference.cs:行号 14020
+ 在 BLL.CNCECHSSEWebService.getInformation_UrgeReport() 位置 E:\五环\SGGL_CWCEC\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 1884
+出错时间:04/30/2024 19:18:03
+出错时间:04/30/2024 19:18:03
+
+
+错误信息开始=====>
+错误类型:HttpCompileException
+错误信息:e:\五环\SGGL_CWCEC\SGGL\FineUIPro.Web\CQMS\Comprehensive\DesignDrawings.aspx(38): error CS1061: “ASP.cqms_comprehensive_designdrawings_aspx”不包含“btnOut_Click”的定义,并且找不到可接受类型为“ASP.cqms_comprehensive_designdrawings_aspx”的第一个参数的扩展方法“btnOut_Click”(是否缺少 using 指令或程序集引用?)
+错误堆栈:
+ 在 System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
+ 在 System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
+ 在 System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
+ 在 System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound)
+ 在 System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp)
+ 在 System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
+ 在 System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String virtualPath, String path)
+ 在 System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
+ 在 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
+ 在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
+出错时间:04/30/2024 22:19:41
+出错文件:http://localhost:8579/CQMS/Comprehensive/DesignDrawings.aspx
+IP地址:::1
+
+出错时间:04/30/2024 22:19:41
+
+
+错误信息开始=====>
+错误类型:HttpCompileException
+错误信息:e:\五环\SGGL_CWCEC\SGGL\FineUIPro.Web\CQMS\Comprehensive\ReviewDrawings.aspx(34): error CS1061: “ASP.cqms_comprehensive_reviewdrawings_aspx”不包含“btnOut_Click”的定义,并且找不到可接受类型为“ASP.cqms_comprehensive_reviewdrawings_aspx”的第一个参数的扩展方法“btnOut_Click”(是否缺少 using 指令或程序集引用?)
+错误堆栈:
+ 在 System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
+ 在 System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
+ 在 System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
+ 在 System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound)
+ 在 System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp)
+ 在 System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
+ 在 System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String virtualPath, String path)
+ 在 System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
+ 在 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
+ 在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
+出错时间:04/30/2024 22:58:46
+出错文件:http://localhost:8579/CQMS/Comprehensive/ReviewDrawings.aspx
+IP地址:::1
+
+出错时间:04/30/2024 22:58:46
+
diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/NCR管理导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/NCR管理导入模板.xls
index 3e1ec992..0ffdc028 100644
Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/NCR管理导入模板.xls and b/SGGL/FineUIPro.Web/File/Excel/DataIn/NCR管理导入模板.xls differ
diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/压力管道管理导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/压力管道管理导入模板.xls
index 7ac810b6..b1be9473 100644
Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/压力管道管理导入模板.xls and b/SGGL/FineUIPro.Web/File/Excel/DataIn/压力管道管理导入模板.xls differ
diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/图纸会审记录导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/图纸会审管理导入模板.xls
similarity index 77%
rename from SGGL/FineUIPro.Web/File/Excel/DataIn/图纸会审记录导入模板.xls
rename to SGGL/FineUIPro.Web/File/Excel/DataIn/图纸会审管理导入模板.xls
index 8f0c6317..d334e6a1 100644
Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/图纸会审记录导入模板.xls and b/SGGL/FineUIPro.Web/File/Excel/DataIn/图纸会审管理导入模板.xls differ
diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/图纸收发记录导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/图纸收发记录导入模板.xls
index c2cbc441..ed68a7f4 100644
Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/图纸收发记录导入模板.xls and b/SGGL/FineUIPro.Web/File/Excel/DataIn/图纸收发记录导入模板.xls differ
diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/施工组织设计及施工方案导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/施工组织设计及施工方案导入模板.xls
index 0b5b85ae..ccaaf57b 100644
Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/施工组织设计及施工方案导入模板.xls and b/SGGL/FineUIPro.Web/File/Excel/DataIn/施工组织设计及施工方案导入模板.xls differ
diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/检验试验计划导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/检验试验计划导入模板.xls
index 30acee98..8a07d365 100644
Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/检验试验计划导入模板.xls and b/SGGL/FineUIPro.Web/File/Excel/DataIn/检验试验计划导入模板.xls differ
diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/特种设备管理导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/特种设备管理导入模板.xls
index 179fb419..01740204 100644
Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/特种设备管理导入模板.xls and b/SGGL/FineUIPro.Web/File/Excel/DataIn/特种设备管理导入模板.xls differ
diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/设计交底导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/设计交底导入模板.xls
deleted file mode 100644
index 917d4797..00000000
Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/设计交底导入模板.xls and /dev/null differ
diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/设计交底管理导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/设计交底管理导入模板.xls
new file mode 100644
index 00000000..fed59a1f
Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataIn/设计交底管理导入模板.xls differ
diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/质量事故处理记录导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/质量事故处理记录导入模板.xls
index b9fbd11e..1e09b690 100644
Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/质量事故处理记录导入模板.xls and b/SGGL/FineUIPro.Web/File/Excel/DataIn/质量事故处理记录导入模板.xls differ
diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/超过一定规模的危大施工方案导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/超过一定规模的危大施工方案导入模板.xls
index 748c5e91..8ca36be6 100644
Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/超过一定规模的危大施工方案导入模板.xls and b/SGGL/FineUIPro.Web/File/Excel/DataIn/超过一定规模的危大施工方案导入模板.xls differ
diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs
index c0862b9e..f4096709 100644
--- a/SGGL/Model/Model.cs
+++ b/SGGL/Model/Model.cs
@@ -91448,7 +91448,7 @@ namespace Model
private string _AuditMan;
- private string _RemarCode;
+ private System.Nullable _RemarCode;
private EntityRef _Base_Project;
@@ -91486,7 +91486,7 @@ namespace Model
partial void OnStatusChanged();
partial void OnAuditManChanging(string value);
partial void OnAuditManChanged();
- partial void OnRemarCodeChanging(string value);
+ partial void OnRemarCodeChanging(System.Nullable value);
partial void OnRemarCodeChanged();
#endregion
@@ -91785,8 +91785,8 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarCode", DbType="NVarChar(50)")]
- public string RemarCode
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarCode", DbType="Int")]
+ public System.Nullable RemarCode
{
get
{
@@ -92178,7 +92178,7 @@ namespace Model
private string _Remark;
- private string _RemarkCode;
+ private System.Nullable _RemarkCode;
private string _UnitWorkId;
@@ -92218,7 +92218,7 @@ namespace Model
partial void OnReceiveManChanged();
partial void OnRemarkChanging(string value);
partial void OnRemarkChanged();
- partial void OnRemarkCodeChanging(string value);
+ partial void OnRemarkCodeChanging(System.Nullable value);
partial void OnRemarkCodeChanged();
partial void OnUnitWorkIdChanging(string value);
partial void OnUnitWorkIdChanged();
@@ -92480,8 +92480,8 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="NVarChar(50)")]
- public string RemarkCode
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="Int")]
+ public System.Nullable RemarkCode
{
get
{
@@ -92923,7 +92923,7 @@ namespace Model
private string _UnitWorkId;
- private string _RemarkCode;
+ private System.Nullable _RemarkCode;
private EntityRef _Base_CNProfessional;
@@ -92965,7 +92965,7 @@ namespace Model
partial void OnCompileDateChanged();
partial void OnUnitWorkIdChanging(string value);
partial void OnUnitWorkIdChanged();
- partial void OnRemarkCodeChanging(string value);
+ partial void OnRemarkCodeChanging(System.Nullable value);
partial void OnRemarkCodeChanged();
#endregion
@@ -93270,8 +93270,8 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="NVarChar(50)")]
- public string RemarkCode
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="Int")]
+ public System.Nullable RemarkCode
{
get
{
@@ -97296,7 +97296,7 @@ namespace Model
private System.Nullable _IsReview;
- private string _RemarkCode;
+ private System.Nullable _RemarkCode;
private EntityRef _Base_CNProfessional;
@@ -97344,7 +97344,7 @@ namespace Model
partial void OnExpertReviewManChanged();
partial void OnIsReviewChanging(System.Nullable value);
partial void OnIsReviewChanged();
- partial void OnRemarkCodeChanging(string value);
+ partial void OnRemarkCodeChanging(System.Nullable value);
partial void OnRemarkCodeChanged();
#endregion
@@ -97709,8 +97709,8 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="NVarChar(50)")]
- public string RemarkCode
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="Int")]
+ public System.Nullable RemarkCode
{
get
{
@@ -98233,7 +98233,7 @@ namespace Model
private string _Problem;
- private string _RemarkCode;
+ private System.Nullable _RemarkCode;
private EntityRef _Sys_User;
@@ -98285,7 +98285,7 @@ namespace Model
partial void OnMeasureChanged();
partial void OnProblemChanging(string value);
partial void OnProblemChanged();
- partial void OnRemarkCodeChanging(string value);
+ partial void OnRemarkCodeChanging(System.Nullable value);
partial void OnRemarkCodeChanged();
#endregion
@@ -98694,8 +98694,8 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="NVarChar(50)")]
- public string RemarkCode
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="Int")]
+ public System.Nullable RemarkCode
{
get
{
@@ -99157,7 +99157,7 @@ namespace Model
private System.Nullable _ReportTime;
- private string _RemarkCode;
+ private System.Nullable _RemarkCode;
private EntityRef _Sys_User;
@@ -99195,7 +99195,7 @@ namespace Model
partial void OnAuditManChanged();
partial void OnReportTimeChanging(System.Nullable value);
partial void OnReportTimeChanged();
- partial void OnRemarkCodeChanging(string value);
+ partial void OnRemarkCodeChanging(System.Nullable value);
partial void OnRemarkCodeChanged();
#endregion
@@ -99479,8 +99479,8 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="NVarChar(50)")]
- public string RemarkCode
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="Int")]
+ public System.Nullable RemarkCode
{
get
{
@@ -99912,7 +99912,7 @@ namespace Model
private string _AuditMan;
- private string _RemarkCode;
+ private System.Nullable _RemarkCode;
private EntityRef _Base_Project;
@@ -99954,7 +99954,7 @@ namespace Model
partial void OnStatusChanged();
partial void OnAuditManChanging(string value);
partial void OnAuditManChanged();
- partial void OnRemarkCodeChanging(string value);
+ partial void OnRemarkCodeChanging(System.Nullable value);
partial void OnRemarkCodeChanged();
#endregion
@@ -100278,8 +100278,8 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="NVarChar(50)")]
- public string RemarkCode
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="Int")]
+ public System.Nullable RemarkCode
{
get
{
@@ -100703,7 +100703,7 @@ namespace Model
private System.Nullable _CreateDate;
- private string _RemarkCode;
+ private System.Nullable _RemarkCode;
#region 可扩展性方法定义
partial void OnLoaded();
@@ -100731,7 +100731,7 @@ namespace Model
partial void OnCreateManChanged();
partial void OnCreateDateChanging(System.Nullable value);
partial void OnCreateDateChanged();
- partial void OnRemarkCodeChanging(string value);
+ partial void OnRemarkCodeChanging(System.Nullable value);
partial void OnRemarkCodeChanged();
#endregion
@@ -100960,8 +100960,8 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="NVarChar(50)")]
- public string RemarkCode
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="Int")]
+ public System.Nullable RemarkCode
{
get
{
@@ -102058,7 +102058,7 @@ namespace Model
private string _PositionNum;
- private string _RemarkCode;
+ private System.Nullable _RemarkCode;
private EntityRef _Sys_User;
@@ -102096,7 +102096,7 @@ namespace Model
partial void OnReportTimeChanged();
partial void OnPositionNumChanging(string value);
partial void OnPositionNumChanged();
- partial void OnRemarkCodeChanging(string value);
+ partial void OnRemarkCodeChanging(System.Nullable value);
partial void OnRemarkCodeChanged();
#endregion
@@ -102380,8 +102380,8 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="NVarChar(50)")]
- public string RemarkCode
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="Int")]
+ public System.Nullable RemarkCode
{
get
{
@@ -209177,7 +209177,7 @@ namespace Model
private System.Nullable _CreateDate;
- private string _RemarkCode;
+ private System.Nullable _RemarkCode;
#region 可扩展性方法定义
partial void OnLoaded();
@@ -209207,7 +209207,7 @@ namespace Model
partial void OnCreateManChanged();
partial void OnCreateDateChanging(System.Nullable value);
partial void OnCreateDateChanged();
- partial void OnRemarkCodeChanging(string value);
+ partial void OnRemarkCodeChanging(System.Nullable value);
partial void OnRemarkCodeChanged();
#endregion
@@ -209456,8 +209456,8 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="NVarChar(50)")]
- public string RemarkCode
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="Int")]
+ public System.Nullable RemarkCode
{
get
{