Merge branch 'master' of http://47.104.102.122:3000/panhf/CNCEC_SUBQHSE_WUHUAN
This commit is contained in:
commit
ceacba8c0d
|
@ -3251,11 +3251,6 @@ namespace BLL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const string CQMS_TrainingRecordsTemplateUrl= "File\\Excel\\DataIn\\培训记录导入模板.xls";
|
public const string CQMS_TrainingRecordsTemplateUrl= "File\\Excel\\DataIn\\培训记录导入模板.xls";
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 质量专项检查模板文件原始虚拟路径
|
|
||||||
/// </summary>
|
|
||||||
public const string JointCheckTempUrl = "File\\Excel\\CQMS\\质量专项检查模版.xlsx";
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设计交底导入模板文件原始虚拟路径
|
/// 设计交底导入模板文件原始虚拟路径
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -3301,6 +3296,42 @@ namespace BLL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const string ConTechnologyDisclosureTemUrl = "File\\Excel\\DataIn\\施工技术交底管理导入模板.xls";
|
public const string ConTechnologyDisclosureTemUrl = "File\\Excel\\DataIn\\施工技术交底管理导入模板.xls";
|
||||||
|
|
||||||
|
#region 导出模板
|
||||||
|
/// <summary>
|
||||||
|
/// 质量专项检查模板文件原始虚拟路径
|
||||||
|
/// </summary>
|
||||||
|
public const string JointCheckTempUrl = "File\\Excel\\CQMS\\质量专项检查模版.xls";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设备材料报验模板文件原始虚拟路径
|
||||||
|
/// </summary>
|
||||||
|
public const string InspectionEquipmentTempUrl = "File\\Excel\\CQMS\\设备材料报验模板.xls";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 人员报验模板文件原始虚拟路径
|
||||||
|
/// </summary>
|
||||||
|
public const string InspectionPersonTempUrl = "File\\Excel\\CQMS\\人员报验模板.xls";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 机具报验模板文件原始虚拟路径
|
||||||
|
/// </summary>
|
||||||
|
public const string InspectionMachineTempUrl = "File\\Excel\\CQMS\\机具报验模板.xls";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 资料收发文登记记录模板文件原始虚拟路径
|
||||||
|
/// </summary>
|
||||||
|
public const string DataReceivingDocTempUrl = "File\\Excel\\CQMS\\资料收发文登记记录模板.xls";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 培训记录模板文件原始虚拟路径
|
||||||
|
/// </summary>
|
||||||
|
public const string TrainingRecordsTempUrl = "File\\Excel\\CQMS\\培训记录模板.xls";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 施工技术交底模板文件原始虚拟路径
|
||||||
|
/// </summary>
|
||||||
|
public const string ConTechnologyDisclosureTempUrl = "File\\Excel\\CQMS\\施工技术交底管理模板.xls";
|
||||||
|
#endregion
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 绩效考核模板文件路径
|
#region 绩效考核模板文件路径
|
||||||
|
|
|
@ -418,13 +418,14 @@ namespace FineUIPro.Web.CQMS.Check
|
||||||
var lists = BLL.JointCheckService.GetDriverPlanByProjectId(this.CurrUser.LoginProjectId);
|
var lists = BLL.JointCheckService.GetDriverPlanByProjectId(this.CurrUser.LoginProjectId);
|
||||||
if (lists != null)
|
if (lists != null)
|
||||||
{
|
{
|
||||||
newUrl = uploadfilepath.Replace("质量专项检查模版.xlsx", "质量专项检查.xlsx");
|
newUrl = uploadfilepath.Replace("质量专项检查模版.xls", "质量专项检查.xls");
|
||||||
File.Copy(uploadfilepath, newUrl);
|
File.Copy(uploadfilepath, newUrl);
|
||||||
// 第一步:读取文件流
|
// 第一步:读取文件流
|
||||||
NPOI.SS.UserModel.IWorkbook workbook;
|
NPOI.SS.UserModel.IWorkbook workbook;
|
||||||
using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read))
|
using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read))
|
||||||
{
|
{
|
||||||
workbook = new NPOI.XSSF.UserModel.XSSFWorkbook(stream);
|
//workbook = new NPOI.XSSF.UserModel.XSSFWorkbook(stream);
|
||||||
|
workbook = new NPOI.HSSF.UserModel.HSSFWorkbook(stream);
|
||||||
}
|
}
|
||||||
// 创建单元格样式
|
// 创建单元格样式
|
||||||
NPOI.SS.UserModel.ICellStyle cellStyle = workbook.CreateCellStyle();
|
NPOI.SS.UserModel.ICellStyle cellStyle = workbook.CreateCellStyle();
|
||||||
|
|
|
@ -34,6 +34,9 @@
|
||||||
</f:Button>
|
</f:Button>
|
||||||
<f:Button ID="btnImport" ToolTip="导入" Icon="PackageIn" runat="server" OnClick="btnImport_Click" Hidden="true">
|
<f:Button ID="btnImport" ToolTip="导入" Icon="PackageIn" runat="server" OnClick="btnImport_Click" Hidden="true">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
|
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp"
|
||||||
|
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||||
|
</f:Button>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Toolbar>
|
</f:Toolbar>
|
||||||
</Toolbars>
|
</Toolbars>
|
||||||
|
|
|
@ -3,6 +3,7 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Web.UI;
|
using System.Web.UI;
|
||||||
|
@ -230,6 +231,152 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 导出按钮
|
||||||
|
/// 导出按钮
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void btnOut_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
string rootPath = Server.MapPath("~/");
|
||||||
|
string initTemplatePath = Const.ConTechnologyDisclosureTempUrl;
|
||||||
|
string uploadfilepath = string.Empty;
|
||||||
|
string newUrl = string.Empty;
|
||||||
|
uploadfilepath = rootPath + initTemplatePath;
|
||||||
|
|
||||||
|
var lists = (from x in Funs.DB.Comprehensive_ConTechnologyDisclosure
|
||||||
|
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 == this.drpProfessionalId.SelectedValue);
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(this.txtCode.Text.Trim()))
|
||||||
|
{
|
||||||
|
lists = lists.Where(x => x.DisclosureCode.Contains(this.txtCode.Text.Trim()));
|
||||||
|
}
|
||||||
|
lists = lists.OrderBy(x => x.UnitId);
|
||||||
|
if (lists != null)
|
||||||
|
{
|
||||||
|
newUrl = uploadfilepath.Replace("施工技术交底管理模板.xls", "施工技术交底管理.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 = 1;
|
||||||
|
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.DisclosureCode);//交底文件编号
|
||||||
|
|
||||||
|
cell = row.CreateCell(2);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.DisclosureName);//交底施工方案
|
||||||
|
|
||||||
|
cell = row.CreateCell(3);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
string unitName = string.Empty;
|
||||||
|
if (!string.IsNullOrEmpty(item.UnitId))
|
||||||
|
{
|
||||||
|
unitName = BLL.UnitService.GetUnitNameByUnitId(item.UnitId);
|
||||||
|
}
|
||||||
|
cell.SetCellValue(unitName);//交底负责单位
|
||||||
|
|
||||||
|
cell = row.CreateCell(4);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.DisclosureMan);//交底人
|
||||||
|
|
||||||
|
cell = row.CreateCell(5);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.DisclosureDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.DisclosureDate) : "");//交底日期
|
||||||
|
|
||||||
|
cell = row.CreateCell(6);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
string unitWork = string.Empty;
|
||||||
|
if (!string.IsNullOrEmpty(item.UnitWorkId))
|
||||||
|
{
|
||||||
|
unitWork = ConvertUnitWork(item.UnitWorkId);
|
||||||
|
}
|
||||||
|
cell.SetCellValue(unitWork);//单位工程
|
||||||
|
|
||||||
|
cell = row.CreateCell(7);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.AttendMan);//参加人员
|
||||||
|
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
|
||||||
|
|
||||||
#region 获取按钮权限
|
#region 获取按钮权限
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取按钮权限
|
/// 获取按钮权限
|
||||||
|
|
|
@ -111,6 +111,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Button btnImport;
|
protected global::FineUIPro.Button btnImport;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnOut 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Button btnOut;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// lblPageIndex 控件。
|
/// lblPageIndex 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -34,6 +34,9 @@
|
||||||
</f:Button>
|
</f:Button>
|
||||||
<f:Button ID="btnImport" ToolTip="导入" Hidden="true" Icon="PackageIn" runat="server" OnClick="btnImport_Click">
|
<f:Button ID="btnImport" ToolTip="导入" Hidden="true" Icon="PackageIn" runat="server" OnClick="btnImport_Click">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
|
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp"
|
||||||
|
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||||
|
</f:Button>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Toolbar>
|
</f:Toolbar>
|
||||||
</Toolbars>
|
</Toolbars>
|
||||||
|
|
|
@ -3,6 +3,7 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace FineUIPro.Web.CQMS.Comprehensive
|
namespace FineUIPro.Web.CQMS.Comprehensive
|
||||||
|
@ -320,5 +321,221 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 导出按钮
|
||||||
|
/// 导出按钮
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void btnOut_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
string rootPath = Server.MapPath("~/");
|
||||||
|
string initTemplatePath = Const.DataReceivingDocTempUrl;
|
||||||
|
string uploadfilepath = string.Empty;
|
||||||
|
string newUrl = string.Empty;
|
||||||
|
uploadfilepath = rootPath + initTemplatePath;
|
||||||
|
|
||||||
|
var lists = (from x in Funs.DB.Comprehensive_DataReceivingDoc
|
||||||
|
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||||
|
select x);
|
||||||
|
if (!string.IsNullOrEmpty(this.stxtFileCode.Text.Trim()))
|
||||||
|
{
|
||||||
|
lists = lists.Where(x => x.FileCode.Contains(stxtFileCode.Text.Trim()));
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(this.stxtFileName.Text.Trim()))
|
||||||
|
{
|
||||||
|
lists = lists.Where(x => x.FileName.Contains(this.stxtFileName.Text.Trim()));
|
||||||
|
}
|
||||||
|
lists = lists.OrderBy(x => x.FileCode);
|
||||||
|
if (lists != null)
|
||||||
|
{
|
||||||
|
newUrl = uploadfilepath.Replace("资料收发文登记记录模板.xls", "资料收发文登记记录.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 = 1;
|
||||||
|
foreach (var item in lists)
|
||||||
|
{
|
||||||
|
// 第二步:创建新数据行
|
||||||
|
row = sheet.CreateRow(i);
|
||||||
|
// 添加数据
|
||||||
|
cell = row.CreateCell(0);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.ReceiveDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.ReceiveDate) : "");//日期
|
||||||
|
|
||||||
|
cell = row.CreateCell(1);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.FileCode);//文件号
|
||||||
|
|
||||||
|
cell = row.CreateCell(2);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.FileName);//文件名称
|
||||||
|
|
||||||
|
cell = row.CreateCell(3);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.FileType);//文件类别
|
||||||
|
|
||||||
|
cell = row.CreateCell(4);
|
||||||
|
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(5);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
string unitName = string.Empty;
|
||||||
|
if (!string.IsNullOrEmpty(item.SendUnit))
|
||||||
|
{
|
||||||
|
unitName = BLL.UnitService.GetUnitNameByUnitId(item.SendUnit);
|
||||||
|
}
|
||||||
|
cell.SetCellValue(unitName);//发件单位
|
||||||
|
|
||||||
|
cell = row.CreateCell(6);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.SendMan);//发件人
|
||||||
|
|
||||||
|
cell = row.CreateCell(7);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.Copies.HasValue ? item.Copies.ToString() : "");//份数
|
||||||
|
|
||||||
|
cell = row.CreateCell(8);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.DocumentHandler);//文件处理人
|
||||||
|
|
||||||
|
cell = row.CreateCell(9);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.SendDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.SendDate) : "");//发出日期
|
||||||
|
|
||||||
|
cell = row.CreateCell(10);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
string receiveUnitName = string.Empty;
|
||||||
|
if (!string.IsNullOrEmpty(item.ReceiveUnit))
|
||||||
|
{
|
||||||
|
receiveUnitName = ConvertCarryUnit(item.ReceiveUnit);
|
||||||
|
}
|
||||||
|
cell.SetCellValue(receiveUnitName);//接收单位
|
||||||
|
|
||||||
|
cell = row.CreateCell(11);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.ReceiveMan);//接收人
|
||||||
|
|
||||||
|
cell = row.CreateCell(12);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
string isR = string.Empty;
|
||||||
|
if (item.IsReply.HasValue)
|
||||||
|
{
|
||||||
|
if (item.IsReply == true)
|
||||||
|
{
|
||||||
|
isR = "是";
|
||||||
|
}
|
||||||
|
else if (item.IsReply == false)
|
||||||
|
{
|
||||||
|
isR = "否";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cell.SetCellValue(isR);//是否需回复
|
||||||
|
|
||||||
|
cell = row.CreateCell(13);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.ReturnWuhuangDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.ReturnWuhuangDate) : "");//返回五环日期
|
||||||
|
|
||||||
|
cell = row.CreateCell(14);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.RetrunWuhuangCopies.HasValue ? item.RetrunWuhuangCopies.ToString() : "");//返回五环份数
|
||||||
|
|
||||||
|
cell = row.CreateCell(15);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
string issueToUnitName = string.Empty;
|
||||||
|
if (!string.IsNullOrEmpty(item.IssueToUnit))
|
||||||
|
{
|
||||||
|
issueToUnitName = ConvertCarryUnit(item.IssueToUnit);
|
||||||
|
}
|
||||||
|
cell.SetCellValue(issueToUnitName);//下发至单位
|
||||||
|
|
||||||
|
cell = row.CreateCell(16);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.IssueCopies.HasValue ? item.IssueCopies.ToString() : "");//下发份数
|
||||||
|
|
||||||
|
cell = row.CreateCell(17);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.IssueUnitReceiver);//下发单位接收人
|
||||||
|
|
||||||
|
cell = row.CreateCell(18);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
string isO = string.Empty;
|
||||||
|
if (item.IsOnFile.HasValue)
|
||||||
|
{
|
||||||
|
if (item.IsOnFile == true)
|
||||||
|
{
|
||||||
|
isO = "是";
|
||||||
|
}
|
||||||
|
else if (item.IsOnFile == false)
|
||||||
|
{
|
||||||
|
isO = "否";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cell.SetCellValue(isO);//是否存档
|
||||||
|
|
||||||
|
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
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -102,6 +102,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Button btnImport;
|
protected global::FineUIPro.Button btnImport;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnOut 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Button btnOut;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// lblPageIndex 控件。
|
/// lblPageIndex 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -39,6 +39,9 @@
|
||||||
</f:Button>
|
</f:Button>
|
||||||
<f:Button ID="btnImport" ToolTip="导入" Icon="PackageIn" runat="server" OnClick="btnImport_Click" Hidden="true">
|
<f:Button ID="btnImport" ToolTip="导入" Icon="PackageIn" runat="server" OnClick="btnImport_Click" Hidden="true">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
|
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp"
|
||||||
|
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||||
|
</f:Button>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Toolbar>
|
</f:Toolbar>
|
||||||
</Toolbars>
|
</Toolbars>
|
||||||
|
|
|
@ -4,6 +4,7 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
namespace FineUIPro.Web.Comprehensive
|
namespace FineUIPro.Web.Comprehensive
|
||||||
{
|
{
|
||||||
|
@ -242,33 +243,7 @@ namespace FineUIPro.Web.Comprehensive
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 格式化字符串
|
||||||
//public string ConvertState(object value)
|
|
||||||
//{
|
|
||||||
// var status = 0;
|
|
||||||
// int.TryParse(value.ToString(), out status);
|
|
||||||
|
|
||||||
// if (status == 0)
|
|
||||||
// {
|
|
||||||
// return "待审核";
|
|
||||||
// }
|
|
||||||
// else if (status == 1)
|
|
||||||
// {
|
|
||||||
// return "合格";
|
|
||||||
// }
|
|
||||||
// else if (status == 2)
|
|
||||||
// {
|
|
||||||
// return "驳回";
|
|
||||||
// }
|
|
||||||
// else if (status == 3)
|
|
||||||
// {
|
|
||||||
// return "重报";
|
|
||||||
// }
|
|
||||||
// return "待审核";
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static string ConvertState(object Status)
|
public static string ConvertState(object Status)
|
||||||
{
|
{
|
||||||
if (Status != null)
|
if (Status != null)
|
||||||
|
@ -297,8 +272,182 @@ namespace FineUIPro.Web.Comprehensive
|
||||||
|
|
||||||
return "编制";
|
return "编制";
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 导出按钮
|
||||||
|
/// 导出按钮
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void btnOut_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
string rootPath = Server.MapPath("~/");
|
||||||
|
string initTemplatePath = Const.InspectionEquipmentTempUrl;
|
||||||
|
string uploadfilepath = string.Empty;
|
||||||
|
string newUrl = string.Empty;
|
||||||
|
uploadfilepath = rootPath + initTemplatePath;
|
||||||
|
|
||||||
|
var lists = (from x in Funs.DB.Comprehensive_InspectionEquipment
|
||||||
|
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||||
|
select x);
|
||||||
|
if (this.sdrpUnitId.SelectedValue != BLL.Const._Null)
|
||||||
|
{
|
||||||
|
lists = lists.Where(x => x.UnitId == this.sdrpUnitId.SelectedValue);
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(this.stxtInspectionName.Text.Trim()))
|
||||||
|
{
|
||||||
|
lists = lists.Where(x => x.InspectionName.Contains(this.stxtInspectionName.Text.Trim()));
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(txtStarTime.Text.Trim()))
|
||||||
|
{
|
||||||
|
lists = lists.Where(x => x.InspectionDate >= Funs.GetNewDateTime(txtStarTime.Text.Trim()));
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(txtEndTime.Text.Trim()))
|
||||||
|
{
|
||||||
|
lists = lists.Where(x => x.InspectionDate <= Funs.GetNewDateTime(txtEndTime.Text.Trim()));
|
||||||
|
}
|
||||||
|
lists = lists.OrderBy(x => x.UnitId);
|
||||||
|
if (lists != null)
|
||||||
|
{
|
||||||
|
newUrl = uploadfilepath.Replace("设备材料报验模板.xls", "设备材料报验.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 = 1;
|
||||||
|
foreach (var item in lists)
|
||||||
|
{
|
||||||
|
// 第二步:创建新数据行
|
||||||
|
row = sheet.CreateRow(i);
|
||||||
|
// 添加数据
|
||||||
|
cell = row.CreateCell(0);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(BLL.UnitService.GetUnitNameByUnitId(item.UnitId));//报验单位
|
||||||
|
|
||||||
|
cell = row.CreateCell(1);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.InspectionCode);//报验编号
|
||||||
|
|
||||||
|
cell = row.CreateCell(2);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.EquipmentNO);//设备位号
|
||||||
|
|
||||||
|
cell = row.CreateCell(3);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
var cnp = BLL.CNProfessionalService.GetCNProfessional(item.CNProfessionalId);
|
||||||
|
if (cnp != null)
|
||||||
|
{
|
||||||
|
cell.SetCellValue(cnp.ProfessionalName);//专业
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cell.SetCellValue(string.Empty);//专业
|
||||||
|
}
|
||||||
|
|
||||||
|
cell = row.CreateCell(4);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.InspectionName);//名称
|
||||||
|
|
||||||
|
cell = row.CreateCell(5);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.Specifications);//规格(范围)
|
||||||
|
|
||||||
|
cell = row.CreateCell(6);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.Supplier);//供货厂商
|
||||||
|
|
||||||
|
cell = row.CreateCell(7);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.Counts);//本次数量
|
||||||
|
|
||||||
|
cell = row.CreateCell(8);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.Unit);//单位
|
||||||
|
|
||||||
|
cell = row.CreateCell(9);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.SamplingCount);//本次抽检数量
|
||||||
|
|
||||||
|
cell = row.CreateCell(10);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
string r = string.Empty;
|
||||||
|
if (!string.IsNullOrEmpty(item.SamplingResult))
|
||||||
|
{
|
||||||
|
if (item.SamplingResult == "1")
|
||||||
|
{
|
||||||
|
r = "合格";
|
||||||
|
}
|
||||||
|
else if (item.SamplingResult == "2")
|
||||||
|
{
|
||||||
|
r = "不合格";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cell.SetCellValue(r);//本次抽检结果
|
||||||
|
|
||||||
|
cell = row.CreateCell(11);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.InspectionDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.InspectionDate) : "");//报验日期
|
||||||
|
|
||||||
|
cell = row.CreateCell(12);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.UsedPlace);//拟使用部位
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,12 +7,10 @@
|
||||||
// </自动生成>
|
// </自动生成>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace FineUIPro.Web.Comprehensive
|
namespace FineUIPro.Web.Comprehensive {
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
public partial class InspectionEquipment
|
public partial class InspectionEquipment {
|
||||||
{
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// form1 控件。
|
/// form1 控件。
|
||||||
|
@ -131,6 +129,15 @@ namespace FineUIPro.Web.Comprehensive
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Button btnImport;
|
protected global::FineUIPro.Button btnImport;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnOut 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Button btnOut;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// lblPageIndex 控件。
|
/// lblPageIndex 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -49,6 +49,9 @@
|
||||||
</f:Button>
|
</f:Button>
|
||||||
<f:Button ID="btnImport" ToolTip="导入" Icon="PackageIn" runat="server" OnClick="btnImport_Click" Hidden="true">
|
<f:Button ID="btnImport" ToolTip="导入" Icon="PackageIn" runat="server" OnClick="btnImport_Click" Hidden="true">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
|
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp"
|
||||||
|
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||||
|
</f:Button>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Toolbar>
|
</f:Toolbar>
|
||||||
</Toolbars>
|
</Toolbars>
|
||||||
|
|
|
@ -3,6 +3,7 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
namespace FineUIPro.Web.Comprehensive
|
namespace FineUIPro.Web.Comprehensive
|
||||||
{
|
{
|
||||||
|
@ -295,5 +296,186 @@ namespace FineUIPro.Web.Comprehensive
|
||||||
|
|
||||||
return "编制";
|
return "编制";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region 导出按钮
|
||||||
|
/// 导出按钮
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void btnOut_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
string rootPath = Server.MapPath("~/");
|
||||||
|
string initTemplatePath = Const.InspectionMachineTempUrl;
|
||||||
|
string uploadfilepath = string.Empty;
|
||||||
|
string newUrl = string.Empty;
|
||||||
|
uploadfilepath = rootPath + initTemplatePath;
|
||||||
|
|
||||||
|
var lists = (from x in Funs.DB.Comprehensive_InspectionMachine
|
||||||
|
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||||
|
select x);
|
||||||
|
if (this.sdrpUnitId.SelectedValue != BLL.Const._Null)
|
||||||
|
{
|
||||||
|
lists = lists.Where(x => x.UnitId == this.sdrpUnitId.SelectedValue);
|
||||||
|
}
|
||||||
|
if (sdrpCNProfessional.SelectedValue != BLL.Const._Null)
|
||||||
|
{
|
||||||
|
lists = lists.Where(x => x.CNProfessionalId == this.sdrpCNProfessional.SelectedValue);
|
||||||
|
}
|
||||||
|
if (sdrpType.SelectedValue != "")
|
||||||
|
{
|
||||||
|
lists = lists.Where(x => x.InspectionType == this.sdrpType.SelectedValue);
|
||||||
|
}
|
||||||
|
lists = lists.OrderBy(x => x.UnitId);
|
||||||
|
if (lists != null)
|
||||||
|
{
|
||||||
|
newUrl = uploadfilepath.Replace("机具报验模板.xls", "机具报验.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 = 1;
|
||||||
|
foreach (var item in lists)
|
||||||
|
{
|
||||||
|
// 第二步:创建新数据行
|
||||||
|
row = sheet.CreateRow(i);
|
||||||
|
// 添加数据
|
||||||
|
cell = row.CreateCell(0);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(BLL.UnitService.GetUnitNameByUnitId(item.UnitId));//报验单位
|
||||||
|
|
||||||
|
cell = row.CreateCell(1);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.InspectionMachineCode);//报验编号
|
||||||
|
|
||||||
|
cell = row.CreateCell(2);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.InspectionMachineName);//名称
|
||||||
|
|
||||||
|
cell = row.CreateCell(3);
|
||||||
|
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(4);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.InspectionType);//类型
|
||||||
|
|
||||||
|
cell = row.CreateCell(5);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.SpecificationModel);//规格型号
|
||||||
|
|
||||||
|
cell = row.CreateCell(6);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.NextTestDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.NextTestDate) : "");//下次检验日期
|
||||||
|
|
||||||
|
cell = row.CreateCell(7);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.TestCycle);//检验周期
|
||||||
|
|
||||||
|
cell = row.CreateCell(8);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
string isV = string.Empty;
|
||||||
|
if(item.IsVerification.HasValue)
|
||||||
|
{
|
||||||
|
if (item.IsVerification==true)
|
||||||
|
{
|
||||||
|
isV = "是";
|
||||||
|
}
|
||||||
|
else if(item.IsVerification == false)
|
||||||
|
{
|
||||||
|
isV = "否";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cell.SetCellValue(isV);//是否在校验期内
|
||||||
|
|
||||||
|
cell = row.CreateCell(9);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.InspectionDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.InspectionDate) : "");//报验日期
|
||||||
|
|
||||||
|
cell = row.CreateCell(10);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
string isO = string.Empty;
|
||||||
|
if (item.IsOnSite.HasValue)//是否在场
|
||||||
|
{
|
||||||
|
if (item.IsOnSite == true)
|
||||||
|
{
|
||||||
|
isO = "是";
|
||||||
|
}
|
||||||
|
else if (item.IsOnSite == false)
|
||||||
|
{
|
||||||
|
isO = "否";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cell.SetCellValue(isO);//是否在校验期内
|
||||||
|
|
||||||
|
cell = row.CreateCell(11);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.UnitsCount.HasValue ? item.UnitsCount.ToString() : "");//台数
|
||||||
|
|
||||||
|
cell = row.CreateCell(12);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.LeaveDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.LeaveDate) : "");//离场时间
|
||||||
|
|
||||||
|
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
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -7,12 +7,10 @@
|
||||||
// </自动生成>
|
// </自动生成>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace FineUIPro.Web.Comprehensive
|
namespace FineUIPro.Web.Comprehensive {
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
public partial class InspectionMachine
|
public partial class InspectionMachine {
|
||||||
{
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// form1 控件。
|
/// form1 控件。
|
||||||
|
@ -113,6 +111,15 @@ namespace FineUIPro.Web.Comprehensive
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Button btnImport;
|
protected global::FineUIPro.Button btnImport;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnOut 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Button btnOut;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// lblPageIndex 控件。
|
/// lblPageIndex 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -46,6 +46,9 @@
|
||||||
</f:Button>
|
</f:Button>
|
||||||
<f:Button ID="btnImport" ToolTip="导入" Icon="PackageIn" runat="server" OnClick="btnImport_Click" Hidden="true">
|
<f:Button ID="btnImport" ToolTip="导入" Icon="PackageIn" runat="server" OnClick="btnImport_Click" Hidden="true">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
|
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp"
|
||||||
|
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||||
|
</f:Button>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Toolbar>
|
</f:Toolbar>
|
||||||
</Toolbars>
|
</Toolbars>
|
||||||
|
|
|
@ -4,6 +4,7 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
namespace FineUIPro.Web.Comprehensive
|
namespace FineUIPro.Web.Comprehensive
|
||||||
{
|
{
|
||||||
|
@ -363,6 +364,167 @@ namespace FineUIPro.Web.Comprehensive
|
||||||
return "编制";
|
return "编制";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region 导出按钮
|
||||||
|
/// 导出按钮
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void btnOut_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
string rootPath = Server.MapPath("~/");
|
||||||
|
string initTemplatePath = Const.InspectionPersonTempUrl;
|
||||||
|
string uploadfilepath = string.Empty;
|
||||||
|
string newUrl = string.Empty;
|
||||||
|
uploadfilepath = rootPath + initTemplatePath;
|
||||||
|
|
||||||
|
var lists = (from x in Funs.DB.Comprehensive_InspectionPerson
|
||||||
|
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||||
|
select x);
|
||||||
|
if (this.sdrpUnitId.SelectedValue != BLL.Const._Null)
|
||||||
|
{
|
||||||
|
lists = lists.Where(x => x.UnitId == this.sdrpUnitId.SelectedValue);
|
||||||
|
}
|
||||||
|
if (sdrpPost.SelectedValue != BLL.Const._Null)
|
||||||
|
{
|
||||||
|
lists = lists.Where(x => x.PostId == this.sdrpPost.SelectedValue);
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(this.stxtPersonName.Text.Trim()))
|
||||||
|
{
|
||||||
|
lists = lists.Where(x => x.PersonName.Contains(this.stxtPersonName.Text.Trim()));
|
||||||
|
}
|
||||||
|
lists = lists.OrderBy(x => x.UnitId);
|
||||||
|
if (lists != null)
|
||||||
|
{
|
||||||
|
newUrl = uploadfilepath.Replace("人员报验模板.xls", "人员报验.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 = 1;
|
||||||
|
foreach (var item in lists)
|
||||||
|
{
|
||||||
|
// 第二步:创建新数据行
|
||||||
|
row = sheet.CreateRow(i);
|
||||||
|
// 添加数据
|
||||||
|
cell = row.CreateCell(0);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(BLL.UnitService.GetUnitNameByUnitId(item.UnitId));//报验单位
|
||||||
|
|
||||||
|
cell = row.CreateCell(1);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.InspectionPersonCode);//报验编号
|
||||||
|
|
||||||
|
cell = row.CreateCell(2);
|
||||||
|
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(3);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
string unitWork = string.Empty;
|
||||||
|
if (!string.IsNullOrEmpty(item.UnitWorkId))
|
||||||
|
{
|
||||||
|
unitWork = ConvertUnitWork(item.UnitWorkId);
|
||||||
|
}
|
||||||
|
cell.SetCellValue(unitWork);//单位工程名称
|
||||||
|
|
||||||
|
cell = row.CreateCell(4);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
string postName = string.Empty;
|
||||||
|
if (!string.IsNullOrEmpty(item.PostId))
|
||||||
|
{
|
||||||
|
var post = BLL.PostService.GetPostById(item.PostId);
|
||||||
|
if (post!=null)
|
||||||
|
{
|
||||||
|
postName = post.PostName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cell.SetCellValue(postName);//工种
|
||||||
|
|
||||||
|
cell = row.CreateCell(5);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.PersonName);//姓名
|
||||||
|
|
||||||
|
cell = row.CreateCell(6);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.CertificateNumber);//证书编号
|
||||||
|
|
||||||
|
cell = row.CreateCell(7);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.QualifiedProjectCode);//合格项目代号(级别)
|
||||||
|
|
||||||
|
cell = row.CreateCell(8);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.ValidityDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.ValidityDate) : "");//有效期
|
||||||
|
|
||||||
|
cell = row.CreateCell(9);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.ApprovalTime.HasValue ? string.Format("{0:yyyy-MM-dd}", item.ApprovalTime) : "");//批准时间
|
||||||
|
|
||||||
|
cell = row.CreateCell(10);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.DepartureTime.HasValue ? string.Format("{0:yyyy-MM-dd}", item.DepartureTime) : "");//离场时间
|
||||||
|
|
||||||
|
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
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -7,12 +7,10 @@
|
||||||
// </自动生成>
|
// </自动生成>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace FineUIPro.Web.Comprehensive
|
namespace FineUIPro.Web.Comprehensive {
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
public partial class InspectionPerson
|
public partial class InspectionPerson {
|
||||||
{
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// form1 控件。
|
/// form1 控件。
|
||||||
|
@ -113,6 +111,15 @@ namespace FineUIPro.Web.Comprehensive
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Button btnImport;
|
protected global::FineUIPro.Button btnImport;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnOut 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Button btnOut;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// lblPageIndex 控件。
|
/// lblPageIndex 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -30,6 +30,9 @@
|
||||||
</f:Button>
|
</f:Button>
|
||||||
<f:Button ID="btnImport" ToolTip="导入" Hidden="true" Icon="PackageIn" runat="server" OnClick="btnImport_Click">
|
<f:Button ID="btnImport" ToolTip="导入" Hidden="true" Icon="PackageIn" runat="server" OnClick="btnImport_Click">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
|
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp"
|
||||||
|
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||||
|
</f:Button>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Toolbar>
|
</f:Toolbar>
|
||||||
</Toolbars>
|
</Toolbars>
|
||||||
|
|
|
@ -3,6 +3,7 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Web.UI;
|
using System.Web.UI;
|
||||||
|
@ -203,6 +204,133 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 导出按钮
|
||||||
|
/// 导出按钮
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void btnOut_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
string rootPath = Server.MapPath("~/");
|
||||||
|
string initTemplatePath = Const.TrainingRecordsTempUrl;
|
||||||
|
string uploadfilepath = string.Empty;
|
||||||
|
string newUrl = string.Empty;
|
||||||
|
uploadfilepath = rootPath + initTemplatePath;
|
||||||
|
|
||||||
|
var lists = (from x in Funs.DB.Comprehensive_TrainingRecords
|
||||||
|
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||||
|
select x);
|
||||||
|
if (drpCNProfessionalId.SelectedValue != BLL.Const._Null)
|
||||||
|
{
|
||||||
|
lists = lists.Where(x => x.CNProfessionalId == drpCNProfessionalId.SelectedValue);
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(this.txtTrainingContents.Text.Trim()))
|
||||||
|
{
|
||||||
|
lists = lists.Where(x => x.TrainingContents.Contains(this.txtTrainingContents.Text.Trim()));
|
||||||
|
}
|
||||||
|
if (lists != null)
|
||||||
|
{
|
||||||
|
newUrl = uploadfilepath.Replace("培训记录模板.xls", "培训记录.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 = 1;
|
||||||
|
foreach (var item in lists)
|
||||||
|
{
|
||||||
|
// 第二步:创建新数据行
|
||||||
|
row = sheet.CreateRow(i);
|
||||||
|
// 添加数据
|
||||||
|
cell = row.CreateCell(0);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.TrainingContents);//培训内容
|
||||||
|
|
||||||
|
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.TrainingObject);//培训对象
|
||||||
|
|
||||||
|
cell = row.CreateCell(3);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.TrainingAddress);//培训地点
|
||||||
|
|
||||||
|
cell = row.CreateCell(4);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.Hours.HasValue ? item.Hours.ToString() : "");//课时(小时)
|
||||||
|
|
||||||
|
cell = row.CreateCell(5);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.KeynoteSpeaker);//主讲人
|
||||||
|
|
||||||
|
cell = row.CreateCell(6);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.Remark);//备注
|
||||||
|
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
|
||||||
|
|
||||||
#region 获取按钮权限
|
#region 获取按钮权限
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取按钮权限
|
/// 获取按钮权限
|
||||||
|
|
|
@ -102,6 +102,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Button btnImport;
|
protected global::FineUIPro.Button btnImport;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnOut 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Button btnOut;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// lblPageIndex 控件。
|
/// lblPageIndex 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -41,6 +41,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
public Model.SGGLDB db = Funs.DB;
|
||||||
|
|
||||||
#region 列表集合
|
#region 列表集合
|
||||||
private static List<Model.Report_CqmsTarget> detailsGrid1 = new List<Model.Report_CqmsTarget>();
|
private static List<Model.Report_CqmsTarget> detailsGrid1 = new List<Model.Report_CqmsTarget>();
|
||||||
|
|
||||||
|
@ -62,6 +64,26 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
private static List<Model.Report_NextQualityControl> nextQualityControlLists = new List<Model.Report_NextQualityControl>();
|
private static List<Model.Report_NextQualityControl> nextQualityControlLists = new List<Model.Report_NextQualityControl>();
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 加载所有单位
|
||||||
|
public class UnitClass {
|
||||||
|
public string UnitId { get; set; }
|
||||||
|
public string UnitName { get; set; }
|
||||||
|
|
||||||
|
public string UnitType { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<UnitClass> units = new List<UnitClass>();
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 加载所有专业
|
||||||
|
public class ProfessionalsClass {
|
||||||
|
public string CNProfessionalId { get; set; }
|
||||||
|
public string ProfessionalName { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ProfessionalsClass> CNProfessionals = new List<ProfessionalsClass>();
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region 加载页面
|
#region 加载页面
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 加载页面
|
/// 加载页面
|
||||||
|
@ -72,6 +94,23 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
{
|
{
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
|
//加载所有单位
|
||||||
|
units = (from x in db.Project_ProjectUnit
|
||||||
|
join y in db.Base_Unit on x.UnitId equals y.UnitId
|
||||||
|
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||||
|
orderby y.UnitCode
|
||||||
|
select new UnitClass{ UnitId=x.UnitId, UnitName=y.UnitName, UnitType=x.UnitType }).ToList();
|
||||||
|
//加载所有专业
|
||||||
|
CNProfessionals = (from x in db.Base_CNProfessional
|
||||||
|
where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId
|
||||||
|
&& x.CNProfessionalId != BLL.Const.ComprehensiveId
|
||||||
|
orderby x.SortIndex
|
||||||
|
select new ProfessionalsClass
|
||||||
|
{
|
||||||
|
CNProfessionalId=x.CNProfessionalId,
|
||||||
|
ProfessionalName=x.ProfessionalName
|
||||||
|
}).ToList();
|
||||||
|
|
||||||
BLL.UnitService.InitUnitNameByProjectIdUnitTypeDropDownList(this.drpUnitId, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, false);
|
BLL.UnitService.InitUnitNameByProjectIdUnitTypeDropDownList(this.drpUnitId, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, false);
|
||||||
BLL.UnitService.InitUnitDownListByText(this.drpUnitIdGrid9, this.CurrUser.LoginProjectId, true);
|
BLL.UnitService.InitUnitDownListByText(this.drpUnitIdGrid9, this.CurrUser.LoginProjectId, true);
|
||||||
this.EnableViewState = true;
|
this.EnableViewState = true;
|
||||||
|
@ -105,7 +144,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
|
|
||||||
#region 加载本月质量目标管理情况
|
#region 加载本月质量目标管理情况
|
||||||
detailsGrid1.Clear();
|
detailsGrid1.Clear();
|
||||||
detailsGrid1 = (from x in Funs.DB.Report_CqmsTarget
|
detailsGrid1 = (from x in db.Report_CqmsTarget
|
||||||
where x.ReportId == this.ReportId
|
where x.ReportId == this.ReportId
|
||||||
orderby x.SortId
|
orderby x.SortId
|
||||||
select x).ToList();
|
select x).ToList();
|
||||||
|
@ -119,7 +158,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 加载7.2 PQR/WPS报验情况
|
#region 加载7.2 PQR/WPS报验情况
|
||||||
var detailsGrid9 = (from x in Funs.DB.Report_Construction_Plan
|
var detailsGrid9 = (from x in db.Report_Construction_Plan
|
||||||
where x.ReportId == ReportId && x.ReType == "5"
|
where x.ReportId == ReportId && x.ReType == "5"
|
||||||
select x).ToList();
|
select x).ToList();
|
||||||
if (detailsGrid9.Count > 0)
|
if (detailsGrid9.Count > 0)
|
||||||
|
@ -143,7 +182,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
#region 加载18.本月质量问题处理情况
|
#region 加载18.本月质量问题处理情况
|
||||||
//(1)原材料问题
|
//(1)原材料问题
|
||||||
rowMaterialProblemLists.Clear();
|
rowMaterialProblemLists.Clear();
|
||||||
rowMaterialProblemLists = (from x in Funs.DB.Report_RowMaterialProblem
|
rowMaterialProblemLists = (from x in db.Report_RowMaterialProblem
|
||||||
where x.ReportId == this.ReportId
|
where x.ReportId == this.ReportId
|
||||||
select x).ToList();
|
select x).ToList();
|
||||||
if (rowMaterialProblemLists.Count > 0)
|
if (rowMaterialProblemLists.Count > 0)
|
||||||
|
@ -154,7 +193,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
}
|
}
|
||||||
//(2)施工过程问题
|
//(2)施工过程问题
|
||||||
constructionProblemsLists.Clear();
|
constructionProblemsLists.Clear();
|
||||||
constructionProblemsLists = (from x in Funs.DB.Report_ConstructionProblems
|
constructionProblemsLists = (from x in db.Report_ConstructionProblems
|
||||||
where x.ReportId == this.ReportId
|
where x.ReportId == this.ReportId
|
||||||
select x).ToList();
|
select x).ToList();
|
||||||
if (constructionProblemsLists.Count > 0)
|
if (constructionProblemsLists.Count > 0)
|
||||||
|
@ -167,7 +206,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
|
|
||||||
#region 加载19.下月质量控制重点
|
#region 加载19.下月质量控制重点
|
||||||
nextQualityControlLists.Clear();
|
nextQualityControlLists.Clear();
|
||||||
nextQualityControlLists = (from x in Funs.DB.Report_NextQualityControl
|
nextQualityControlLists = (from x in db.Report_NextQualityControl
|
||||||
where x.ReportId == this.ReportId
|
where x.ReportId == this.ReportId
|
||||||
select x).ToList();
|
select x).ToList();
|
||||||
if (nextQualityControlLists.Count > 0)
|
if (nextQualityControlLists.Count > 0)
|
||||||
|
@ -179,7 +218,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 加载文本框内容
|
#region 加载文本框内容
|
||||||
var txtReportList = Funs.DB.Report_TextBoxContent.Where(x => x.ReportId == ReportId).ToList();
|
var txtReportList = db.Report_TextBoxContent.Where(x => x.ReportId == ReportId).ToList();
|
||||||
txtAre0.Text = txtReportList.FirstOrDefault(x => x.ContentType == "0").ContentText;
|
txtAre0.Text = txtReportList.FirstOrDefault(x => x.ContentType == "0").ContentText;
|
||||||
txtAre1.Text = txtReportList.FirstOrDefault(x => x.ContentType == "1").ContentText;
|
txtAre1.Text = txtReportList.FirstOrDefault(x => x.ContentType == "1").ContentText;
|
||||||
txtAre2.Text = txtReportList.FirstOrDefault(x => x.ContentType == "2").ContentText;
|
txtAre2.Text = txtReportList.FirstOrDefault(x => x.ContentType == "2").ContentText;
|
||||||
|
@ -384,7 +423,6 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void loadGeneralPlanApproval(string objType)
|
void loadGeneralPlanApproval(string objType)
|
||||||
{
|
{
|
||||||
var db = Funs.DB;
|
|
||||||
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
||||||
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
||||||
var list = new List<Model.Report_Construction_Plan>();
|
var list = new List<Model.Report_Construction_Plan>();
|
||||||
|
@ -393,11 +431,12 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
int Quantity1Sum = 0;
|
int Quantity1Sum = 0;
|
||||||
int Quantity2Sum = 0;
|
int Quantity2Sum = 0;
|
||||||
//加载所有单位
|
//加载所有单位
|
||||||
var units = from x in Funs.DB.Project_ProjectUnit
|
//var units = from x in db.Project_ProjectUnit
|
||||||
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
|
// join y in db.Base_Unit on x.UnitId equals y.UnitId
|
||||||
where x.ProjectId == this.CurrUser.LoginProjectId && (x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1)
|
// where x.ProjectId == this.CurrUser.LoginProjectId && (x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1)
|
||||||
orderby y.UnitCode
|
// orderby y.UnitCode
|
||||||
select new { x.UnitId, y.UnitName };
|
// select new { x.UnitId, y.UnitName };
|
||||||
|
units = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1).ToList();
|
||||||
foreach (var item in units)
|
foreach (var item in units)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -465,7 +504,6 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void loadMajorPlanApproval(string objType)
|
void loadMajorPlanApproval(string objType)
|
||||||
{
|
{
|
||||||
var db = Funs.DB;
|
|
||||||
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
||||||
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
||||||
var list = new List<Model.Report_Construction_Plan>();
|
var list = new List<Model.Report_Construction_Plan>();
|
||||||
|
@ -475,11 +513,12 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
int Quantity2Sum = 0;
|
int Quantity2Sum = 0;
|
||||||
int Quantity3Sum = 0;
|
int Quantity3Sum = 0;
|
||||||
//加载所有单位
|
//加载所有单位
|
||||||
var units = from x in Funs.DB.Project_ProjectUnit
|
//var units = from x in db.Project_ProjectUnit
|
||||||
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
|
// join y in db.Base_Unit on x.UnitId equals y.UnitId
|
||||||
where x.ProjectId == this.CurrUser.LoginProjectId && (x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1)
|
// where x.ProjectId == this.CurrUser.LoginProjectId && (x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1)
|
||||||
orderby y.UnitCode
|
// orderby y.UnitCode
|
||||||
select new { x.UnitId, y.UnitName };
|
// select new { x.UnitId, y.UnitName };
|
||||||
|
units = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1).ToList();
|
||||||
foreach (var item in units)
|
foreach (var item in units)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -551,7 +590,6 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void loadInspectionTestPlan(string objType)
|
void loadInspectionTestPlan(string objType)
|
||||||
{
|
{
|
||||||
var db = Funs.DB;
|
|
||||||
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
||||||
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
||||||
var list = new List<Model.Report_Construction_Plan>();
|
var list = new List<Model.Report_Construction_Plan>();
|
||||||
|
@ -560,15 +598,15 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
int Quantity1Sum = 0;
|
int Quantity1Sum = 0;
|
||||||
int Quantity2Sum = 0;
|
int Quantity2Sum = 0;
|
||||||
//加载所有专业
|
//加载所有专业
|
||||||
var CNProfessionals = from x in Funs.DB.Base_CNProfessional
|
//var CNProfessionals = from x in db.Base_CNProfessional
|
||||||
where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId
|
// where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId
|
||||||
&& x.CNProfessionalId != BLL.Const.ComprehensiveId
|
// && x.CNProfessionalId != BLL.Const.ComprehensiveId
|
||||||
orderby x.SortIndex
|
// orderby x.SortIndex
|
||||||
select new
|
// select new
|
||||||
{
|
// {
|
||||||
x.CNProfessionalId,
|
// x.CNProfessionalId,
|
||||||
x.ProfessionalName
|
// x.ProfessionalName
|
||||||
};
|
// };
|
||||||
|
|
||||||
|
|
||||||
foreach (var item in CNProfessionals)
|
foreach (var item in CNProfessionals)
|
||||||
|
@ -639,7 +677,6 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void loadDesignDetailsApprove(string objType)
|
void loadDesignDetailsApprove(string objType)
|
||||||
{
|
{
|
||||||
var db = Funs.DB;
|
|
||||||
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
||||||
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
||||||
var list = new List<Model.Report_Construction_Plan>();
|
var list = new List<Model.Report_Construction_Plan>();
|
||||||
|
@ -648,15 +685,15 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
int Quantity1Sum = 0;
|
int Quantity1Sum = 0;
|
||||||
int Quantity2Sum = 0;
|
int Quantity2Sum = 0;
|
||||||
//加载所有专业
|
//加载所有专业
|
||||||
var CNProfessionals = from x in Funs.DB.Base_CNProfessional
|
//var CNProfessionals = from x in db.Base_CNProfessional
|
||||||
where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId
|
// where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId
|
||||||
&& x.CNProfessionalId != BLL.Const.ComprehensiveId
|
// && x.CNProfessionalId != BLL.Const.ComprehensiveId
|
||||||
orderby x.SortIndex
|
// orderby x.SortIndex
|
||||||
select new
|
// select new
|
||||||
{
|
// {
|
||||||
x.CNProfessionalId,
|
// x.CNProfessionalId,
|
||||||
x.ProfessionalName
|
// x.ProfessionalName
|
||||||
};
|
// };
|
||||||
|
|
||||||
|
|
||||||
foreach (var item in CNProfessionals)
|
foreach (var item in CNProfessionals)
|
||||||
|
@ -723,7 +760,6 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void loadReviewDrawings(string objType)
|
void loadReviewDrawings(string objType)
|
||||||
{
|
{
|
||||||
var db = Funs.DB;
|
|
||||||
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
||||||
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
||||||
var list = new List<Model.Report_Construction_Plan>();
|
var list = new List<Model.Report_Construction_Plan>();
|
||||||
|
@ -732,15 +768,15 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
int Quantity1Sum = 0;
|
int Quantity1Sum = 0;
|
||||||
int Quantity2Sum = 0;
|
int Quantity2Sum = 0;
|
||||||
//加载所有专业
|
//加载所有专业
|
||||||
var CNProfessionals = from x in Funs.DB.Base_CNProfessional
|
//var CNProfessionals = from x in db.Base_CNProfessional
|
||||||
where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId
|
// where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId
|
||||||
&& x.CNProfessionalId != BLL.Const.ComprehensiveId
|
// && x.CNProfessionalId != BLL.Const.ComprehensiveId
|
||||||
orderby x.SortIndex
|
// orderby x.SortIndex
|
||||||
select new
|
// select new
|
||||||
{
|
// {
|
||||||
x.CNProfessionalId,
|
// x.CNProfessionalId,
|
||||||
x.ProfessionalName
|
// x.ProfessionalName
|
||||||
};
|
// };
|
||||||
|
|
||||||
|
|
||||||
foreach (var item in CNProfessionals)
|
foreach (var item in CNProfessionals)
|
||||||
|
@ -822,7 +858,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int i = 1;
|
int i = 1;
|
||||||
var cNProfessionals = from x in Funs.DB.Base_CNProfessional where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId
|
var cNProfessionals = from x in db.Base_CNProfessional where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId
|
||||||
&& x.CNProfessionalId != BLL.Const.ComprehensiveId orderby x.SortIndex select x;
|
&& x.CNProfessionalId != BLL.Const.ComprehensiveId orderby x.SortIndex select x;
|
||||||
foreach (var item in cNProfessionals)
|
foreach (var item in cNProfessionals)
|
||||||
{
|
{
|
||||||
|
@ -887,12 +923,12 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int i = 1;
|
int i = 1;
|
||||||
var units = from x in Funs.DB.Project_ProjectUnit
|
//var units = from x in db.Project_ProjectUnit
|
||||||
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
|
// join y in db.Base_Unit on x.UnitId equals y.UnitId
|
||||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitType == BLL.Const.ProjectUnitType_2
|
// where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitType == BLL.Const.ProjectUnitType_2
|
||||||
orderby y.UnitCode
|
// orderby y.UnitCode
|
||||||
select new { x.UnitId, y.UnitName };
|
// select new { x.UnitId, y.UnitName };
|
||||||
var db = Funs.DB;
|
units = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2).ToList();
|
||||||
foreach (var item in units)
|
foreach (var item in units)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -1103,17 +1139,16 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
#region 7.3 无损检测管理 Grid10方法
|
#region 7.3 无损检测管理 Grid10方法
|
||||||
void loadProcessControl_NondestructiveTest_New()
|
void loadProcessControl_NondestructiveTest_New()
|
||||||
{
|
{
|
||||||
var db = Funs.DB;
|
|
||||||
|
|
||||||
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
||||||
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
||||||
var list = new List<Model.ProcessControl_NondestructiveTest_New>();
|
var list = new List<Model.ProcessControl_NondestructiveTest_New>();
|
||||||
//加载所有施工分包单位
|
//加载所有施工分包单位
|
||||||
var units = from x in Funs.DB.Project_ProjectUnit
|
//var units = from x in db.Project_ProjectUnit
|
||||||
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
|
// join y in db.Base_Unit on x.UnitId equals y.UnitId
|
||||||
where x.ProjectId == this.CurrUser.LoginProjectId && (x.UnitType == BLL.Const.ProjectUnitType_2)
|
// where x.ProjectId == this.CurrUser.LoginProjectId && (x.UnitType == BLL.Const.ProjectUnitType_2)
|
||||||
orderby y.UnitCode
|
// orderby y.UnitCode
|
||||||
select new { x.UnitId, y.UnitName };
|
// select new { x.UnitId, y.UnitName };
|
||||||
|
units = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2).ToList();
|
||||||
|
|
||||||
int? totalNum0 = 0, totalNum1 = 0;//拍片数量合计
|
int? totalNum0 = 0, totalNum1 = 0;//拍片数量合计
|
||||||
|
|
||||||
|
@ -1291,7 +1326,6 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void LoadInspectionEquipment(string objType)
|
void LoadInspectionEquipment(string objType)
|
||||||
{
|
{
|
||||||
var db = Funs.DB;
|
|
||||||
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
||||||
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
||||||
var list = new List<Model.Report_Construction_Plan>();
|
var list = new List<Model.Report_Construction_Plan>();
|
||||||
|
@ -1300,11 +1334,12 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
int Quantity1Sum = 0;
|
int Quantity1Sum = 0;
|
||||||
int Quantity2Sum = 0;
|
int Quantity2Sum = 0;
|
||||||
//加载所有单位
|
//加载所有单位
|
||||||
var units = from x in Funs.DB.Project_ProjectUnit
|
//var units = from x in db.Project_ProjectUnit
|
||||||
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
|
// join y in db.Base_Unit on x.UnitId equals y.UnitId
|
||||||
where x.ProjectId == this.CurrUser.LoginProjectId && (x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1)
|
// where x.ProjectId == this.CurrUser.LoginProjectId && (x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1)
|
||||||
orderby y.UnitCode
|
// orderby y.UnitCode
|
||||||
select new { x.UnitId, y.UnitName };
|
// select new { x.UnitId, y.UnitName };
|
||||||
|
units = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1).ToList();
|
||||||
foreach (var item in units)
|
foreach (var item in units)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -1400,7 +1435,6 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void loadMeasuringInspection(string objType)
|
void loadMeasuringInspection(string objType)
|
||||||
{
|
{
|
||||||
var db = Funs.DB;
|
|
||||||
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
||||||
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
||||||
var list = new List<Model.Report_CQMS_MonthReportItem>();
|
var list = new List<Model.Report_CQMS_MonthReportItem>();
|
||||||
|
@ -1409,11 +1443,12 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
int Quantity1Sum = 0;
|
int Quantity1Sum = 0;
|
||||||
int Quantity2Sum = 0;
|
int Quantity2Sum = 0;
|
||||||
//加载所有单位
|
//加载所有单位
|
||||||
var units = from x in Funs.DB.Project_ProjectUnit
|
//var units = from x in db.Project_ProjectUnit
|
||||||
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
|
// join y in db.Base_Unit on x.UnitId equals y.UnitId
|
||||||
where x.ProjectId == this.CurrUser.LoginProjectId && (x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1)
|
// where x.ProjectId == this.CurrUser.LoginProjectId && (x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1)
|
||||||
orderby y.UnitCode
|
// orderby y.UnitCode
|
||||||
select new { x.UnitId, y.UnitName };
|
// select new { x.UnitId, y.UnitName };
|
||||||
|
units = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1).ToList();
|
||||||
foreach (var item in units)
|
foreach (var item in units)
|
||||||
{
|
{
|
||||||
var query = from c in db.Comprehensive_InspectionMachine
|
var query = from c in db.Comprehensive_InspectionMachine
|
||||||
|
@ -1481,7 +1516,6 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
CheckLotBindStatisc("XF");//检验批统计:消防
|
CheckLotBindStatisc("XF");//检验批统计:消防
|
||||||
|
|
||||||
#region 现场质量共检数据合计
|
#region 现场质量共检数据合计
|
||||||
var db = Funs.DB;
|
|
||||||
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
||||||
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
||||||
var list = new List<Model.CheckStatisc>();
|
var list = new List<Model.CheckStatisc>();
|
||||||
|
@ -1498,11 +1532,12 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
|
|
||||||
|
|
||||||
//加载所有单位
|
//加载所有单位
|
||||||
var units = from x in Funs.DB.Project_ProjectUnit
|
//var units = from x in db.Project_ProjectUnit
|
||||||
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
|
// join y in db.Base_Unit on x.UnitId equals y.UnitId
|
||||||
where x.ProjectId == this.CurrUser.LoginProjectId && (x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1)
|
// where x.ProjectId == this.CurrUser.LoginProjectId && (x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1)
|
||||||
orderby y.UnitCode
|
// orderby y.UnitCode
|
||||||
select new { x.UnitId, y.UnitName };
|
// select new { x.UnitId, y.UnitName };
|
||||||
|
units = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1).ToList();
|
||||||
foreach (var item in units)
|
foreach (var item in units)
|
||||||
{
|
{
|
||||||
var query = from c in db.View_CQMS_InspectionManagementDetail
|
var query = from c in db.View_CQMS_InspectionManagementDetail
|
||||||
|
@ -1625,7 +1660,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//int i = 1;
|
//int i = 1;
|
||||||
string cNProfessionalId = (from x in Funs.DB.Base_CNProfessional where x.CNProfessionalCode == cNProfessionalCode select x.CNProfessionalId).FirstOrDefault();
|
string cNProfessionalId = (from x in db.Base_CNProfessional where x.CNProfessionalCode == cNProfessionalCode select x.CNProfessionalId).FirstOrDefault();
|
||||||
|
|
||||||
List<string> workNames = new List<string>();
|
List<string> workNames = new List<string>();
|
||||||
//专业下所有集合
|
//专业下所有集合
|
||||||
|
@ -1840,7 +1875,6 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void loadPressureInspection(string objType)
|
void loadPressureInspection(string objType)
|
||||||
{
|
{
|
||||||
var db = Funs.DB;
|
|
||||||
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
||||||
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
||||||
var list = new List<Model.Report_CQMS_MonthReportItem>();
|
var list = new List<Model.Report_CQMS_MonthReportItem>();
|
||||||
|
@ -1850,11 +1884,12 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
int Quantity1Sum = 0;
|
int Quantity1Sum = 0;
|
||||||
int Quantity2Sum = 0;
|
int Quantity2Sum = 0;
|
||||||
//加载所有单位
|
//加载所有单位
|
||||||
var units = from x in Funs.DB.Project_ProjectUnit
|
//var units = from x in db.Project_ProjectUnit
|
||||||
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
|
// join y in db.Base_Unit on x.UnitId equals y.UnitId
|
||||||
where x.ProjectId == this.CurrUser.LoginProjectId && (x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1)
|
// where x.ProjectId == this.CurrUser.LoginProjectId && (x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1)
|
||||||
orderby y.UnitCode
|
// orderby y.UnitCode
|
||||||
select new { x.UnitId, y.UnitName };
|
// select new { x.UnitId, y.UnitName };
|
||||||
|
units = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1).ToList();
|
||||||
foreach (var item in units)
|
foreach (var item in units)
|
||||||
{
|
{
|
||||||
var query = from c in db.Comprehensive_PressurePipe
|
var query = from c in db.Comprehensive_PressurePipe
|
||||||
|
@ -1916,7 +1951,6 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void loadPipingInspection(string objType)
|
void loadPipingInspection(string objType)
|
||||||
{
|
{
|
||||||
var db = Funs.DB;
|
|
||||||
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
||||||
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
||||||
var list = new List<Model.Report_CQMS_MonthReportItem>();
|
var list = new List<Model.Report_CQMS_MonthReportItem>();
|
||||||
|
@ -1927,11 +1961,12 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
int Quantity2Sum = 0;
|
int Quantity2Sum = 0;
|
||||||
|
|
||||||
//加载所有单位
|
//加载所有单位
|
||||||
var units = from x in Funs.DB.Project_ProjectUnit
|
//var units = from x in db.Project_ProjectUnit
|
||||||
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
|
// join y in db.Base_Unit on x.UnitId equals y.UnitId
|
||||||
where x.ProjectId == this.CurrUser.LoginProjectId && (x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1)
|
// where x.ProjectId == this.CurrUser.LoginProjectId && (x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1)
|
||||||
orderby y.UnitCode
|
// orderby y.UnitCode
|
||||||
select new { x.UnitId, y.UnitName };
|
// select new { x.UnitId, y.UnitName };
|
||||||
|
units = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1).ToList();
|
||||||
foreach (var item in units)
|
foreach (var item in units)
|
||||||
{
|
{
|
||||||
var query = from c in db.Comprehensive_PressurePipe
|
var query = from c in db.Comprehensive_PressurePipe
|
||||||
|
@ -1994,7 +2029,6 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void loadSpecialInspection(string objType)
|
void loadSpecialInspection(string objType)
|
||||||
{
|
{
|
||||||
var db = Funs.DB;
|
|
||||||
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
||||||
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
||||||
var list = new List<Model.Report_CQMS_MonthReportItem>();
|
var list = new List<Model.Report_CQMS_MonthReportItem>();
|
||||||
|
@ -2004,11 +2038,12 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
int Quantity1Sum = 0;
|
int Quantity1Sum = 0;
|
||||||
int Quantity2Sum = 0;
|
int Quantity2Sum = 0;
|
||||||
//加载所有单位
|
//加载所有单位
|
||||||
var units = from x in Funs.DB.Project_ProjectUnit
|
//var units = from x in db.Project_ProjectUnit
|
||||||
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
|
// join y in db.Base_Unit on x.UnitId equals y.UnitId
|
||||||
where x.ProjectId == this.CurrUser.LoginProjectId && (x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1)
|
// where x.ProjectId == this.CurrUser.LoginProjectId && (x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1)
|
||||||
orderby y.UnitCode
|
// orderby y.UnitCode
|
||||||
select new { x.UnitId, y.UnitName };
|
// select new { x.UnitId, y.UnitName };
|
||||||
|
units = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1).ToList();
|
||||||
foreach (var item in units)
|
foreach (var item in units)
|
||||||
{
|
{
|
||||||
var query = from c in db.Comprehensive_SpecialEquipment
|
var query = from c in db.Comprehensive_SpecialEquipment
|
||||||
|
@ -2086,12 +2121,13 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
{
|
{
|
||||||
projectStartDate = project.StartDate.Value;
|
projectStartDate = project.StartDate.Value;
|
||||||
}
|
}
|
||||||
var units = from x in Funs.DB.Project_ProjectUnit
|
//var units = from x in db.Project_ProjectUnit
|
||||||
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
|
// join y in db.Base_Unit on x.UnitId equals y.UnitId
|
||||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitType == BLL.Const.ProjectUnitType_2
|
// where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitType == BLL.Const.ProjectUnitType_2
|
||||||
orderby y.UnitCode
|
// orderby y.UnitCode
|
||||||
select new { x.UnitId, y.UnitName };
|
// select new { x.UnitId, y.UnitName };
|
||||||
var db = Funs.DB;
|
units = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2).ToList();
|
||||||
|
|
||||||
foreach (var item in units)
|
foreach (var item in units)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -2171,7 +2207,6 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void loadQualityInspection(string objType)
|
void loadQualityInspection(string objType)
|
||||||
{
|
{
|
||||||
var db = Funs.DB;
|
|
||||||
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
||||||
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
||||||
var list = new List<Model.Report_CQMS_MonthReportItem>();
|
var list = new List<Model.Report_CQMS_MonthReportItem>();
|
||||||
|
@ -2181,11 +2216,12 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
int Quantity2Sum = 0;
|
int Quantity2Sum = 0;
|
||||||
int ClosedCountSum = 0;
|
int ClosedCountSum = 0;
|
||||||
//加载所有单位
|
//加载所有单位
|
||||||
var units = from x in Funs.DB.Project_ProjectUnit
|
//var units = from x in db.Project_ProjectUnit
|
||||||
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
|
// join y in db.Base_Unit on x.UnitId equals y.UnitId
|
||||||
where x.ProjectId == this.CurrUser.LoginProjectId && (x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1)
|
// where x.ProjectId == this.CurrUser.LoginProjectId && (x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1)
|
||||||
orderby y.UnitCode
|
// orderby y.UnitCode
|
||||||
select new { x.UnitId, y.UnitName };
|
// select new { x.UnitId, y.UnitName };
|
||||||
|
units = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1).ToList();
|
||||||
foreach (var item in units)
|
foreach (var item in units)
|
||||||
{
|
{
|
||||||
var query = from c in db.Check_CheckControl
|
var query = from c in db.Check_CheckControl
|
||||||
|
@ -2264,7 +2300,6 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void loadSpecialCheck(string objType)
|
void loadSpecialCheck(string objType)
|
||||||
{
|
{
|
||||||
var db = Funs.DB;
|
|
||||||
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
||||||
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
||||||
var list = new List<Model.Report_CQMS_MonthReportItem>();
|
var list = new List<Model.Report_CQMS_MonthReportItem>();
|
||||||
|
@ -2330,7 +2365,6 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void loadFileReport(string objType)
|
void loadFileReport(string objType)
|
||||||
{
|
{
|
||||||
var db = Funs.DB;
|
|
||||||
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
||||||
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
||||||
var list = new List<Model.Report_CQMS_MonthReportItem>();
|
var list = new List<Model.Report_CQMS_MonthReportItem>();
|
||||||
|
@ -2341,11 +2375,12 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
int Quantity3Sum = 0;
|
int Quantity3Sum = 0;
|
||||||
int Quantity4Sum = 0;
|
int Quantity4Sum = 0;
|
||||||
//加载所有单位
|
//加载所有单位
|
||||||
var units = from x in Funs.DB.Project_ProjectUnit
|
//var units = from x in db.Project_ProjectUnit
|
||||||
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
|
// join y in db.Base_Unit on x.UnitId equals y.UnitId
|
||||||
where x.ProjectId == this.CurrUser.LoginProjectId && (x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1)
|
// where x.ProjectId == this.CurrUser.LoginProjectId && (x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1)
|
||||||
orderby y.UnitCode
|
// orderby y.UnitCode
|
||||||
select new { x.UnitId, y.UnitName };
|
// select new { x.UnitId, y.UnitName };
|
||||||
|
units = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1).ToList();
|
||||||
foreach (var item in units)
|
foreach (var item in units)
|
||||||
{
|
{
|
||||||
var query = from c in db.Comprehensive_DataReceivingDoc
|
var query = from c in db.Comprehensive_DataReceivingDoc
|
||||||
|
@ -2866,8 +2901,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
}
|
}
|
||||||
if (detailLists.Count > 0)
|
if (detailLists.Count > 0)
|
||||||
{
|
{
|
||||||
Funs.DB.Report_CqmsTarget.InsertAllOnSubmit(detailLists);
|
db.Report_CqmsTarget.InsertAllOnSubmit(detailLists);
|
||||||
Funs.DB.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2900,8 +2935,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
}
|
}
|
||||||
if (detailLists.Count > 0)
|
if (detailLists.Count > 0)
|
||||||
{
|
{
|
||||||
Funs.DB.Report_Construction_Plan.InsertAllOnSubmit(detailLists);
|
db.Report_Construction_Plan.InsertAllOnSubmit(detailLists);
|
||||||
Funs.DB.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -2936,8 +2971,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
}
|
}
|
||||||
if (detailLists.Count > 0)
|
if (detailLists.Count > 0)
|
||||||
{
|
{
|
||||||
Funs.DB.Report_Construction_Plan.InsertAllOnSubmit(detailLists);
|
db.Report_Construction_Plan.InsertAllOnSubmit(detailLists);
|
||||||
Funs.DB.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2971,8 +3006,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
}
|
}
|
||||||
if (detailLists.Count > 0)
|
if (detailLists.Count > 0)
|
||||||
{
|
{
|
||||||
Funs.DB.Report_Construction_Plan.InsertAllOnSubmit(detailLists);
|
db.Report_Construction_Plan.InsertAllOnSubmit(detailLists);
|
||||||
Funs.DB.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3005,8 +3040,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
}
|
}
|
||||||
if (detailLists.Count > 0)
|
if (detailLists.Count > 0)
|
||||||
{
|
{
|
||||||
Funs.DB.Report_Construction_Plan.InsertAllOnSubmit(detailLists);
|
db.Report_Construction_Plan.InsertAllOnSubmit(detailLists);
|
||||||
Funs.DB.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -3041,8 +3076,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
}
|
}
|
||||||
if (detailLists.Count > 0)
|
if (detailLists.Count > 0)
|
||||||
{
|
{
|
||||||
Funs.DB.Report_Construction_Plan.InsertAllOnSubmit(detailLists);
|
db.Report_Construction_Plan.InsertAllOnSubmit(detailLists);
|
||||||
Funs.DB.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -3077,8 +3112,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
}
|
}
|
||||||
if (detailLists.Count > 0)
|
if (detailLists.Count > 0)
|
||||||
{
|
{
|
||||||
Funs.DB.Report_Construction_Plan.InsertAllOnSubmit(detailLists);
|
db.Report_Construction_Plan.InsertAllOnSubmit(detailLists);
|
||||||
Funs.DB.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -3114,8 +3149,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
}
|
}
|
||||||
if (detailLists.Count > 0)
|
if (detailLists.Count > 0)
|
||||||
{
|
{
|
||||||
Funs.DB.Report_Construction_Plan.InsertAllOnSubmit(detailLists);
|
db.Report_Construction_Plan.InsertAllOnSubmit(detailLists);
|
||||||
Funs.DB.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -3178,8 +3213,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
model8.ContentText = txtAre8.Text;
|
model8.ContentText = txtAre8.Text;
|
||||||
txtContentList.Add(model8);
|
txtContentList.Add(model8);
|
||||||
#endregion
|
#endregion
|
||||||
Funs.DB.Report_TextBoxContent.InsertAllOnSubmit(txtContentList);
|
db.Report_TextBoxContent.InsertAllOnSubmit(txtContentList);
|
||||||
Funs.DB.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -3211,8 +3246,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
}
|
}
|
||||||
if (detailLists.Count > 0)
|
if (detailLists.Count > 0)
|
||||||
{
|
{
|
||||||
Funs.DB.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
db.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
||||||
Funs.DB.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -3249,8 +3284,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
}
|
}
|
||||||
if (detailLists.Count > 0)
|
if (detailLists.Count > 0)
|
||||||
{
|
{
|
||||||
Funs.DB.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
db.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
||||||
Funs.DB.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void saveSbInspection() //检验批统计:设备
|
void saveSbInspection() //检验批统计:设备
|
||||||
|
@ -3283,8 +3318,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
}
|
}
|
||||||
if (detailLists.Count > 0)
|
if (detailLists.Count > 0)
|
||||||
{
|
{
|
||||||
Funs.DB.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
db.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
||||||
Funs.DB.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void saveGDInspection() //检验批统计:管道
|
void saveGDInspection() //检验批统计:管道
|
||||||
|
@ -3317,8 +3352,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
}
|
}
|
||||||
if (detailLists.Count > 0)
|
if (detailLists.Count > 0)
|
||||||
{
|
{
|
||||||
Funs.DB.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
db.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
||||||
Funs.DB.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3352,8 +3387,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
}
|
}
|
||||||
if (detailLists.Count > 0)
|
if (detailLists.Count > 0)
|
||||||
{
|
{
|
||||||
Funs.DB.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
db.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
||||||
Funs.DB.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void saveYBInspection() //检验批统计:仪表
|
void saveYBInspection() //检验批统计:仪表
|
||||||
|
@ -3386,8 +3421,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
}
|
}
|
||||||
if (detailLists.Count > 0)
|
if (detailLists.Count > 0)
|
||||||
{
|
{
|
||||||
Funs.DB.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
db.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
||||||
Funs.DB.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void saveFFInspection() //检验批统计:防腐
|
void saveFFInspection() //检验批统计:防腐
|
||||||
|
@ -3420,8 +3455,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
}
|
}
|
||||||
if (detailLists.Count > 0)
|
if (detailLists.Count > 0)
|
||||||
{
|
{
|
||||||
Funs.DB.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
db.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
||||||
Funs.DB.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void saveXFInspection() //检验批统计:消防
|
void saveXFInspection() //检验批统计:消防
|
||||||
|
@ -3454,8 +3489,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
}
|
}
|
||||||
if (detailLists.Count > 0)
|
if (detailLists.Count > 0)
|
||||||
{
|
{
|
||||||
Funs.DB.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
db.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
||||||
Funs.DB.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void saveInspectionDataInspection()
|
void saveInspectionDataInspection()
|
||||||
|
@ -3490,8 +3525,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
}
|
}
|
||||||
if (detailLists.Count > 0)
|
if (detailLists.Count > 0)
|
||||||
{
|
{
|
||||||
Funs.DB.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
db.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
||||||
Funs.DB.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3525,8 +3560,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
}
|
}
|
||||||
if (detailLists.Count > 0)
|
if (detailLists.Count > 0)
|
||||||
{
|
{
|
||||||
Funs.DB.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
db.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
||||||
Funs.DB.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3560,8 +3595,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
}
|
}
|
||||||
if (detailLists.Count > 0)
|
if (detailLists.Count > 0)
|
||||||
{
|
{
|
||||||
Funs.DB.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
db.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
||||||
Funs.DB.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3595,8 +3630,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
}
|
}
|
||||||
if (detailLists.Count > 0)
|
if (detailLists.Count > 0)
|
||||||
{
|
{
|
||||||
Funs.DB.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
db.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
||||||
Funs.DB.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3629,8 +3664,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
}
|
}
|
||||||
if (detailLists.Count > 0)
|
if (detailLists.Count > 0)
|
||||||
{
|
{
|
||||||
Funs.DB.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
db.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
||||||
Funs.DB.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -3665,8 +3700,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
}
|
}
|
||||||
if (detailLists.Count > 0)
|
if (detailLists.Count > 0)
|
||||||
{
|
{
|
||||||
Funs.DB.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
db.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
||||||
Funs.DB.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -3700,8 +3735,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
}
|
}
|
||||||
if (detailLists.Count > 0)
|
if (detailLists.Count > 0)
|
||||||
{
|
{
|
||||||
Funs.DB.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
db.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
||||||
Funs.DB.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -3736,8 +3771,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
}
|
}
|
||||||
if (detailLists.Count > 0)
|
if (detailLists.Count > 0)
|
||||||
{
|
{
|
||||||
Funs.DB.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
db.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
||||||
Funs.DB.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -3771,8 +3806,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
}
|
}
|
||||||
if (detailLists.Count > 0)
|
if (detailLists.Count > 0)
|
||||||
{
|
{
|
||||||
Funs.DB.Report_RowMaterialProblem.InsertAllOnSubmit(detailLists);
|
db.Report_RowMaterialProblem.InsertAllOnSubmit(detailLists);
|
||||||
Funs.DB.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3804,8 +3839,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
}
|
}
|
||||||
if (detailLists.Count > 0)
|
if (detailLists.Count > 0)
|
||||||
{
|
{
|
||||||
Funs.DB.Report_ConstructionProblems.InsertAllOnSubmit(detailLists);
|
db.Report_ConstructionProblems.InsertAllOnSubmit(detailLists);
|
||||||
Funs.DB.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3836,8 +3871,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
}
|
}
|
||||||
if (detailLists.Count > 0)
|
if (detailLists.Count > 0)
|
||||||
{
|
{
|
||||||
Funs.DB.Report_NextQualityControl.InsertAllOnSubmit(detailLists);
|
db.Report_NextQualityControl.InsertAllOnSubmit(detailLists);
|
||||||
Funs.DB.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -3894,8 +3929,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
imgage6.ImageUrl = imgPhoto6.ImageUrl.Substring(imgPhoto6.ImageUrl.IndexOf("/") + 1);
|
imgage6.ImageUrl = imgPhoto6.ImageUrl.Substring(imgPhoto6.ImageUrl.IndexOf("/") + 1);
|
||||||
ImageLists.Add(imgage6);
|
ImageLists.Add(imgage6);
|
||||||
|
|
||||||
Funs.DB.Report_TextBoxContent.InsertAllOnSubmit(ImageLists);
|
db.Report_TextBoxContent.InsertAllOnSubmit(ImageLists);
|
||||||
Funs.DB.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -12,7 +12,7 @@
|
||||||
<appSettings>
|
<appSettings>
|
||||||
<!--连接字符串-->
|
<!--连接字符串-->
|
||||||
<!--<add key="ConnectionString" value="Server=.;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>-->
|
<!--<add key="ConnectionString" value="Server=.;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>-->
|
||||||
<add key="ConnectionString" value="Server=.;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>
|
<add key="ConnectionString" value="Server=.\SQL2012;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>
|
||||||
<!--系统名称-->
|
<!--系统名称-->
|
||||||
<add key="SystemName" value="智慧施工管理信息系统V1.0"/>
|
<add key="SystemName" value="智慧施工管理信息系统V1.0"/>
|
||||||
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/Images/;"/>
|
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/Images/;"/>
|
||||||
|
|
Loading…
Reference in New Issue