20240508 共检通知单复制功能
This commit is contained in:
@@ -114,20 +114,10 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
|
||||
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
|
||||
cellStyle.WrapText = true;//自动换行
|
||||
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);
|
||||
|
||||
@@ -287,20 +287,10 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
|
||||
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
|
||||
cellStyle.WrapText = true;//自动换行
|
||||
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);
|
||||
|
||||
@@ -288,20 +288,10 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
|
||||
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
|
||||
cellStyle.WrapText = true;//自动换行
|
||||
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);
|
||||
|
||||
@@ -21,7 +21,8 @@
|
||||
<f:Toolbar ID="ToolSearch" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpZhType" runat="server" Label="类别" LabelAlign="Right" EnableEdit="true" LabelWidth="110px" AutoPostBack="true" OnSelectedIndexChanged="drpZhType_SelectedIndexChanged">
|
||||
<f:ListItem Value="1" Text="专业" Selected="true" />
|
||||
<f:ListItem Value="" Text="-请选择-" />
|
||||
<f:ListItem Value="1" Text="专业" />
|
||||
<f:ListItem Value="2" Text="单位名称" />
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpCNProfessional" runat="server" Label="" LabelAlign="Right" EnableEdit="true">
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessional, false);//专业
|
||||
drpCNProfessional.Items.Insert(0, new FineUIPro.ListItem("- 请选择专业 -", BLL.Const._Null));
|
||||
}
|
||||
else
|
||||
else if(drpZhType.SelectedValue.Equals("2"))
|
||||
{
|
||||
BLL.UnitService.InitUnitDownList(this.drpCNProfessional, this.CurrUser.LoginProjectId, false);//施工分包商
|
||||
drpCNProfessional.Items.Insert(0, new FineUIPro.ListItem("- 请选择单位名称 -", BLL.Const._Null));
|
||||
@@ -73,14 +73,20 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
//统计所给时间段的合格数量
|
||||
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true);
|
||||
}
|
||||
else
|
||||
else if (ZyType == "2")
|
||||
{
|
||||
//统计所给时间段的全部数量
|
||||
managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, false);
|
||||
//统计所给时间段的合格数量
|
||||
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
//统计所给事件段的全部数量
|
||||
managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, false);
|
||||
//统计所给事件段的合格数量
|
||||
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, true);
|
||||
}
|
||||
Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
Statistics.SunNumber = managementListSunNumber.Count();
|
||||
Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
|
||||
@@ -108,13 +114,20 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
//统计所给事件段的合格数量
|
||||
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NextDate, true);
|
||||
}
|
||||
else
|
||||
else if (ZyType == "2")
|
||||
{
|
||||
//统计所给事件段的全部数量
|
||||
managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NextDate, false);
|
||||
//统计所给事件段的合格数量
|
||||
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NextDate, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
//统计所给事件段的全部数量
|
||||
managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, false);
|
||||
//统计所给事件段的合格数量
|
||||
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, true);
|
||||
}
|
||||
Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", NextDate);
|
||||
Statistics.SunNumber = managementListSunNumber.Count();
|
||||
Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
|
||||
@@ -142,7 +155,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true);
|
||||
|
||||
}
|
||||
else
|
||||
else if(ZyType=="2")
|
||||
{
|
||||
//统计所给事件段的全部数量
|
||||
managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, false);
|
||||
@@ -150,6 +163,13 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
//统计所给事件段的全部数量
|
||||
managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, false);
|
||||
//统计所给事件段的合格数量
|
||||
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, true);
|
||||
}
|
||||
|
||||
|
||||
Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
@@ -178,13 +198,20 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
//统计所给事件段的合格数量
|
||||
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, true);
|
||||
}
|
||||
else
|
||||
else if (ZyType == "2")
|
||||
{
|
||||
//统计所给事件段的全部数量
|
||||
managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, false);
|
||||
//统计所给事件段的合格数量
|
||||
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
//统计所给事件段的全部数量
|
||||
managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, false);
|
||||
//统计所给事件段的合格数量
|
||||
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, true);
|
||||
}
|
||||
Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", NewDate);
|
||||
Statistics.SunNumber = managementListSunNumber.Count();
|
||||
Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
|
||||
@@ -226,7 +253,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
//统计所给事件段的合格数量
|
||||
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true);
|
||||
}
|
||||
else
|
||||
else if(ZyType=="2")
|
||||
{
|
||||
//统计所给事件段的全部数量
|
||||
managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, false);
|
||||
@@ -234,6 +261,13 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
//统计所给事件段的全部数量
|
||||
managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, false);
|
||||
//统计所给事件段的合格数量
|
||||
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, true);
|
||||
}
|
||||
Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
Statistics.SunNumber = managementListSunNumber.Count();
|
||||
Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
|
||||
@@ -260,12 +294,19 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
//统计所给事件段的合格数量
|
||||
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, true);
|
||||
}
|
||||
else
|
||||
else if(ZyType=="2")
|
||||
{ //统计所给事件段的全部数量
|
||||
managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, false);
|
||||
//统计所给事件段的合格数量
|
||||
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
//统计所给事件段的全部数量
|
||||
managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, false);
|
||||
//统计所给事件段的合格数量
|
||||
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, true);
|
||||
}
|
||||
Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", NewDate);
|
||||
Statistics.SunNumber = managementListSunNumber.Count();
|
||||
Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
|
||||
@@ -333,13 +374,20 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, EndDate, true);
|
||||
|
||||
}
|
||||
else
|
||||
else if(ZyType=="2")
|
||||
{
|
||||
//统计所给时间段的全部数量
|
||||
managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, EndDate, false);
|
||||
//统计所给时间段的合格数量
|
||||
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, EndDate, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
//统计所给事件段的全部数量
|
||||
managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, false);
|
||||
//统计所给事件段的合格数量
|
||||
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, true);
|
||||
}
|
||||
Statistics.CheckDate = string.Format("{0:yyyy-MM-dd}", StartDate) + " 至 " + string.Format("{0:yyyy-MM-dd}", EndDate);
|
||||
Statistics.SunNumber = managementListSunNumber.Count();
|
||||
Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
|
||||
@@ -515,7 +563,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessional, false);//专业
|
||||
drpCNProfessional.Items.Insert(0, new FineUIPro.ListItem("- 请选择专业 -", BLL.Const._Null));
|
||||
}
|
||||
else
|
||||
else if(drpZhType.SelectedValue.Equals("2"))
|
||||
{
|
||||
BLL.UnitService.InitUnitDownList(this.drpCNProfessional, this.CurrUser.LoginProjectId, false);//施工分包商
|
||||
drpCNProfessional.Items.Insert(0, new FineUIPro.ListItem("- 请选择单位 -", BLL.Const._Null));
|
||||
|
||||
@@ -105,11 +105,13 @@
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<Items>
|
||||
<f:MenuButton ID="btnMenuModify" EnablePostBack="true" runat="server" Text="修改" Icon="Pencil" OnClick="btnMenuModify_Click" Hidden="true">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuDel" EnablePostBack="true" runat="server" Icon="Delete" Text="删除" ConfirmText="确定删除当前数据?" OnClick="btnMenuDel_Click" Hidden="true">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnPrinter" EnablePostBack="true" runat="server"
|
||||
Text="导出" Icon="Printer" OnClick="btnPrinter_Click" EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuDel" EnablePostBack="true" runat="server" Icon="Delete" Text="删除" ConfirmText="确定删除当前数据?" OnClick="btnMenuDel_Click" Hidden="true">
|
||||
<f:MenuButton ID="btnMenuCopy" EnablePostBack="true" runat="server" Icon="DatabaseCopy" Text="复制" ConfirmText="确定复制当前数据?" OnClick="btnMenuCopy_Click" Hidden="true">
|
||||
</f:MenuButton>
|
||||
</Items>
|
||||
</f:Menu>
|
||||
|
||||
@@ -8,6 +8,7 @@ using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
{
|
||||
@@ -185,7 +186,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
}
|
||||
//合格的情况下不允许修改
|
||||
var model = Funs.DB.ProcessControl_InspectionManagement.FirstOrDefault(x => x.InspectionId == Grid1.SelectedRowID);
|
||||
if (model.IsOnceQualified==true)
|
||||
if (model.IsOnceQualified == true)
|
||||
{
|
||||
Alert.ShowInTop("该共检通知单已合格,不允许修改!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
@@ -253,6 +254,10 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
{
|
||||
this.btnMenuDel.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnSave))
|
||||
{
|
||||
this.btnMenuCopy.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -311,20 +316,10 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
|
||||
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
|
||||
cellStyle.WrapText = true;//自动换行
|
||||
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);
|
||||
@@ -435,17 +430,17 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
var units = (from x in db.Base_Unit
|
||||
join y in db.Project_ProjectUnit
|
||||
on x.UnitId equals y.UnitId
|
||||
where y.ProjectId==this.CurrUser.LoginProjectId && y.UnitType== BLL.Const.ProjectUnitType_4
|
||||
where y.ProjectId == this.CurrUser.LoginProjectId && y.UnitType == BLL.Const.ProjectUnitType_4
|
||||
orderby x.UnitName
|
||||
select x).FirstOrDefault();
|
||||
if (units!=null)
|
||||
if (units != null)
|
||||
{
|
||||
bookmarkUnitName.Text = units.UnitName;
|
||||
}
|
||||
}
|
||||
var projectModel = db.Base_Project.Where(x => x.ProjectId == this.CurrUser.LoginProjectId).FirstOrDefault();
|
||||
var inspectionModel = db.ProcessControl_InspectionManagement.Where(x => x.InspectionId == Id).FirstOrDefault();
|
||||
|
||||
|
||||
//项目编号
|
||||
Bookmark bookmarkProjectCode = doc.Range.Bookmarks["projectCode"];
|
||||
if (bookmarkProjectCode != null)
|
||||
@@ -575,7 +570,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
builder.StartTable();
|
||||
builder.CellFormat.Borders.LineStyle = Aspose.Words.LineStyle.Single;
|
||||
builder.CellFormat.Borders.Color = System.Drawing.Color.Black;
|
||||
|
||||
|
||||
builder.Bold = false;
|
||||
builder.RowFormat.Height = 20;
|
||||
builder.Font.Size = 10;
|
||||
@@ -591,7 +586,8 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
{
|
||||
builder.RowFormat.Height = 200 / ManagementDetaillList.Count;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
builder.RowFormat.Height = 20;
|
||||
}
|
||||
builder.CellFormat.Borders.Left.LineWidth = 1;
|
||||
@@ -602,7 +598,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
builder.CellFormat.Width = 156;
|
||||
builder.Write(ConvertControlPointType(item.ControlPointType));
|
||||
builder.CellFormat.Borders.Left.LineWidth = 0;
|
||||
// 控制点等级
|
||||
// 控制点等级
|
||||
builder.InsertCell();
|
||||
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None;
|
||||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
@@ -612,11 +608,12 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
|
||||
var ControlPointType = ConvertClass(item.ControlPointType);
|
||||
#region 控制点等级
|
||||
if (ControlPointType.Contains("A") )
|
||||
if (ControlPointType.Contains("A"))
|
||||
{
|
||||
builder.Write("■A ");
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
builder.Write("□A ");
|
||||
}
|
||||
if (ControlPointType.Contains("B"))
|
||||
@@ -838,8 +835,8 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
builder.Write("注:如果业主有规定,执行业主的规定。 ");
|
||||
#endregion
|
||||
|
||||
|
||||
doc.Save(newUrl);
|
||||
|
||||
doc.Save(newUrl);
|
||||
string fileName = Path.GetFileName(newUrl);
|
||||
FileInfo info = new FileInfo(newUrl);
|
||||
long fileSize = info.Length;
|
||||
@@ -860,7 +857,8 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
}
|
||||
}
|
||||
|
||||
public class WorkBranchList {
|
||||
public class WorkBranchList
|
||||
{
|
||||
public string UnitWorkId { get; set; }
|
||||
public string Branch { get; set; }
|
||||
}
|
||||
@@ -974,9 +972,84 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
uname = CarryUnitIds.ToString();
|
||||
}
|
||||
return uname;
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 复制
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuCopy_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
var inspection = BLL.InspectionManagementService.GetInspectionManagementById(this.Grid1.SelectedRowID);
|
||||
if (inspection != null)
|
||||
{
|
||||
Model.ProcessControl_InspectionManagement newInspection = new Model.ProcessControl_InspectionManagement();
|
||||
newInspection.InspectionId = SQLHelper.GetNewID(typeof(Model.ProcessControl_InspectionManagement));
|
||||
newInspection.ProjectId = this.CurrUser.LoginProjectId;
|
||||
newInspection.UnitId = inspection.UnitId;
|
||||
newInspection.CNProfessionalId = inspection.CNProfessionalId;
|
||||
newInspection.InspectionCode = inspection.InspectionCode;
|
||||
newInspection.UnitWorkId = inspection.UnitWorkId;
|
||||
newInspection.Branch = inspection.Branch;
|
||||
newInspection.ControlPointType = inspection.ControlPointType;
|
||||
newInspection.AcceptanceSite = inspection.AcceptanceSite;
|
||||
newInspection.IsOnceQualified = inspection.IsOnceQualified;
|
||||
newInspection.InspectionDate = inspection.InspectionDate;
|
||||
newInspection.AttachUrl = inspection.AttachUrl;
|
||||
newInspection.CheckDate = inspection.CheckDate;
|
||||
newInspection.CheckMan = inspection.CheckMan;
|
||||
newInspection.UnqualifiedReason = inspection.UnqualifiedReason;
|
||||
|
||||
//通知单编号后有字母递增,无则加“a”
|
||||
string fisrtE = inspection.NoticeCode.Substring(0,inspection.NoticeCode.Length - 1);
|
||||
string lastE = inspection.NoticeCode.Substring(inspection.NoticeCode.Length - 1, 1);
|
||||
bool b = Regex.IsMatch(lastE, "[a-zA-Z]");
|
||||
if (b)
|
||||
{
|
||||
int x = (int)Convert.ToByte(Convert.ToChar(lastE));
|
||||
newInspection.NoticeCode = fisrtE + Convert.ToChar(x + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
newInspection.NoticeCode = inspection.NoticeCode + "a";
|
||||
}
|
||||
|
||||
newInspection.AcceptanceCheckMan = inspection.AcceptanceCheckMan;
|
||||
newInspection.ParentDivisionProjectId = inspection.ParentDivisionProjectId;
|
||||
newInspection.CompileMan = this.CurrUser.UserId;
|
||||
newInspection.CompileDate = DateTime.Now;
|
||||
newInspection.FileType = inspection.FileType;
|
||||
newInspection.AttachUrl2 = inspection.AttachUrl2;
|
||||
BLL.InspectionManagementService.AddInspectionManagement(newInspection);
|
||||
|
||||
var details = InspectionManagementDetailService.GetInspectionDetails(inspection.InspectionId);
|
||||
if (details.Count > 0)
|
||||
{
|
||||
foreach (var item in details)
|
||||
{
|
||||
Model.ProcessControl_InspectionManagementDetail newDetail = new Model.ProcessControl_InspectionManagementDetail();
|
||||
newDetail.InspectionDetailId = SQLHelper.GetNewID(typeof(Model.ProcessControl_InspectionManagementDetail));
|
||||
newDetail.InspectionId = newInspection.InspectionId;
|
||||
newDetail.UnitWorkId = item.UnitWorkId;
|
||||
newDetail.Branch = item.Branch;
|
||||
newDetail.ControlPointType = item.ControlPointType;
|
||||
newDetail.CreateDate = DateTime.Now;
|
||||
BLL.InspectionManagementDetailService.AddInspectionDetail(newDetail);
|
||||
}
|
||||
}
|
||||
ShowNotify("复制成功!");
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+44
-37
@@ -7,13 +7,11 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
{
|
||||
|
||||
|
||||
public partial class InspectionNotice
|
||||
{
|
||||
|
||||
namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
|
||||
|
||||
public partial class InspectionNotice {
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
@@ -22,7 +20,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
@@ -31,7 +29,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
@@ -40,7 +38,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
@@ -49,7 +47,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolSearch 控件。
|
||||
/// </summary>
|
||||
@@ -58,7 +56,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar ToolSearch;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpUnitWork 控件。
|
||||
/// </summary>
|
||||
@@ -67,7 +65,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUnitWork;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpCNProfessional 控件。
|
||||
/// </summary>
|
||||
@@ -76,7 +74,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpCNProfessional;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtStarTime 控件。
|
||||
/// </summary>
|
||||
@@ -85,7 +83,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtStarTime;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Label1 控件。
|
||||
/// </summary>
|
||||
@@ -94,7 +92,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label Label1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtEndTime 控件。
|
||||
/// </summary>
|
||||
@@ -103,7 +101,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtEndTime;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnSearch 控件。
|
||||
/// </summary>
|
||||
@@ -112,7 +110,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSearch;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnNew 控件。
|
||||
/// </summary>
|
||||
@@ -121,7 +119,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnOut 控件。
|
||||
/// </summary>
|
||||
@@ -130,7 +128,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnOut;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// lblPageIndex 控件。
|
||||
/// </summary>
|
||||
@@ -139,7 +137,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblPageIndex;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Label3 控件。
|
||||
/// </summary>
|
||||
@@ -148,7 +146,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label3;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// lbtnFileUrl 控件。
|
||||
/// </summary>
|
||||
@@ -157,7 +155,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.LinkButton lbtnFileUrl;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
@@ -166,7 +164,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// </summary>
|
||||
@@ -175,7 +173,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
@@ -184,7 +182,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
@@ -193,7 +191,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuModify 控件。
|
||||
/// </summary>
|
||||
@@ -202,16 +200,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuModify;
|
||||
|
||||
/// <summary>
|
||||
/// btnPrinter 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnPrinter;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDel 控件。
|
||||
/// </summary>
|
||||
@@ -220,5 +209,23 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuDel;
|
||||
|
||||
/// <summary>
|
||||
/// btnPrinter 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnPrinter;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuCopy 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuCopy;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true);//施工分包商
|
||||
BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true);//专业
|
||||
UserService.InitUserProjectIdUnitTypeDropDownList(this.drpAcceptanceCheckMan, this.CurrUser.LoginProjectId, string.Empty, false);
|
||||
//UserService.InitUserNameProjectIdUnitTypeDropDownList(this.drpAcceptanceCheckMan, this.CurrUser.LoginProjectId, string.Empty, false);
|
||||
this.hdInspectionNoticeId.Text = Request.Params["inspectionId"];
|
||||
if (!string.IsNullOrEmpty(Request.Params["View"]))
|
||||
{
|
||||
|
||||
@@ -272,20 +272,10 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
|
||||
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
|
||||
cellStyle.WrapText = true;//自动换行
|
||||
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);
|
||||
|
||||
@@ -259,20 +259,10 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
|
||||
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
|
||||
cellStyle.WrapText = true;//自动换行
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user