diff --git a/HJGL_DS/BLL/Common/Const.cs b/HJGL_DS/BLL/Common/Const.cs
index d33ec3a..30b5d41 100644
--- a/HJGL_DS/BLL/Common/Const.cs
+++ b/HJGL_DS/BLL/Common/Const.cs
@@ -2495,6 +2495,11 @@ namespace BLL
/// 管道安装检查记录导出模板
///
public const string JGZL_PipelineInstallationInspectionRecordUrl = "File\\Word\\JGZL\\管道安装检查记录导出模板.docx";
+
+ ///
+ /// 质量控制点检查记录导出模板
+ ///
+ public const string JGZL_QualityControlPointInspectionUrl = "File\\Word\\JGZL\\质量控制点检查记录导出模板.docx";
#endregion
}
}
diff --git a/HJGL_DS/BLL/JGZL/QualityControlPointInspectionService.cs b/HJGL_DS/BLL/JGZL/QualityControlPointInspectionService.cs
index 4e088db..2dd1829 100644
--- a/HJGL_DS/BLL/JGZL/QualityControlPointInspectionService.cs
+++ b/HJGL_DS/BLL/JGZL/QualityControlPointInspectionService.cs
@@ -22,6 +22,16 @@ namespace BLL
return Funs.DB.JGZL_QualityControlPointInspection.FirstOrDefault(e => e.QualityControlPointInspectionId == qualityControlPointInspectionId);
}
+ ///
+ /// 根据项目Id获取质量控制点检查记录
+ ///
+ ///
+ ///
+ public static Model.JGZL_QualityControlPointInspection GetQualityControlPointInspectionByProjectId(string projectId)
+ {
+ return Funs.DB.JGZL_QualityControlPointInspection.FirstOrDefault(e => e.ProjectId == projectId);
+ }
+
///
/// 添加
///
diff --git a/HJGL_DS/FineUIPro.Web/File/Word/JGZL/质量控制点检查记录导出模板.docx b/HJGL_DS/FineUIPro.Web/File/Word/JGZL/质量控制点检查记录导出模板.docx
new file mode 100644
index 0000000..4b871bc
--- /dev/null
+++ b/HJGL_DS/FineUIPro.Web/File/Word/JGZL/质量控制点检查记录导出模板.docx
@@ -0,0 +1,36 @@
+ SH/T 3543 -- G113
+质量控制点检查记录
+工程名称:
+单位工程名称:管道安装工程
+ 专业类别
+
+ 施工标准
+
+ 控制点名称
+
+ 施工班组
+
+检查内容(包括工程实体安装项目、质量记录、检试验报告等):
+
+存在问题:
+
+
+
+结论:
+
+
+
+
+
+
+
+
+
+
+
+
+质量检查员:
+日期: 年 月 日
+质量工程师:
+日期: 年 月 日
+
diff --git a/HJGL_DS/FineUIPro.Web/JGZL/PipelinePrefabricationConstructionInspectionRecord.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/PipelinePrefabricationConstructionInspectionRecord.aspx.cs
index b7c0ae7..a91a435 100644
--- a/HJGL_DS/FineUIPro.Web/JGZL/PipelinePrefabricationConstructionInspectionRecord.aspx.cs
+++ b/HJGL_DS/FineUIPro.Web/JGZL/PipelinePrefabricationConstructionInspectionRecord.aspx.cs
@@ -98,7 +98,7 @@ namespace FineUIPro.Web.JGZL
{
//this.txtDrawingNumber.Text = BLL.Base_ProjectService.GetProjectByProjectId(this.ProjectId).ProjectCode;
this.txtProfessionalEngineering.Text = "管道安装工程";
- this.txtInspectionResults.Text = "经检查汽油/航煤加氢增设过滤器及阀组项目管道预制施工质量符合 SH/T 3501-2021《石油化工有毒、可燃介质钢制管道工程施工及验收规范》及GB 50517-2010《石油化工金属管道工程施工质量验收规范》,管道组对尺寸、坡口加工、焊接施工均满足设计及规范规定;所有焊缝外观检查合格,无气孔、夹渣、裂纹、未焊透、咬边超标等外观缺陷,焊缝成型规整,满足管道预制验收标准,具备后续管道安装条件。";//BLL.Base_ProjectService.GetProjectByProjectId(this.ProjectId).ProjectName + "完成,经自检,管道施工符合SH/T 3501-2011《石油化工有毒、可燃介质钢制管道工程施工及验收规范》要求,焊缝外观检查合格。";
+ this.txtInspectionResults.Text = "内容:\r\n 经检查" + BLL.Base_ProjectService.GetProjectByProjectId(this.ProjectId).ProjectName + "管道预制施工质量符合 SH/T 3501-2021《石油化工有毒、可燃介质钢制管道工程施工及验收规范》及GB 50517-2010《石油化工金属管道工程施工质量验收规范》,管道组对尺寸、坡口加工、焊接施工均满足设计及规范规定;所有焊缝外观检查合格,无气孔、夹渣、裂纹、未焊透、咬边超标等外观缺陷,焊缝成型规整,满足管道预制验收标准,具备后续管道安装条件。";//BLL.Base_ProjectService.GetProjectByProjectId(this.ProjectId).ProjectName + "完成,经自检,管道施工符合SH/T 3501-2011《石油化工有毒、可燃介质钢制管道工程施工及验收规范》要求,焊缝外观检查合格。";
}
}
}
diff --git a/HJGL_DS/FineUIPro.Web/JGZL/QualityControlPointInspection.aspx b/HJGL_DS/FineUIPro.Web/JGZL/QualityControlPointInspection.aspx
index b54f281..d3a3a94 100644
--- a/HJGL_DS/FineUIPro.Web/JGZL/QualityControlPointInspection.aspx
+++ b/HJGL_DS/FineUIPro.Web/JGZL/QualityControlPointInspection.aspx
@@ -4,12 +4,12 @@
-
+
质量控制点检查记录
-
+ --%>
diff --git a/HJGL_DS/FineUIPro.Web/JGZL/QualityControlPointInspection.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/QualityControlPointInspection.aspx.cs
index e65113f..2215a1a 100644
--- a/HJGL_DS/FineUIPro.Web/JGZL/QualityControlPointInspection.aspx.cs
+++ b/HJGL_DS/FineUIPro.Web/JGZL/QualityControlPointInspection.aspx.cs
@@ -8,11 +8,44 @@ using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
+using Aspose.Words;
namespace FineUIPro.Web.JGZL
{
- public partial class QualityControlPointInspection :PageBase
+ public partial class QualityControlPointInspection : PageBase
{
+ #region 定义项
+ ///
+ /// 主键
+ ///
+ private string QualityControlPointInspectionId
+ {
+ get
+ {
+ return (string)ViewState["QualityControlPointInspectionId"];
+ }
+ set
+ {
+ ViewState["QualityControlPointInspectionId"] = value;
+ }
+ }
+
+ ///
+ /// 项目Id
+ ///
+ private string ProjectId
+ {
+ get
+ {
+ return (string)ViewState["ProjectId"];
+ }
+ set
+ {
+ ViewState["ProjectId"] = value;
+ }
+ }
+ #endregion
+
#region 加载页面
///
/// 加载页面
@@ -23,7 +56,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,7 +67,44 @@ namespace FineUIPro.Web.JGZL
this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId;
this.InitTreeMenu();//加载树
this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue;
- this.BindGrid();
+ this.ProjectId = this.tvControlItem.SelectedNodeID;
+ //this.BindGrid();
+ DataInfo();
+
+ }
+ }
+
+ ///
+ /// 绑定数据
+ ///
+ private void DataInfo()
+ {
+ txtProfessional.Text = string.Empty;
+ txtConstructionStandards.Text = string.Empty;
+ txtControlPointName.Text = string.Empty;
+ txtConTeamGroup.Text = string.Empty;
+ txtCheckContents.Text = string.Empty;
+ txtProblems.Text = string.Empty;
+ txtConclusion.Text = string.Empty;
+ if (!string.IsNullOrEmpty(this.ProjectId))
+ {
+ var report = BLL.QualityControlPointInspectionService.GetQualityControlPointInspectionByProjectId(this.ProjectId);
+ if (report != null)
+ {
+ this.QualityControlPointInspectionId = report.QualityControlPointInspectionId;
+ this.txtProfessional.Text = report.Professional;
+ this.txtConstructionStandards.Text = report.ConstructionStandards;
+ this.txtControlPointName.Text = report.ControlPointName;
+ this.txtConTeamGroup.Text = report.ConTeamGroup;
+ this.txtCheckContents.Text = report.CheckContents;
+ this.txtProblems.Text = report.Problems;
+ this.txtConclusion.Text = report.Conclusion;
+ }
+ else
+ {
+ this.txtProfessional.Text = "管道安装工程";
+ this.txtConstructionStandards.Text = "SH/T3501-2021";
+ }
}
}
#endregion
@@ -82,7 +152,9 @@ namespace FineUIPro.Web.JGZL
{
if (this.tvControlItem.SelectedNodeID != "0")
{
- this.BindGrid();
+ this.ProjectId = this.tvControlItem.SelectedNodeID;
+ DataInfo();
+ //this.BindGrid();
}
}
#endregion
@@ -91,30 +163,30 @@ namespace FineUIPro.Web.JGZL
///
/// 数据绑定
///
- private void BindGrid()
- {
- //string projectIds = BLL.Base_ProjectService.GetStrOnProjectIds(this.CurrUser.UserId, "1");
- string strSql = @"SELECT * from JGZL_QualityControlPointInspection where 1=1";
- List listStr = new List();
- 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_QualityControlPointInspection where 1=1";
+ // List listStr = new List();
+ // 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 +196,10 @@ namespace FineUIPro.Web.JGZL
///
///
///
- protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
- {
- BindGrid();
- }
+ //protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
+ //{
+ // BindGrid();
+ //}
#endregion
#region 排序
@@ -136,10 +208,10 @@ namespace FineUIPro.Web.JGZL
///
///
///
- protected void Grid1_Sort(object sender, GridSortEventArgs e)
- {
- BindGrid();
- }
+ //protected void Grid1_Sort(object sender, GridSortEventArgs e)
+ //{
+ // BindGrid();
+ //}
#endregion
#region 分页选择下拉改变事件
@@ -148,11 +220,11 @@ namespace FineUIPro.Web.JGZL
///
///
///
- 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
@@ -164,7 +236,10 @@ namespace FineUIPro.Web.JGZL
///
protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e)
{
+ this.ProjectId = this.drpProjectId.SelectedValue;
this.InitTreeMenu();
+ this.tvControlItem.SelectedNodeID = this.ProjectId;
+ DataInfo();
}
///
@@ -174,7 +249,7 @@ namespace FineUIPro.Web.JGZL
///
protected void TextBox_TextChanged(object sender, EventArgs e)
{
- this.BindGrid();
+ //this.BindGrid();
}
#endregion
@@ -190,37 +265,37 @@ namespace FineUIPro.Web.JGZL
if (projectId != null)
{
- if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID))
- {
- string initTemplatePath = "";
- string rootPath = Server.MapPath("~/");
- BLL.Common.FastReportService.ResetData();
+ //if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID))
+ //{
+ string initTemplatePath = "";
+ string rootPath = Server.MapPath("~/");
+ BLL.Common.FastReportService.ResetData();
- var report = BLL.QualityControlPointInspectionService.GetQualityControlPointInspectionById(this.Grid1.SelectedRowID);
- if (report != null)
- {
- Dictionary keyValuePairs = new Dictionary();
- keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName);
- keyValuePairs.Add("Professional", report.Professional);
- keyValuePairs.Add("ConstructionStandards", report.ConstructionStandards);
- keyValuePairs.Add("ControlPointName", report.ControlPointName);
- keyValuePairs.Add("ConTeamGroup", report.ConTeamGroup);
- keyValuePairs.Add("CheckContents", report.CheckContents);
- keyValuePairs.Add("Problems", report.Problems);
- keyValuePairs.Add("Conclusion", report.Conclusion);
- BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs);
- }
- initTemplatePath = "File\\Fastreport\\JGZL\\质量控制点检查记录.frx";
- if (File.Exists(rootPath + initTemplatePath))
- {
- PageContext.RegisterStartupScript(WindowPrint.GetShowReference(String.Format("../common/ReportPrint/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath)));
- }
- }
- else
+ //var report = BLL.QualityControlPointInspectionService.GetQualityControlPointInspectionById(this.Grid1.SelectedRowID);
+ //if (report != null)
+ //{
+ Dictionary keyValuePairs = new Dictionary();
+ keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName);
+ keyValuePairs.Add("Professional", txtProfessional.Text.Trim());
+ keyValuePairs.Add("ConstructionStandards", txtConstructionStandards.Text.Trim());
+ keyValuePairs.Add("ControlPointName", txtControlPointName.Text.Trim());
+ keyValuePairs.Add("ConTeamGroup", txtConTeamGroup.Text.Trim());
+ keyValuePairs.Add("CheckContents", txtCheckContents.Text);
+ keyValuePairs.Add("Problems", txtProblems.Text);
+ keyValuePairs.Add("Conclusion", txtConclusion.Text);
+ BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs);
+ //}
+ initTemplatePath = "File\\Fastreport\\JGZL\\质量控制点检查记录.frx";
+ if (File.Exists(rootPath + initTemplatePath))
{
- Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
- return;
+ PageContext.RegisterStartupScript(WindowPrint.GetShowReference(String.Format("../common/ReportPrint/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath)));
}
+ //}
+ //else
+ //{
+ // Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
+ // return;
+ //}
}
else
{
@@ -236,139 +311,139 @@ namespace FineUIPro.Web.JGZL
///
///
///
- protected void btnAdd_Click(object sender, EventArgs e)
- {
- if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
- {
- PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("QualityControlPointInspectionEdit.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("QualityControlPointInspectionEdit.aspx?projectId={0}", this.tvControlItem.SelectedNodeID, "新增 - ")));
+ // }
+ // else
+ // {
+ // Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
+ // return;
+ // }
+ //}
///
/// 双击编辑
///
///
///
- protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
- {
- if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_QualityControlPointInspectionMenuId, BLL.Const.BtnModify))
- {
- if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
- {
- if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID))
- {
- PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("QualityControlPointInspectionEdit.aspx?qualityControlPointInspectionId={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_QualityControlPointInspectionMenuId, BLL.Const.BtnModify))
+ // {
+ // if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
+ // {
+ // if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID))
+ // {
+ // PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("QualityControlPointInspectionEdit.aspx?qualityControlPointInspectionId={0}", this.Grid1.SelectedRowID, "编辑 - ")));
+ // }
+ // else
+ // {
+ // Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
+ // return;
+ // }
+ // }
+ // else
+ // {
+ // Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
+ // return;
+ // }
+ // }
+ // else
+ // {
+ // ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
+ // }
+ //}
///
/// 右键编辑
///
///
///
- protected void btnMenuEdit_Click(object sender, EventArgs e)
- {
- if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_QualityControlPointInspectionMenuId, BLL.Const.BtnModify))
- {
- if (Grid1.SelectedRowIndexArray.Length == 0)
- {
- Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
- return;
- }
- PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("QualityControlPointInspectionEdit.aspx?qualityControlPointInspectionId={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_QualityControlPointInspectionMenuId, BLL.Const.BtnModify))
+ // {
+ // if (Grid1.SelectedRowIndexArray.Length == 0)
+ // {
+ // Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
+ // return;
+ // }
+ // PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("QualityControlPointInspectionEdit.aspx?qualityControlPointInspectionId={0}", Grid1.SelectedRowID, "维护 - ")));
+ // }
+ // else
+ // {
+ // Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
+ // }
+ //}
///
/// 右键删除
///
///
///
- protected void btnMenuDelete_Click(object sender, EventArgs e)
- {
- if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_QualityControlPointInspectionMenuId, 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_QualityControlPointInspectionMenuId, 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.QualityControlPointInspectionService.DeleteQualityControlPointInspectionById(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.QualityControlPointInspectionService.DeleteQualityControlPointInspectionById(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 判断是否可删除
///
/// 判断是否可以删除
///
///
- 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
@@ -378,10 +453,142 @@ namespace FineUIPro.Web.JGZL
///
///
///
- 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_QualityControlPointInspectionMenuId, Const.BtnSave))
+ {
+ Model.JGZL_QualityControlPointInspection newReport = new Model.JGZL_QualityControlPointInspection();
+ newReport.Professional = this.txtProfessional.Text.Trim();
+ newReport.ConstructionStandards = this.txtConstructionStandards.Text.Trim();
+ newReport.ControlPointName = this.txtControlPointName.Text.Trim();
+ newReport.ConTeamGroup = this.txtConTeamGroup.Text.Trim();
+ newReport.CheckContents = this.txtCheckContents.Text;
+ newReport.Problems = txtProblems.Text;
+ newReport.Conclusion = this.txtConclusion.Text;
+ if (!string.IsNullOrEmpty(this.QualityControlPointInspectionId))
+ {
+ newReport.QualityControlPointInspectionId = this.QualityControlPointInspectionId;
+ BLL.QualityControlPointInspectionService.UpdateQualityControlPointInspection(newReport);
+ }
+ else
+ {
+ newReport.ProjectId = this.ProjectId;
+ newReport.CompileMan = this.CurrUser.UserId;
+ newReport.CompileDate = DateTime.Now;
+ newReport.QualityControlPointInspectionId = SQLHelper.GetNewID(typeof(Model.JGZL_QualityControlPointInspection));
+ this.QualityControlPointInspectionId = newReport.QualityControlPointInspectionId;
+ BLL.QualityControlPointInspectionService.AddQualityControlPointInspection(newReport);
+ }
+ ShowNotify("保存成功!", MessageBoxIcon.Success);
+ //PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
+ }
+ else
+ {
+ Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
+ return;
+ }
+ }
+ #endregion
+
+ #region 导出按钮
+ /// 导出按钮
+ ///
+ ///
+ ///
+ protected void btnOut_Click(object sender, EventArgs e)
+ {
+ string rootPath = Server.MapPath("~/");
+ string initTemplatePath = string.Empty;
+ string uploadfilepath = string.Empty;
+ string newUrl = string.Empty;
+ string filePath = string.Empty;
+
+ string projectId = this.tvControlItem.SelectedNodeID;
+ if (!string.IsNullOrEmpty(projectId))
+ {
+ initTemplatePath = Const.JGZL_QualityControlPointInspectionUrl;
+ uploadfilepath = rootPath + initTemplatePath;
+
+ newUrl = uploadfilepath.Replace("质量控制点检查记录导出模板", "质量控制点检查记录");
+ if (File.Exists(newUrl))
+ {
+ File.Delete(newUrl);
+ }
+ File.Copy(uploadfilepath, newUrl);
+ Document doc = new Aspose.Words.Document(uploadfilepath);
+
+ Bookmark projectName = doc.Range.Bookmarks["ProjectName"];
+ if (projectName != null)
+ {
+ projectName.Text = BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName;
+ }
+ Bookmark professional = doc.Range.Bookmarks["Professional"];
+ if (professional != null)
+ {
+ professional.Text = this.txtProfessional.Text;
+ }
+ Bookmark constructionStandards = doc.Range.Bookmarks["ConstructionStandards"];
+ if (constructionStandards != null)
+ {
+ constructionStandards.Text = this.txtConstructionStandards.Text;
+ }
+ Bookmark controlPointName = doc.Range.Bookmarks["ControlPointName"];
+ if (controlPointName != null)
+ {
+ controlPointName.Text = this.txtControlPointName.Text;
+ }
+ Bookmark conTeamGroup = doc.Range.Bookmarks["ConTeamGroup"];
+ if (conTeamGroup != null)
+ {
+ conTeamGroup.Text = this.txtConTeamGroup.Text;
+ }
+ Bookmark checkContents = doc.Range.Bookmarks["CheckContents"];
+ if (checkContents != null)
+ {
+ checkContents.Text = this.txtCheckContents.Text;
+ }
+ Bookmark problems = doc.Range.Bookmarks["Problems"];
+ if (problems != null)
+ {
+ problems.Text = this.txtProblems.Text;
+ }
+ Bookmark conclusion = doc.Range.Bookmarks["Conclusion"];
+ if (conclusion != null)
+ {
+ conclusion.Text = this.txtConclusion.Text;
+ }
+ doc.Save(newUrl);
+
+ 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);
+ return;
+ }
}
#endregion
}
diff --git a/HJGL_DS/FineUIPro.Web/JGZL/QualityControlPointInspection.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/JGZL/QualityControlPointInspection.aspx.designer.cs
index ee3ef53..d63a3ab 100644
--- a/HJGL_DS/FineUIPro.Web/JGZL/QualityControlPointInspection.aspx.designer.cs
+++ b/HJGL_DS/FineUIPro.Web/JGZL/QualityControlPointInspection.aspx.designer.cs
@@ -105,13 +105,13 @@ namespace FineUIPro.Web.JGZL
protected global::FineUIPro.ToolbarFill ToolbarFill1;
///
- /// btnAdd 控件。
+ /// btnSave 控件。
///
///
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.Button btnAdd;
+ protected global::FineUIPro.Button btnSave;
///
/// btnPrint 控件。
@@ -123,49 +123,112 @@ namespace FineUIPro.Web.JGZL
protected global::FineUIPro.Button btnPrint;
///
- /// Grid1 控件。
+ /// btnOut 控件。
///
///
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.Grid Grid1;
+ protected global::FineUIPro.Button btnOut;
///
- /// ToolbarSeparator1 控件。
+ /// SimpleForm1 控件。
///
///
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
+ protected global::FineUIPro.Form SimpleForm1;
///
- /// ToolbarText1 控件。
+ /// txtProfessional 控件。
///
///
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.ToolbarText ToolbarText1;
+ protected global::FineUIPro.TextBox txtProfessional;
///
- /// ddlPageSize 控件。
+ /// txtConstructionStandards 控件。
///
///
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.DropDownList ddlPageSize;
+ protected global::FineUIPro.TextBox txtConstructionStandards;
///
- /// Window1 控件。
+ /// txtControlPointName 控件。
///
///
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.Window Window1;
+ protected global::FineUIPro.TextBox txtControlPointName;
+
+ ///
+ /// txtConTeamGroup 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtConTeamGroup;
+
+ ///
+ /// Label1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label Label1;
+
+ ///
+ /// txtCheckContents 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextArea txtCheckContents;
+
+ ///
+ /// Label2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label Label2;
+
+ ///
+ /// txtProblems 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextArea txtProblems;
+
+ ///
+ /// Label3 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label Label3;
+
+ ///
+ /// txtConclusion 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextArea txtConclusion;
///
/// WindowPrint 控件。
@@ -175,32 +238,5 @@ namespace FineUIPro.Web.JGZL
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Window WindowPrint;
-
- ///
- /// Menu1 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.Menu Menu1;
-
- ///
- /// btnMenuEdit 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.MenuButton btnMenuEdit;
-
- ///
- /// btnMenuDelete 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.MenuButton btnMenuDelete;
}
}