20260209 压力管道安装质量证明

This commit is contained in:
2026-02-09 16:54:57 +08:00
parent 4b57430c3b
commit b518c2f850
7 changed files with 712 additions and 273 deletions
@@ -39,14 +39,84 @@
<Items>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnAdd" runat="server" Icon="Add" Text="增加" OnClick="btnAdd_Click"></f:Button>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ValidateForms="SimpleForm1"
OnClick="btnSave_Click">
</f:Button>
<%--<f:Button ID="btnAdd" runat="server" Icon="Add" Text="增加" OnClick="btnAdd_Click"></f:Button>--%>
<f:Button ID="btnPrint" Text="工业管道安装质量证明书打印" Icon="Printer" runat="server" OnClick="btnPrint_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="工业管道安装质量证明书" EnableCollapse="true"
<f:Form ID="SimpleForm1" ShowBorder="true" ShowHeader="false" AutoScroll="true" BodyPadding="10px"
runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Rows>
<f:FormRow>
<Items>
<f:TextBox ID="txtCertificateCode" runat="server" Label="编号" LabelAlign="Right" LabelWidth="170px" MaxLength="50"></f:TextBox>
</Items>
</f:FormRow>
<%--<f:FormRow>
<Items>
<f:TextBox ID="txtEngineeringName" runat="server" Label="工程名称" LabelAlign="Right" LabelWidth="170px" MaxLength="50" Required="true" ShowRedStar="true"></f:TextBox>
<f:TextBox ID="txtEngineeringCode" runat="server" Label="工程编号" LabelAlign="Right" LabelWidth="170px" MaxLength="50" Required="true" ShowRedStar="true"></f:TextBox>
</Items>
</f:FormRow>--%>
<f:FormRow>
<Items>
<f:TextBox ID="txtDeliveryUnit" runat="server" Label="交工单元名称" LabelAlign="Right" LabelWidth="170px" MaxLength="50"></f:TextBox>
<f:TextBox ID="txtDeliveryUnitCode" runat="server" Label="交工单元编号" LabelAlign="Right" LabelWidth="170px" MaxLength="50"></f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DatePicker ID="txtInstallStartDate" runat="server" Label="安装开工日期" LabelAlign="Right" LabelWidth="170px"></f:DatePicker>
<f:DatePicker ID="txtInstallEndDate" runat="server" Label="安装竣工日期" LabelAlign="Right" LabelWidth="170px"></f:DatePicker>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpPipelineLevel" runat="server" Label="管道级别" LabelAlign="Right" LabelWidth="170px" EnableEdit="true"></f:DropDownList>
<f:DropDownList ID="drpPipelineLength" runat="server" Label="管道长度" LabelAlign="Right" LabelWidth="170px" EnableEdit="true"></f:DropDownList>
<%--<f:TextBox ID="txtPipelineLevel" runat="server" Label="管道级别" LabelAlign="Right" LabelWidth="170px" MaxLength="50"></f:TextBox>--%>
<%--<f:TextBox ID="txtPipelineLength" runat="server" Label="管道长度" LabelAlign="Right" LabelWidth="170px" MaxLength="50"></f:TextBox>--%>
</Items>
</f:FormRow>
<%--<f:FormRow>
<Items>
<f:TextBox ID="txtDesignLicenseCode" runat="server" Label="压力管道设计许可证编号" LabelAlign="Right" LabelWidth="170px" MaxLength="50"></f:TextBox>
<f:TextBox ID="txtQualificationCertificateCode" runat="server" Label="资质证书编号" LabelAlign="Right" LabelWidth="170px" MaxLength="50"></f:TextBox>
</Items>
</f:FormRow>--%>
<f:FormRow>
<Items>
<%--<f:TextBox ID="txtInstitutionalApprovalCertificate" runat="server" Label="无损检测机构核准证编号" LabelAlign="Right" LabelWidth="170px" MaxLength="50"></f:TextBox>--%>
<f:TextBox ID="txtDesignUnit" runat="server" Label="设计单位" LabelAlign="Right" LabelWidth="170px" MaxLength="50"></f:TextBox>
<f:TextBox ID="txtLosslessTestingAgency" runat="server" Label="无损检测机构" LabelAlign="Right" LabelWidth="170px" MaxLength="50"></f:TextBox>
</Items>
</f:FormRow>
<%--<f:FormRow>
<Items>
<f:TextBox ID="txtSupervisoryAndInspectionAgency" runat="server" Label="监理单位" LabelAlign="Right" LabelWidth="170px" MaxLength="50"></f:TextBox>
</Items>
</f:FormRow>--%>
<f:FormRow>
<Items>
<f:TextBox ID="txtInstallationInspection" runat="server" Label="监检机构" LabelAlign="Right" LabelWidth="170px" MaxLength="50"></f:TextBox>
<f:TextBox ID="txtConstructionUnit" runat="server" Label="建设单位(使用单位)" LabelAlign="Right" LabelWidth="170px" MaxLength="50"></f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtSpecialEquipmentProductionLicenseCode" runat="server" Label="特种设备安装许可证编号" LabelAlign="Right" LabelWidth="170px" MaxLength="50"></f:TextBox>
<%--<f:TextArea ID="txtRemark" runat="server" Label="备注" LabelAlign="Right" LabelWidth="170px" MaxLength="500"></f:TextArea>--%>
</Items>
</f:FormRow>
</Rows>
</f:Form>
<%--<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="工业管道安装质量证明书" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="CertificateId" AllowCellEditing="true"
EnableColumnLines="true" ClicksToEdit="1" DataIDField="CertificateId" AllowSorting="true"
SortField="CertificateCode" SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true"
@@ -58,12 +128,6 @@
<f:RenderField HeaderText="质量证明书编号" ColumnID="CertificateCode" DataField="CertificateCode" SortField="CertificateCode"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="140px">
</f:RenderField>
<%-- <f:RenderField HeaderText="工程名称" ColumnID="EngineeringName" DataField="EngineeringName" SortField="EngineeringName"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="160px">
</f:RenderField>
<f:RenderField HeaderText="工程编号" ColumnID="EngineeringCode" DataField="EngineeringCode" SortField="EngineeringCode"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" MinWidth="140px">
</f:RenderField>--%>
<f:RenderField HeaderText="交工单元名称" ColumnID="DeliveryUnit" DataField="DeliveryUnit" SortField="DeliveryUnit"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" MinWidth="220px">
</f:RenderField>
@@ -94,18 +158,6 @@
<f:RenderField HeaderText="建设单位(使用单位)" ColumnID="ConstructionUnit" DataField="ConstructionUnit" SortField="ConstructionUnit"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" MinWidth="150px">
</f:RenderField>
<%--<f:RenderField HeaderText="压力管道设计许可证编号" ColumnID="DesignLicenseCode" DataField="DesignLicenseCode" SortField="DesignLicenseCode"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" MinWidth="160px">
</f:RenderField>--%>
<%--<f:RenderField HeaderText="资质证书编号" ColumnID="QualificationCertificateCode" DataField="QualificationCertificateCode" SortField="QualificationCertificateCode"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" MinWidth="160px">
</f:RenderField>--%>
<%--<f:RenderField HeaderText="无损检测机构核准证编号" ColumnID="InstitutionalApprovalCertificate" DataField="InstitutionalApprovalCertificate" SortField="InstitutionalApprovalCertificate"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" MinWidth="160px">
</f:RenderField>--%>
<%--<f:RenderField HeaderText="特种设备安装许可证编号" ColumnID="SpecialEquipmentProductionLicenseCode" DataField="SpecialEquipmentProductionLicenseCode" SortField="SpecialEquipmentProductionLicenseCode"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" MinWidth="140px">
</f:RenderField>--%>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
@@ -123,35 +175,35 @@
<f:ListItem Text="25" Value="25" />
</f:DropDownList>
</PageItems>
</f:Grid>
</f:Grid>--%>
</Items>
</f:Panel>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="工业管道安装质量证明书" Hidden="true" EnableIFrame="true" EnableMaximize="true"
<%--<f:Window ID="Window1" Title="工业管道安装质量证明书" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="top" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="true"
Width="900px" Height="600px">
</f:Window>
</f:Window>--%>
<f:Window ID="WindowPrint" Title="打印工业管道安装质量证明书" Hidden="true" EnableIFrame="true" EnableMaximize="false"
Target="Top" EnableResize="true" runat="server" IsModal="true" Width="1024px"
Height="600px">
</f:Window>
<f:Menu ID="Menu1" runat="server">
<%--<f:Menu ID="Menu1" runat="server">
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
runat="server" Text="编辑" Icon="TableEdit">
</f:MenuButton>
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
ConfirmText="删除选中行?" ConfirmTarget="Top" runat="server" Text="删除" Icon="Delete">
</f:MenuButton>
</f:Menu>
</f:Menu>--%>
</form>
<script type="text/javascript">
<%--<script type="text/javascript">
var menuID = '<%= Menu1.ClientID %>';
// 返回false,来阻止浏览器右键菜单
function onRowContextMenu(event, rowId) {
F(menuID).show(); //showAt(event.pageX, event.pageY);
return false;
}
</script>
</script>--%>
</body>
</html>
@@ -13,6 +13,23 @@ namespace FineUIPro.Web.JGZL
{
public partial class IndustrialPipelineInstallationQualityCertificate : PageBase
{
#region 定义变量
/// <summary>
/// 主键
/// </summary>
private string CertificateId
{
get
{
return (string)ViewState["CertificateId"];
}
set
{
ViewState["CertificateId"] = value;
}
}
#endregion
#region 加载页面
/// <summary>
/// 加载页面
@@ -23,7 +40,7 @@ namespace FineUIPro.Web.JGZL
{
if (!IsPostBack)
{
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
//this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
this.drpProjectId.DataTextField = "ProjectCode";
this.drpProjectId.DataValueField = "ProjectId";
@@ -34,11 +51,110 @@ namespace FineUIPro.Web.JGZL
this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId;
this.InitTreeMenu();//加载树
this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue;
this.BindGrid();
//管道等级
this.drpPipelineLevel.DataTextField = "ISC_IsoName";
this.drpPipelineLevel.DataValueField = "ISC_IsoName";
this.drpPipelineLevel.DataSource = BLL.HJGL_PW_IsoInfoService.GetPipelineLevelList(this.drpProjectId.SelectedValue);
this.drpPipelineLevel.DataBind();
//管道长度
this.drpPipelineLength.DataTextField = "PipeLineLength";
this.drpPipelineLength.DataValueField = "PipeLineLength";
this.drpPipelineLength.DataSource = BLL.HJGL_PW_IsoInfoService.GetPipeLineLengthList(this.drpProjectId.SelectedValue);
this.drpPipelineLength.DataBind();
//this.BindGrid();
PageData();
}
}
#endregion
private void EmptyText()
{
txtCertificateCode.Text = string.Empty;
txtDeliveryUnit.Text = string.Empty;
txtDeliveryUnitCode.Text = string.Empty;
txtInstallStartDate.Text = string.Empty;
txtInstallEndDate.Text = string.Empty;
drpPipelineLevel.SelectedValue = BLL.Const._Null;
drpPipelineLength.SelectedValue = BLL.Const._Null;
txtDesignUnit.Text = string.Empty;
txtLosslessTestingAgency.Text = string.Empty;
txtInstallationInspection.Text = string.Empty;
txtConstructionUnit.Text = string.Empty;
txtSpecialEquipmentProductionLicenseCode.Text = string.Empty;
}
private void PageData()
{
EmptyText();
string projectId = this.tvControlItem.SelectedNodeID;
if (!string.IsNullOrEmpty(projectId))
{
var pro = BLL.Base_ProjectService.GetProjectByProjectId(projectId);
if (pro != null)
{
var report = BLL.IndustrialPipelineInstallationQualityCertificateService.GetIndustrialPipelineInstallationQualityCertificateByProjectId(projectId);
if (report != null)
{
this.CertificateId = report.CertificateId;
this.txtCertificateCode.Text = report.CertificateCode;
if (!string.IsNullOrEmpty(report.SpecialEquipmentProductionLicenseCode))
{
this.txtSpecialEquipmentProductionLicenseCode.Text = report.SpecialEquipmentProductionLicenseCode;
}
else
{
this.txtSpecialEquipmentProductionLicenseCode.Text = "TS3833339-2028";
}
//this.txtEngineeringName.Text = report.EngineeringName;
//this.txtEngineeringCode.Text = report.EngineeringCode;
this.txtDeliveryUnit.Text = report.DeliveryUnit;
this.txtDeliveryUnitCode.Text = report.DeliveryUnitCode;
this.txtInstallStartDate.Text = report.InstallStartDate.HasValue ? string.Format("{0:yyyy-MM-dd}", report.InstallStartDate) : "";
this.txtInstallEndDate.Text = report.InstallEndDate.HasValue ? string.Format("{0:yyyy-MM-dd}", report.InstallEndDate) : "";
if (!string.IsNullOrEmpty(report.PipelineLevel))
{
this.drpPipelineLevel.SelectedValue = report.PipelineLevel;
}
if (!string.IsNullOrEmpty(report.PipelineLength))
{
this.drpPipelineLength.SelectedValue = report.PipelineLength;
}
//this.txtPipelineLevel.Text = report.PipelineLevel;
//this.txtPipelineLength.Text = report.PipelineLength;
//this.txtDesignLicenseCode.Text = report.DesignLicenseCode;
//this.txtQualificationCertificateCode.Text = report.QualificationCertificateCode;
//this.txtInstitutionalApprovalCertificate.Text = report.InstitutionalApprovalCertificate;
this.txtDesignUnit.Text = report.DesignUnit;
//this.txtSupervisoryAndInspectionAgency.Text = report.SupervisoryAndInspectionAgency;
this.txtLosslessTestingAgency.Text = report.LosslessTestingAgency;
if (!string.IsNullOrEmpty(report.InstallationInspection))
{
this.txtInstallationInspection.Text = report.InstallationInspection;
}
else
{
this.txtInstallationInspection.Text = "浙江省特种设备研究院";
}
if (!string.IsNullOrEmpty(report.ConstructionUnit))
{
this.txtConstructionUnit.Text = report.ConstructionUnit;
}
else
{
this.txtConstructionUnit.Text = "浙江石油化工有限公司";
}
}
else
{
this.txtInstallationInspection.Text = "浙江省特种设备研究院";
this.txtConstructionUnit.Text = "浙江石油化工有限公司";
this.txtSpecialEquipmentProductionLicenseCode.Text = "TS3833339-2028";
}
}
}
}
#region 加载树项目
/// <summary>
/// 加载树
@@ -82,7 +198,8 @@ namespace FineUIPro.Web.JGZL
{
if (this.tvControlItem.SelectedNodeID != "0")
{
this.BindGrid();
//this.BindGrid();
PageData();
}
}
#endregion
@@ -91,30 +208,30 @@ namespace FineUIPro.Web.JGZL
/// <summary>
/// 数据绑定
/// </summary>
private void BindGrid()
{
//string projectIds = BLL.Base_ProjectService.GetStrOnProjectIds(this.CurrUser.UserId, "1");
string strSql = @"SELECT * from JGZL_IndustrialPipelineInstallationQualityCertificate where 1=1";
List<SqlParameter> listStr = new List<SqlParameter>();
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
{
strSql += " AND ProjectId = @ProjectId";
listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNodeID));
}
//else
//{
// strSql += " AND CHARINDEX(ProjectId,@ProjectId)>0 ";
// listStr.Add(new SqlParameter("@ProjectId", projectIds));
//}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
// 2.获取当前分页数据
Grid1.RecordCount = tb.Rows.Count;
//tb = GetFilteredTable(Grid1.FilteredData, tb);
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
}
//private void BindGrid()
//{
// //string projectIds = BLL.Base_ProjectService.GetStrOnProjectIds(this.CurrUser.UserId, "1");
// string strSql = @"SELECT * from JGZL_IndustrialPipelineInstallationQualityCertificate where 1=1";
// List<SqlParameter> listStr = new List<SqlParameter>();
// if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
// {
// strSql += " AND ProjectId = @ProjectId";
// listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNodeID));
// }
// //else
// //{
// // strSql += " AND CHARINDEX(ProjectId,@ProjectId)>0 ";
// // listStr.Add(new SqlParameter("@ProjectId", projectIds));
// //}
// SqlParameter[] parameter = listStr.ToArray();
// DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
// // 2.获取当前分页数据
// Grid1.RecordCount = tb.Rows.Count;
// //tb = GetFilteredTable(Grid1.FilteredData, tb);
// var table = this.GetPagedDataTable(Grid1, tb);
// Grid1.DataSource = table;
// Grid1.DataBind();
//}
#endregion
#region 分页排序
@@ -124,10 +241,10 @@ namespace FineUIPro.Web.JGZL
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{
BindGrid();
}
//protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
//{
// BindGrid();
//}
#endregion
#region 排序
@@ -136,10 +253,10 @@ namespace FineUIPro.Web.JGZL
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_Sort(object sender, GridSortEventArgs e)
{
BindGrid();
}
//protected void Grid1_Sort(object sender, GridSortEventArgs e)
//{
// BindGrid();
//}
#endregion
#region 分页选择下拉改变事件
@@ -148,11 +265,11 @@ namespace FineUIPro.Web.JGZL
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
BindGrid();
}
//protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
//{
// Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
// BindGrid();
//}
#endregion
#endregion
@@ -166,7 +283,7 @@ namespace FineUIPro.Web.JGZL
{
this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue;
this.InitTreeMenu();
BindGrid();
PageData();
}
/// <summary>
@@ -174,10 +291,10 @@ namespace FineUIPro.Web.JGZL
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void TextBox_TextChanged(object sender, EventArgs e)
{
this.BindGrid();
}
//protected void TextBox_TextChanged(object sender, EventArgs e)
//{
// this.BindGrid();
//}
#endregion
#region 打印
@@ -196,58 +313,58 @@ namespace FineUIPro.Web.JGZL
string rootPath = Server.MapPath("~/");
BLL.Common.FastReportService.ResetData();
string id = this.Grid1.SelectedRowID;
if (!string.IsNullOrEmpty(id))
//string id = this.Grid1.SelectedRowID;
//if (!string.IsNullOrEmpty(id))
//{
var report = BLL.IndustrialPipelineInstallationQualityCertificateService.GetIndustrialPipelineInstallationQualityCertificateByProjectId(projectId);
if (report != null)
{
var report = BLL.IndustrialPipelineInstallationQualityCertificateService.GetIndustrialPipelineInstallationQualityCertificateById(id);
if (report != null)
{
DataTable dt = new DataTable();
dt.TableName = "Data";
dt.Columns.Add("CertificateCode");
dt.Columns.Add("EngineeringName");
dt.Columns.Add("EngineeringCode");
dt.Columns.Add("DeliveryUnit");
dt.Columns.Add("DeliveryUnitCode");
dt.Columns.Add("InstallStartDate");
dt.Columns.Add("InstallEndDate");
dt.Columns.Add("PipelineLevel");
dt.Columns.Add("PipelineLength");
dt.Columns.Add("DesignUnit");
dt.Columns.Add("DesignLicenseCode");
dt.Columns.Add("SupervisoryAndInspectionAgency");
dt.Columns.Add("QualificationCertificateCode");
dt.Columns.Add("LosslessTestingAgency");
dt.Columns.Add("InstitutionalApprovalCertificate");
dt.Columns.Add("InstallationInspection");
dt.Columns.Add("ConstructionUnit");
dt.Columns.Add("SpecialEquipmentProductionLicenseCode");
DataTable dt = new DataTable();
dt.TableName = "Data";
dt.Columns.Add("CertificateCode");
dt.Columns.Add("EngineeringName");
dt.Columns.Add("EngineeringCode");
dt.Columns.Add("DeliveryUnit");
dt.Columns.Add("DeliveryUnitCode");
dt.Columns.Add("InstallStartDate");
dt.Columns.Add("InstallEndDate");
dt.Columns.Add("PipelineLevel");
dt.Columns.Add("PipelineLength");
dt.Columns.Add("DesignUnit");
dt.Columns.Add("DesignLicenseCode");
dt.Columns.Add("SupervisoryAndInspectionAgency");
dt.Columns.Add("QualificationCertificateCode");
dt.Columns.Add("LosslessTestingAgency");
dt.Columns.Add("InstitutionalApprovalCertificate");
dt.Columns.Add("InstallationInspection");
dt.Columns.Add("ConstructionUnit");
dt.Columns.Add("SpecialEquipmentProductionLicenseCode");
var newRow = dt.NewRow();
newRow["CertificateCode"] = report.CertificateCode;
newRow["EngineeringName"] = BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName;
newRow["EngineeringCode"] = BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectCode;
newRow["DeliveryUnit"] = report.DeliveryUnit;
newRow["DeliveryUnitCode"] = report.DeliveryUnitCode;
string InstallStartDate = report.InstallStartDate.HasValue ? string.Format("{0:yyyy-MM-dd}", report.InstallStartDate) : "";
newRow["InstallStartDate"] = InstallStartDate;
string InstallEndDate = report.InstallEndDate.HasValue ? string.Format("{0:yyyy-MM-dd}", report.InstallEndDate) : "";
newRow["InstallEndDate"] = InstallEndDate;
newRow["PipelineLevel"] = report.PipelineLevel;
newRow["PipelineLength"] = report.PipelineLength;
newRow["DesignUnit"] = report.DesignUnit;
newRow["DesignLicenseCode"] = report.DesignLicenseCode;
newRow["SupervisoryAndInspectionAgency"] = report.SupervisoryAndInspectionAgency;
newRow["QualificationCertificateCode"] = report.QualificationCertificateCode;
newRow["LosslessTestingAgency"] = report.LosslessTestingAgency;
newRow["InstitutionalApprovalCertificate"] = report.InstitutionalApprovalCertificate;
newRow["InstallationInspection"] = report.InstallationInspection;
newRow["ConstructionUnit"] = report.ConstructionUnit;
newRow["SpecialEquipmentProductionLicenseCode"] = report.SpecialEquipmentProductionLicenseCode;
dt.Rows.Add(newRow);
var newRow = dt.NewRow();
newRow["CertificateCode"] = report.CertificateCode;
newRow["EngineeringName"] = BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName;
newRow["EngineeringCode"] = BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectCode;
newRow["DeliveryUnit"] = report.DeliveryUnit;
newRow["DeliveryUnitCode"] = report.DeliveryUnitCode;
string InstallStartDate = report.InstallStartDate.HasValue ? string.Format("{0:yyyy-MM-dd}", report.InstallStartDate) : "";
newRow["InstallStartDate"] = InstallStartDate;
string InstallEndDate = report.InstallEndDate.HasValue ? string.Format("{0:yyyy-MM-dd}", report.InstallEndDate) : "";
newRow["InstallEndDate"] = InstallEndDate;
newRow["PipelineLevel"] = report.PipelineLevel;
newRow["PipelineLength"] = report.PipelineLength;
newRow["DesignUnit"] = report.DesignUnit;
newRow["DesignLicenseCode"] = report.DesignLicenseCode;
newRow["SupervisoryAndInspectionAgency"] = report.SupervisoryAndInspectionAgency;
newRow["QualificationCertificateCode"] = report.QualificationCertificateCode;
newRow["LosslessTestingAgency"] = report.LosslessTestingAgency;
newRow["InstitutionalApprovalCertificate"] = report.InstitutionalApprovalCertificate;
newRow["InstallationInspection"] = report.InstallationInspection;
newRow["ConstructionUnit"] = report.ConstructionUnit;
newRow["SpecialEquipmentProductionLicenseCode"] = report.SpecialEquipmentProductionLicenseCode;
dt.Rows.Add(newRow);
BLL.Common.FastReportService.AddFastreportTable(dt);
BLL.Common.FastReportService.AddFastreportTable(dt);
}
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
//keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName);
BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs);
@@ -260,7 +377,7 @@ namespace FineUIPro.Web.JGZL
}
else
{
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
Alert.ShowInTop("请先保存记录!", MessageBoxIcon.Warning);
return;
}
}
@@ -278,139 +395,139 @@ namespace FineUIPro.Web.JGZL
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAdd_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("IndustrialPipelineInstallationQualityCertificateEdit.aspx?projectId={0}", this.tvControlItem.SelectedNodeID, "新增 - ")));
}
else
{
Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
return;
}
}
//protected void btnAdd_Click(object sender, EventArgs e)
//{
// if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
// {
// PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("IndustrialPipelineInstallationQualityCertificateEdit.aspx?projectId={0}", this.tvControlItem.SelectedNodeID, "新增 - ")));
// }
// else
// {
// Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
// return;
// }
//}
/// <summary>
/// 双击编辑
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_IndustrialPipelineInstallationQualityCertificateMenuId, BLL.Const.BtnModify))
{
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
{
if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID))
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("IndustrialPipelineInstallationQualityCertificateEdit.aspx?certificateId={0}", this.Grid1.SelectedRowID, "编辑 - ")));
}
else
{
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
return;
}
}
else
{
Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
return;
}
}
else
{
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
}
}
//protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
//{
// if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_IndustrialPipelineInstallationQualityCertificateMenuId, BLL.Const.BtnModify))
// {
// if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
// {
// if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID))
// {
// PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("IndustrialPipelineInstallationQualityCertificateEdit.aspx?certificateId={0}", this.Grid1.SelectedRowID, "编辑 - ")));
// }
// else
// {
// Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
// return;
// }
// }
// else
// {
// Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
// return;
// }
// }
// else
// {
// ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
// }
//}
/// <summary>
/// 右键编辑
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuEdit_Click(object sender, EventArgs e)
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_IndustrialPipelineInstallationQualityCertificateMenuId, BLL.Const.BtnModify))
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
return;
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("IndustrialPipelineInstallationQualityCertificateEdit.aspx?certificateId={0}", Grid1.SelectedRowID, "维护 - ")));
}
else
{
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
}
}
//protected void btnMenuEdit_Click(object sender, EventArgs e)
//{
// if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_IndustrialPipelineInstallationQualityCertificateMenuId, BLL.Const.BtnModify))
// {
// if (Grid1.SelectedRowIndexArray.Length == 0)
// {
// Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
// return;
// }
// PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("IndustrialPipelineInstallationQualityCertificateEdit.aspx?certificateId={0}", Grid1.SelectedRowID, "维护 - ")));
// }
// else
// {
// Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
// }
//}
/// <summary>
/// 右键删除
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuDelete_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_IndustrialPipelineInstallationQualityCertificateMenuId, Const.BtnDelete))
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
return;
}
//protected void btnMenuDelete_Click(object sender, EventArgs e)
//{
// if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_IndustrialPipelineInstallationQualityCertificateMenuId, Const.BtnDelete))
// {
// if (Grid1.SelectedRowIndexArray.Length == 0)
// {
// Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
// return;
// }
bool isShow = true;
if (Grid1.SelectedRowIndexArray.Length > 1)
{
isShow = false;
}
bool isDelete = false;
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
if (judgementDelete(rowID, isShow))
{
isDelete = true;
BLL.IndustrialPipelineInstallationQualityCertificateService.DeleteIndustrialPipelineInstallationQualityCertificateById(rowID);
BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除工业管道安装质量证明书");
}
}
if (isDelete)
{
ShowNotify("删除成功!", MessageBoxIcon.Success);
}
this.BindGrid();
}
else
{
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
}
}
// bool isShow = true;
// if (Grid1.SelectedRowIndexArray.Length > 1)
// {
// isShow = false;
// }
// bool isDelete = false;
// foreach (int rowIndex in Grid1.SelectedRowIndexArray)
// {
// string rowID = Grid1.DataKeys[rowIndex][0].ToString();
// if (judgementDelete(rowID, isShow))
// {
// isDelete = true;
// BLL.IndustrialPipelineInstallationQualityCertificateService.DeleteIndustrialPipelineInstallationQualityCertificateById(rowID);
// BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除工业管道安装质量证明书");
// }
// }
// if (isDelete)
// {
// ShowNotify("删除成功!", MessageBoxIcon.Success);
// }
// this.BindGrid();
// }
// else
// {
// Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
// }
//}
#region 判断是否可删除
/// <summary>
/// 判断是否可以删除
/// </summary>
/// <returns></returns>
private bool judgementDelete(string id, bool isShow)
{
string content = string.Empty;
//private bool judgementDelete(string id, bool isShow)
//{
// string content = string.Empty;
if (string.IsNullOrEmpty(content))
{
return true;
}
else
{
if (isShow)
{
Alert.ShowInTop(content, MessageBoxIcon.Error);
}
return false;
}
}
// if (string.IsNullOrEmpty(content))
// {
// return true;
// }
// else
// {
// if (isShow)
// {
// Alert.ShowInTop(content, MessageBoxIcon.Error);
// }
// return false;
// }
//}
#endregion
#endregion
@@ -420,10 +537,81 @@ namespace FineUIPro.Web.JGZL
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Window1_Close(object sender, WindowCloseEventArgs e)
//protected void Window1_Close(object sender, WindowCloseEventArgs e)
//{
// this.InitTreeMenu();//加载树
// this.BindGrid();
//}
#endregion
#region 保存
protected void btnSave_Click(object sender, EventArgs e)
{
this.InitTreeMenu();//加载树
this.BindGrid();
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_IndustrialPipelineInstallationQualityCertificateMenuId, Const.BtnSave))
{
string projectId = this.tvControlItem.SelectedNodeID;
if (!string.IsNullOrEmpty(projectId))
{
Model.JGZL_IndustrialPipelineInstallationQualityCertificate newReport = new Model.JGZL_IndustrialPipelineInstallationQualityCertificate();
newReport.CertificateCode = this.txtCertificateCode.Text.Trim();
newReport.SpecialEquipmentProductionLicenseCode = this.txtSpecialEquipmentProductionLicenseCode.Text.Trim();
//newReport.EngineeringName = this.txtEngineeringName.Text.Trim();
//newReport.EngineeringCode = this.txtEngineeringCode.Text.Trim();
newReport.DeliveryUnit = this.txtDeliveryUnit.Text.Trim();
newReport.DeliveryUnitCode = this.txtDeliveryUnitCode.Text.Trim();
newReport.InstallStartDate = Funs.GetNewDateTime(this.txtInstallStartDate.Text.Trim());
newReport.InstallEndDate = Funs.GetNewDateTime(this.txtInstallEndDate.Text.Trim());
if (!string.IsNullOrEmpty(drpPipelineLevel.SelectedValue))
{
newReport.PipelineLevel = this.drpPipelineLevel.SelectedValue;
}
if (!string.IsNullOrEmpty(drpPipelineLength.SelectedValue))
{
newReport.PipelineLength = this.drpPipelineLength.SelectedValue;
}
//newReport.PipelineLevel = this.txtPipelineLevel.Text.Trim();
//newReport.PipelineLength = this.txtPipelineLength.Text.Trim();
newReport.DesignUnit = this.txtDesignUnit.Text.Trim();
newReport.LosslessTestingAgency = this.txtLosslessTestingAgency.Text.Trim();
//newReport.SupervisoryAndInspectionAgency = this.txtSupervisoryAndInspectionAgency.Text.Trim();
newReport.ConstructionUnit = this.txtConstructionUnit.Text.Trim();
//newReport.Remark = this.txtRemark.Text.Trim();
//newReport.DesignLicenseCode = this.txtDesignLicenseCode.Text.Trim();
//newReport.QualificationCertificateCode = this.txtQualificationCertificateCode.Text.Trim();
//newReport.InstitutionalApprovalCertificate = this.txtInstitutionalApprovalCertificate.Text.Trim();
newReport.InstallationInspection = this.txtInstallationInspection.Text.Trim();
if (!string.IsNullOrEmpty(this.CertificateId))
{
newReport.CertificateId = this.CertificateId;
BLL.IndustrialPipelineInstallationQualityCertificateService.UpdateIndustrialPipelineInstallationQualityCertificate(newReport);
}
else
{
newReport.ProjectId = projectId;
newReport.CompileMan = this.CurrUser.UserId;
newReport.CompileDate = DateTime.Now;
newReport.Reviewer = this.CurrUser.UserId;
newReport.RevieweDate = DateTime.Now;
newReport.CertificateId = SQLHelper.GetNewID(typeof(Model.JGZL_IndustrialPipelineInstallationQualityCertificate));
this.CertificateId = newReport.CertificateId;
BLL.IndustrialPipelineInstallationQualityCertificateService.AddIndustrialPipelineInstallationQualityCertificate(newReport);
}
ShowNotify("保存成功!", MessageBoxIcon.Success);
//PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
PageData();
}
else
{
Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
return;
}
}
else
{
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
return;
}
}
#endregion
}
@@ -105,13 +105,13 @@ namespace FineUIPro.Web.JGZL
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnAdd 控件。
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAdd;
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnPrint 控件。
@@ -123,49 +123,121 @@ namespace FineUIPro.Web.JGZL
protected global::FineUIPro.Button btnPrint;
/// <summary>
/// Grid1 控件。
/// SimpleForm1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// ToolbarSeparator1 控件。
/// txtCertificateCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
protected global::FineUIPro.TextBox txtCertificateCode;
/// <summary>
/// ToolbarText1 控件。
/// txtDeliveryUnit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
protected global::FineUIPro.TextBox txtDeliveryUnit;
/// <summary>
/// ddlPageSize 控件。
/// txtDeliveryUnitCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
protected global::FineUIPro.TextBox txtDeliveryUnitCode;
/// <summary>
/// Window1 控件。
/// txtInstallStartDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
protected global::FineUIPro.DatePicker txtInstallStartDate;
/// <summary>
/// txtInstallEndDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtInstallEndDate;
/// <summary>
/// drpPipelineLevel 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpPipelineLevel;
/// <summary>
/// drpPipelineLength 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpPipelineLength;
/// <summary>
/// txtDesignUnit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtDesignUnit;
/// <summary>
/// txtLosslessTestingAgency 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtLosslessTestingAgency;
/// <summary>
/// txtInstallationInspection 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtInstallationInspection;
/// <summary>
/// txtConstructionUnit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtConstructionUnit;
/// <summary>
/// txtSpecialEquipmentProductionLicenseCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSpecialEquipmentProductionLicenseCode;
/// <summary>
/// WindowPrint 控件。
@@ -175,32 +247,5 @@ namespace FineUIPro.Web.JGZL
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window WindowPrint;
/// <summary>
/// Menu1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnMenuEdit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuEdit;
/// <summary>
/// btnMenuDelete 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuDelete;
}
}
@@ -58,8 +58,37 @@ namespace FineUIPro.Web.JGZL
}
#endregion
private void EmptyText()
{
txtConUnit.Text = string.Empty;
txtMaintenanceCode.Text = string.Empty;
txtEquipmentName.Text = string.Empty;
txtEquipmentModel.Text = string.Empty;
txtEquipmentCode.Text = string.Empty;
txtManufacturingNumber.Text = string.Empty;
txtManufacturingUnit.Text = string.Empty;
txtManufacturingLicenseNumber.Text = string.Empty;
txtEquipmentLocation.Text = string.Empty;
txtConstructionDate.Text = string.Empty;
drpConstructionCategory.SelectedValue = "改造";
txtLicenseNumber.Text = string.Empty;
txtLicenseValidityDate.Text = string.Empty;
txtConContactMan.Text = string.Empty;
txtConTelephone.Text = string.Empty;
txtConFax.Text = string.Empty;
txtConAddress.Text = string.Empty;
txtConEmail.Text = string.Empty;
txtUseUnit.Text = string.Empty;
txtUseContactMan.Text = string.Empty;
txtUseTelephone.Text = string.Empty;
txtUseFax.Text = string.Empty;
txtUseAddress.Text = string.Empty;
txtUseEmail.Text = string.Empty;
}
private void PageData()
{
EmptyText();
string projectId = this.tvControlItem.SelectedNodeID;
if (!string.IsNullOrEmpty(projectId))
{