diff --git a/HJGL_DS/BLL/Common/Const.cs b/HJGL_DS/BLL/Common/Const.cs index f262369..d33ec3a 100644 --- a/HJGL_DS/BLL/Common/Const.cs +++ b/HJGL_DS/BLL/Common/Const.cs @@ -2490,6 +2490,11 @@ namespace BLL /// 管道预制施工检查记录导出模板 /// public const string JGZL_PipelinePrefabricationConstructionInspectionRecordUrl= "File\\Word\\JGZL\\管道预制施工检查记录导出模板.docx"; + + /// + /// 管道安装检查记录导出模板 + /// + public const string JGZL_PipelineInstallationInspectionRecordUrl = "File\\Word\\JGZL\\管道安装检查记录导出模板.docx"; #endregion } } diff --git a/HJGL_DS/BLL/JGZL/PipelineInstallationInspectionRecordService.cs b/HJGL_DS/BLL/JGZL/PipelineInstallationInspectionRecordService.cs index 499ee41..24432cd 100644 --- a/HJGL_DS/BLL/JGZL/PipelineInstallationInspectionRecordService.cs +++ b/HJGL_DS/BLL/JGZL/PipelineInstallationInspectionRecordService.cs @@ -18,6 +18,16 @@ namespace BLL return Funs.DB.JGZL_PipelineInstallationInspectionRecord.FirstOrDefault(e => e.RecordId == Id); } + /// + /// 根据项目Id获取安装检查记录 + /// + /// + /// + public static Model.JGZL_PipelineInstallationInspectionRecord GetPipelineInstallationInspectionRecordByProjectId(string projectId) + { + return Funs.DB.JGZL_PipelineInstallationInspectionRecord.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..0a3e433 --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/File/Word/JGZL/管道安装检查记录导出模板.docx @@ -0,0 +1,46 @@ + SH/T 3503 -- J133 +管道安装检查记录 +工程名称: + +单位工程名称:管道安装工程 + 专业工程 + + 施工图号 + +检查项目: + + + + + + + + +检验结论: + + + + + + + + + + + 建设/监理单位 + 总承包单位 + 施工单位 +专业工程师: + + +日期: 年 月 日 +专业工程师: + + +日期: 年 月 日 +施工班组长: +质量检查员: +专业工程师: +日期: 年 月 日 + + diff --git a/HJGL_DS/FineUIPro.Web/JGZL/PipelineInstallationInspectionRecord.aspx b/HJGL_DS/FineUIPro.Web/JGZL/PipelineInstallationInspectionRecord.aspx index 4837b5d..07a52cb 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/PipelineInstallationInspectionRecord.aspx +++ b/HJGL_DS/FineUIPro.Web/JGZL/PipelineInstallationInspectionRecord.aspx @@ -39,14 +39,46 @@ - + + + <%----%> + - + + + + + + + + + + + + + + + + + + <%-- + + + +--%> + + + <%-- - + --%> - + --%> - + <%-- - + --%> - + --%> diff --git a/HJGL_DS/FineUIPro.Web/JGZL/PipelineInstallationInspectionRecord.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/PipelineInstallationInspectionRecord.aspx.cs index 7a8d786..514d3b1 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/PipelineInstallationInspectionRecord.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/PipelineInstallationInspectionRecord.aspx.cs @@ -8,11 +8,45 @@ using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.IO; +using System.Windows.Forms; +using Aspose.Words; namespace FineUIPro.Web.JGZL { public partial class PipelineInstallationInspectionRecord : PageBase { + #region 定义项 + /// + /// 主键 + /// + private string RecordId + { + get + { + return (string)ViewState["RecordId"]; + } + set + { + ViewState["RecordId"] = value; + } + } + + /// + /// 项目Id + /// + private string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + #endregion + #region 加载页面 /// /// 加载页面 @@ -23,7 +57,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"; @@ -33,8 +67,36 @@ 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; + DataInfo(); + //this.BindGrid(); + } + } + + //加载数据 + private void DataInfo() + { + this.txtProfessionalEngineering.Text = string.Empty; + this.txtDrawingNumber.Text = string.Empty; + this.txtInspectionItems.Text = string.Empty; + this.txtInspectionResults.Text = string.Empty; + if (!string.IsNullOrEmpty(this.ProjectId)) + { + var report = BLL.PipelineInstallationInspectionRecordService.GetPipelineInstallationInspectionRecordByProjectId(this.ProjectId); + if (report != null) + { + this.RecordId = report.RecordId; + this.txtProfessionalEngineering.Text = report.ProfessionalEngineering; + this.txtDrawingNumber.Text = report.DrawingNumber; + this.txtInspectionItems.Text = report.InspectionItems; + this.txtInspectionResults.Text = report.InspectionResults; + } + else + { + this.RecordId = string.Empty; + this.txtProfessionalEngineering.Text = "管道安装工程"; + //this.txtDrawingNumber.Text = BLL.Base_ProjectService.GetProjectCode(this.ProjectId); + } } } #endregion @@ -82,7 +144,9 @@ namespace FineUIPro.Web.JGZL { if (this.tvControlItem.SelectedNodeID != "0") { - this.BindGrid(); + this.ProjectId = this.tvControlItem.SelectedNodeID; + //this.BindGrid(); + DataInfo(); } } #endregion @@ -91,30 +155,30 @@ namespace FineUIPro.Web.JGZL /// /// 数据绑定 /// - private void BindGrid() - { - //string projectIds = BLL.Base_ProjectService.GetStrOnProjectIds(this.CurrUser.UserId, "1"); - string strSql = @"SELECT * from JGZL_PipelineInstallationInspectionRecord 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_PipelineInstallationInspectionRecord 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 +188,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 +200,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 +212,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,8 +228,11 @@ namespace FineUIPro.Web.JGZL /// protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) { + this.ProjectId = this.drpProjectId.SelectedValue; this.InitTreeMenu(); - this.BindGrid(); + this.tvControlItem.SelectedNodeID = this.ProjectId; + DataInfo(); + //this.BindGrid(); } /// @@ -175,7 +242,7 @@ namespace FineUIPro.Web.JGZL /// protected void TextBox_TextChanged(object sender, EventArgs e) { - this.BindGrid(); + //this.BindGrid(); } #endregion @@ -195,25 +262,25 @@ namespace FineUIPro.Web.JGZL string rootPath = Server.MapPath("~/"); BLL.Common.FastReportService.ResetData(); - if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID)) - { - var report = BLL.PipelineInstallationInspectionRecordService.GetPipelineInstallationInspectionRecordById(this.Grid1.SelectedRowID); - if (report != null) - { - Dictionary keyValuePairs = new Dictionary(); - keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName); - keyValuePairs.Add("ProfessionalEngineering", report.ProfessionalEngineering); - keyValuePairs.Add("DrawingNumber", report.DrawingNumber); - keyValuePairs.Add("InspectionItems", report.InspectionItems); - keyValuePairs.Add("InspectionResults", report.InspectionResults); - BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs); - } - } - else - { - Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); - return; - } + //if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID)) + //{ + //var report = BLL.PipelineInstallationInspectionRecordService.GetPipelineInstallationInspectionRecordById(this.Grid1.SelectedRowID); + //if (report != null) + //{ + Dictionary keyValuePairs = new Dictionary(); + keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName); + keyValuePairs.Add("ProfessionalEngineering", txtProfessionalEngineering.Text.Trim()); + keyValuePairs.Add("DrawingNumber", txtDrawingNumber.Text.Trim()); + keyValuePairs.Add("InspectionItems", txtInspectionItems.Text); + keyValuePairs.Add("InspectionResults", txtInspectionResults.Text); + BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs); + //} + //} + //else + //{ + // Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); + // return; + //} initTemplatePath = "File\\Fastreport\\JGZL\\管道安装检查记录.frx"; if (File.Exists(rootPath + initTemplatePath)) { @@ -234,139 +301,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("PipelineInstallationInspectionRecordEdit.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("PipelineInstallationInspectionRecordEdit.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_PipelineInstallationInspectionRecordMenuId, BLL.Const.BtnModify)) - { - if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) - { - if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID)) - { - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PipelineInstallationInspectionRecordEdit.aspx?recordId={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_PipelineInstallationInspectionRecordMenuId, BLL.Const.BtnModify)) + // { + // if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) + // { + // if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID)) + // { + // PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PipelineInstallationInspectionRecordEdit.aspx?recordId={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_PipelineInstallationInspectionRecordMenuId, BLL.Const.BtnModify)) - { - if (Grid1.SelectedRowIndexArray.Length == 0) - { - Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); - return; - } - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PipelineInstallationInspectionRecordEdit.aspx?recordId={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_PipelineInstallationInspectionRecordMenuId, BLL.Const.BtnModify)) + // { + // if (Grid1.SelectedRowIndexArray.Length == 0) + // { + // Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); + // return; + // } + // PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PipelineInstallationInspectionRecordEdit.aspx?recordId={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_PipelineInstallationInspectionRecordMenuId, 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_PipelineInstallationInspectionRecordMenuId, 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.PipelineInstallationInspectionRecordService.DeletePipelineInstallationInspectionRecordById(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.PipelineInstallationInspectionRecordService.DeletePipelineInstallationInspectionRecordById(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 @@ -376,10 +443,128 @@ 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_PipelineInstallationInspectionRecordMenuId, Const.BtnSave)) + { + Model.JGZL_PipelineInstallationInspectionRecord newReport = new Model.JGZL_PipelineInstallationInspectionRecord(); + newReport.DrawingNumber = this.txtDrawingNumber.Text.Trim(); + newReport.ProfessionalEngineering = this.txtProfessionalEngineering.Text.Trim(); + newReport.InspectionItems = this.txtInspectionItems.Text.Trim(); + newReport.InspectionResults = this.txtInspectionResults.Text.Trim(); + //newReport.Remark = this.txtRemark.Text.Trim(); + + if (!string.IsNullOrEmpty(this.RecordId)) + { + newReport.RecordId = this.RecordId; + BLL.PipelineInstallationInspectionRecordService.UpdatePipelineInstallationInspectionRecord(newReport); + } + else + { + newReport.ProjectId = this.ProjectId; + newReport.CompileMan = this.CurrUser.UserId; + newReport.CompileDate = DateTime.Now; + newReport.Reviewer = this.CurrUser.UserId; + newReport.RevieweDate = DateTime.Now; + newReport.RecordId = SQLHelper.GetNewID(typeof(Model.JGZL_PipelineInstallationInspectionRecord)); + this.RecordId = newReport.RecordId; + BLL.PipelineInstallationInspectionRecordService.AddPipelineInstallationInspectionRecord(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_PipelineInstallationInspectionRecordUrl; + 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 professionalEngineering = doc.Range.Bookmarks["ProfessionalEngineering"]; + if (professionalEngineering != null) + { + professionalEngineering.Text = this.txtProfessionalEngineering.Text; + } + Bookmark drawingNumber = doc.Range.Bookmarks["DrawingNumber"]; + if (drawingNumber != null) + { + drawingNumber.Text = this.txtDrawingNumber.Text; + } + Bookmark inspectionItems = doc.Range.Bookmarks["InspectionItems"]; + if (inspectionItems != null) + { + inspectionItems.Text = this.txtInspectionItems.Text; + } + Bookmark inspectionResults = doc.Range.Bookmarks["InspectionResults"]; + if (inspectionResults != null) + { + inspectionResults.Text = this.txtInspectionResults.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/PipelineInstallationInspectionRecord.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/JGZL/PipelineInstallationInspectionRecord.aspx.designer.cs index 31149df..6290199 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/PipelineInstallationInspectionRecord.aspx.designer.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/PipelineInstallationInspectionRecord.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,58 @@ 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 控件。 + /// txtProfessionalEngineering 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.ToolbarText ToolbarText1; + protected global::FineUIPro.TextBox txtProfessionalEngineering; /// - /// ddlPageSize 控件。 + /// txtDrawingNumber 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.DropDownList ddlPageSize; + protected global::FineUIPro.TextBox txtDrawingNumber; /// - /// Window1 控件。 + /// txtInspectionItems 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Window Window1; + protected global::FineUIPro.TextArea txtInspectionItems; + + /// + /// txtInspectionResults 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtInspectionResults; /// /// WindowPrint 控件。 @@ -175,32 +184,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; } } diff --git a/HJGL_DS/FineUIPro.Web/JGZL/PipelinePrefabricationConstructionInspectionRecord.aspx b/HJGL_DS/FineUIPro.Web/JGZL/PipelinePrefabricationConstructionInspectionRecord.aspx index 6d62f65..f1a8d81 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/PipelinePrefabricationConstructionInspectionRecord.aspx +++ b/HJGL_DS/FineUIPro.Web/JGZL/PipelinePrefabricationConstructionInspectionRecord.aspx @@ -70,11 +70,11 @@ - + <%-- - + --%> <%-- protected global::FineUIPro.TextArea txtInspectionResults; - /// - /// txtRemark 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtRemark; - /// /// WindowPrint 控件。 /// diff --git a/HJGL_DS/FineUIPro.Web/JGZL/ProcessHandoverRecord.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/ProcessHandoverRecord.aspx.cs index 5acf330..1909740 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/ProcessHandoverRecord.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/ProcessHandoverRecord.aspx.cs @@ -96,6 +96,16 @@ namespace FineUIPro.Web.JGZL else { //默认值 + this.txtExecutionStandard.Text = "SH/T3501-2021"; + var user = BLL.Sys_UserService.GetUsersByUserId(this.CurrUser.UserId); + if (user != null) + { + if (!string.IsNullOrEmpty(user.DepartId)) + { + this.txtOrganizationalUnit.Text = BLL.Base_DepartService.GetDepart(user.DepartId).DepartName; + } + } + this.txtInspectionResults.Text = "本项目所有管道组成件及管道支撑件,均已按照设计要求的防腐等级完成防腐施工,施工工序完整合规,经外观检查、涂层厚度检测等专项验收,防腐质量全部合格,无漏涂、破损、瑕疵等问题,符合后续安装施工条件,现正式办理防腐工序交接,移交安装单位施工,相关质保资料一并移交。"; } } #endregion