修改质量接口
This commit is contained in:
@@ -36,6 +36,9 @@
|
||||
<f:Button ID="btnNew" Icon="Add" EnablePostBack="true" Hidden="true"
|
||||
runat="server">
|
||||
</f:Button>
|
||||
<f:Button ID="imgBtnFile" Text="查看文件" ToolTip="查看" Icon="PageWhiteWord" runat="server"
|
||||
OnClick="imgBtnFile_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using BLL;
|
||||
using FineUIPro.Web.ZHGL.Plan;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
@@ -390,5 +391,19 @@ namespace FineUIPro.Web.CQMS.Plan
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
protected void imgBtnFile_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Grid1.SelectedRowID))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("~/AttachFile/IndexOffice.aspx?cmd={0}|CQMSMainPlan", Grid1.SelectedRowID, "查看 -")));
|
||||
PageContext.RegisterStartupScript(Window1.GetHideReference());
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+33
-22
@@ -7,11 +7,13 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Plan {
|
||||
|
||||
|
||||
public partial class MainPlan {
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Plan
|
||||
{
|
||||
|
||||
|
||||
public partial class MainPlan
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
@@ -38,7 +40,7 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
@@ -47,7 +49,7 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
@@ -56,7 +58,7 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// hdID 控件。
|
||||
/// </summary>
|
||||
@@ -65,7 +67,7 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdID;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnNew 控件。
|
||||
/// </summary>
|
||||
@@ -74,7 +76,16 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// imgBtnFile 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button imgBtnFile;
|
||||
|
||||
/// <summary>
|
||||
/// lblPageIndex 控件。
|
||||
/// </summary>
|
||||
@@ -83,7 +94,7 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblPageIndex;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Label1 控件。
|
||||
/// </summary>
|
||||
@@ -92,7 +103,7 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Label41 控件。
|
||||
/// </summary>
|
||||
@@ -101,7 +112,7 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label41;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
@@ -110,7 +121,7 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
@@ -119,7 +130,7 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// </summary>
|
||||
@@ -128,7 +139,7 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
@@ -137,7 +148,7 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
@@ -146,7 +157,7 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuModify 控件。
|
||||
/// </summary>
|
||||
@@ -155,7 +166,7 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuModify;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuView 控件。
|
||||
/// </summary>
|
||||
@@ -164,7 +175,7 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuView;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDel 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -57,7 +57,8 @@
|
||||
<f:Button ID="imgBtnFile" Text="文件" ToolTip="上传及查看" Icon="TableCell" runat="server"
|
||||
OnClick="imgBtnFile_Click">
|
||||
</f:Button>
|
||||
|
||||
<f:DropDownList ID="drpCompanyTemplate" runat="server" Width="300px" Hidden="true" Label="公司模板" LabelAlign="Right" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
<f:Button ID="btnEditWord" Icon="PageWhiteWord" OnClick="btnEditWord_Click" runat="server" Text="编辑文档" ToolTip="编辑文档" >
|
||||
</f:Button>
|
||||
</Items>
|
||||
|
||||
@@ -58,6 +58,8 @@ namespace FineUIPro.Web.CQMS.Plan
|
||||
this.drpPerson.DataSource = (from x in Funs.DB.Person_Persons where x.UnitId == Const.UnitId_SEDIN && x.DepartId == Const.Depart_constructionId select x).ToList();
|
||||
this.drpPerson.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpPerson);
|
||||
BLL.Base_CompanytemplateService.InitBase_CompanyTemplateDownList(drpCompanyTemplate, true);
|
||||
IsHiddendrpCompanyTemplate();
|
||||
if (!string.IsNullOrEmpty(MainPlanId))
|
||||
{
|
||||
Model.Plan_MainPlan MainPlan = BLL.CQMS_MainPlanService.GetMainPlanByMainPlanId(MainPlanId);
|
||||
@@ -484,25 +486,61 @@ namespace FineUIPro.Web.CQMS.Plan
|
||||
if (!Directory.Exists(newPath))
|
||||
{
|
||||
Directory.CreateDirectory(newPath);
|
||||
}
|
||||
if (e.EventArgument == "Yes")
|
||||
{
|
||||
if (!File.Exists(path))
|
||||
{
|
||||
File.Copy(rootPath + Const.CQMSPlanTemplateUrl, path);
|
||||
|
||||
}
|
||||
}
|
||||
else if (e.EventArgument == "No")
|
||||
if (drpCompanyTemplate.SelectedValue!=Const._Null)
|
||||
{
|
||||
if (!File.Exists(path))
|
||||
{
|
||||
var stream= File.Create(path);
|
||||
stream.Close();
|
||||
}
|
||||
var template = BLL.Base_CompanytemplateService.GetBase_CompanyTemplateById(drpCompanyTemplate.SelectedValue);
|
||||
File.Copy(rootPath + template.FilePath, path);
|
||||
|
||||
|
||||
}
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/IndexOffice.aspx?cmd={0}|CQMSMainPlan", MainPlanId, "查看 -")));
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetHideReference());
|
||||
}
|
||||
private void GetCompanyTemplate()
|
||||
{
|
||||
string rootPath = Funs.RootPath;
|
||||
var model = BLL.CQMS_MainPlanService.GetMainPlanByMainPlanId(MainPlanId);
|
||||
string filepath = model.FilePath;
|
||||
string path = rootPath + filepath;
|
||||
DirectoryInfo pathInfo = new DirectoryInfo(path);
|
||||
string newPath = pathInfo.Parent.FullName;
|
||||
if (!Directory.Exists(newPath))
|
||||
{
|
||||
Directory.CreateDirectory(newPath);
|
||||
}
|
||||
if (drpCompanyTemplate.SelectedValue != Const._Null)
|
||||
{
|
||||
var template = BLL.Base_CompanytemplateService.GetBase_CompanyTemplateById(drpCompanyTemplate.SelectedValue);
|
||||
File.Copy(rootPath + template.FilePath, path);
|
||||
|
||||
|
||||
}
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/IndexOffice.aspx?cmd={0}|CQMSMainPlan", MainPlanId, "查看 -")));
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetHideReference());
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 是否隐藏选择模板
|
||||
/// </summary>
|
||||
protected void IsHiddendrpCompanyTemplate()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(MainPlanId))
|
||||
{
|
||||
Model.Plan_MainPlan MainPlan = BLL.CQMS_MainPlanService.GetMainPlanByMainPlanId(MainPlanId);
|
||||
if (!File.Exists(Funs.RootPath + MainPlan.FilePath))
|
||||
{
|
||||
|
||||
drpCompanyTemplate.Hidden= false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
drpCompanyTemplate.Hidden = false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
protected void btnEditWord_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -512,12 +550,12 @@ namespace FineUIPro.Web.CQMS.Plan
|
||||
Model.Plan_MainPlan MainPlan = BLL.CQMS_MainPlanService.GetMainPlanByMainPlanId(MainPlanId);
|
||||
if (!File.Exists(Funs.RootPath + MainPlan.FilePath))
|
||||
{
|
||||
|
||||
PageContext.RegisterStartupScript(Confirm.GetShowReference("是否使用公司模板?",
|
||||
String.Empty,
|
||||
MessageBoxIcon.Question,
|
||||
PageManager1.GetCustomEventReference("Yes"), // 第一个参数 false 用来指定当前不是AJAX请求
|
||||
PageManager1.GetCustomEventReference("No")));
|
||||
GetCompanyTemplate();
|
||||
//PageContext.RegisterStartupScript(Confirm.GetShowReference("是否使用公司模板?",
|
||||
// String.Empty,
|
||||
// MessageBoxIcon.Question,
|
||||
// PageManager1.GetCustomEventReference("Yes"), // 第一个参数 false 用来指定当前不是AJAX请求
|
||||
// PageManager1.GetCustomEventReference("No")));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -529,14 +567,9 @@ namespace FineUIPro.Web.CQMS.Plan
|
||||
else
|
||||
{
|
||||
SaveMainPlan("save");
|
||||
|
||||
PageContext.RegisterStartupScript(Confirm.GetShowReference("是否使用公司模板?",
|
||||
String.Empty,
|
||||
MessageBoxIcon.Question,
|
||||
PageManager1.GetCustomEventReference("Yes"), // 第一个参数 false 用来指定当前不是AJAX请求
|
||||
PageManager1.GetCustomEventReference("No")));
|
||||
GetCompanyTemplate();
|
||||
}
|
||||
//PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/IndexOffice.aspx?cmd={0}", filepath, "查看 -")));
|
||||
}
|
||||
//PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/IndexOffice.aspx?cmd={0}", filepath, "查看 -")));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -113,6 +113,15 @@ namespace FineUIPro.Web.CQMS.Plan
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button imgBtnFile;
|
||||
|
||||
/// <summary>
|
||||
/// drpCompanyTemplate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpCompanyTemplate;
|
||||
|
||||
/// <summary>
|
||||
/// btnEditWord 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -96,6 +96,9 @@
|
||||
</f:Button>
|
||||
<f:Button ID="btnNew" ToolTip="编制" Icon="Add" EnablePostBack="false" runat="server">
|
||||
</f:Button>
|
||||
<f:Button ID="imgBtnFile" Text="查看文件" ToolTip="查看" Icon="PageWhiteWord" runat="server"
|
||||
OnClick="imgBtnFile_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
|
||||
|
||||
@@ -357,5 +357,19 @@ namespace FineUIPro.Web.CQMS.Plan
|
||||
}
|
||||
return "";
|
||||
}
|
||||
protected void imgBtnFile_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Grid1.SelectedRowID))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("~/AttachFile/IndexOffice.aspx?cmd={0}|CQMSSubPlan", Grid1.SelectedRowID, "查看 -")));
|
||||
PageContext.RegisterStartupScript(Window1.GetHideReference());
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+40
-29
@@ -7,11 +7,13 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Plan {
|
||||
|
||||
|
||||
public partial class SubPlan {
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Plan
|
||||
{
|
||||
|
||||
|
||||
public partial class SubPlan
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
@@ -38,7 +40,7 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
@@ -47,7 +49,7 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
@@ -56,7 +58,7 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpUnitWork 控件。
|
||||
/// </summary>
|
||||
@@ -65,7 +67,7 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUnitWork;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpCNProfessional 控件。
|
||||
/// </summary>
|
||||
@@ -74,7 +76,7 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpCNProfessional;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
@@ -83,7 +85,7 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpProposeUnit 控件。
|
||||
/// </summary>
|
||||
@@ -92,7 +94,7 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpProposeUnit;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpState 控件。
|
||||
/// </summary>
|
||||
@@ -101,7 +103,7 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpState;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnQuery 控件。
|
||||
/// </summary>
|
||||
@@ -110,7 +112,7 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnQuery;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnRset 控件。
|
||||
/// </summary>
|
||||
@@ -119,7 +121,7 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnRset;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnNew 控件。
|
||||
/// </summary>
|
||||
@@ -128,7 +130,16 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// imgBtnFile 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button imgBtnFile;
|
||||
|
||||
/// <summary>
|
||||
/// lblPageIndex 控件。
|
||||
/// </summary>
|
||||
@@ -137,7 +148,7 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblPageIndex;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Label1 控件。
|
||||
/// </summary>
|
||||
@@ -146,7 +157,7 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Label41 控件。
|
||||
/// </summary>
|
||||
@@ -155,7 +166,7 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label41;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
@@ -164,7 +175,7 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
@@ -173,7 +184,7 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// </summary>
|
||||
@@ -182,7 +193,7 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
@@ -191,7 +202,7 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// window_tt 控件。
|
||||
/// </summary>
|
||||
@@ -200,7 +211,7 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window window_tt;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
@@ -209,7 +220,7 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuModify 控件。
|
||||
/// </summary>
|
||||
@@ -218,7 +229,7 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuModify;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuView 控件。
|
||||
/// </summary>
|
||||
@@ -227,7 +238,7 @@ namespace FineUIPro.Web.CQMS.Plan {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuView;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDel 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -117,6 +117,9 @@
|
||||
<f:Label runat="server" Text="<span style='color:red;'>*</span>附件:" EncodeText="false" ShowRedStar="true" Label="附件:" CssStyle="padding-left:48px" Width="110px" CssClass="marginr" ShowLabel="false" ></f:Label>
|
||||
<f:Button ID="imgBtnFile" Text="附件" ToolTip="上传及查看" Icon="TableCell" OnClick="imgBtnFile_Click" runat="server">
|
||||
</f:Button>
|
||||
|
||||
<f:DropDownList ID="drpCompanyTemplate" runat="server" Width="300px" Hidden="true" Label="公司模板" LabelAlign="Right" EnableEdit="true" >
|
||||
</f:DropDownList>
|
||||
<f:Button ID="btnEditWord" Icon="PageWhiteWord" OnClick="btnEditWord_Click" runat="server" Text="编辑文档" ToolTip="编辑文档" >
|
||||
</f:Button>
|
||||
</Items>
|
||||
|
||||
@@ -71,6 +71,8 @@ namespace FineUIPro.Web.CQMS.Plan
|
||||
//CommonService.GetAllButtonList(CurrUser.LoginProjectId, CurrUser.PersonId, Const.SubPlanMenuId);
|
||||
txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
SubPlanId = Request.Params["SubPlanId"];
|
||||
BLL.Base_CompanytemplateService.InitBase_CompanyTemplateDownList(drpCompanyTemplate, true);
|
||||
IsHiddendrpCompanyTemplate();
|
||||
if (!string.IsNullOrWhiteSpace(SubPlanId))
|
||||
{
|
||||
HFSubPlanId.Text = SubPlanId;
|
||||
@@ -832,11 +834,8 @@ namespace FineUIPro.Web.CQMS.Plan
|
||||
if (!File.Exists(Funs.RootPath + model.FilePath))
|
||||
{
|
||||
|
||||
PageContext.RegisterStartupScript(Confirm.GetShowReference("是否使用公司模板?",
|
||||
String.Empty,
|
||||
MessageBoxIcon.Question,
|
||||
PageManager1.GetCustomEventReference("Yes"), // 第一个参数 false 用来指定当前不是AJAX请求
|
||||
PageManager1.GetCustomEventReference("No")));
|
||||
GetCompanyTemplate();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -849,13 +848,54 @@ namespace FineUIPro.Web.CQMS.Plan
|
||||
{
|
||||
SaveSubPlan("save");
|
||||
|
||||
PageContext.RegisterStartupScript(Confirm.GetShowReference("是否使用公司模板?",
|
||||
String.Empty,
|
||||
MessageBoxIcon.Question,
|
||||
PageManager1.GetCustomEventReference("Yes"), // 第一个参数 false 用来指定当前不是AJAX请求
|
||||
PageManager1.GetCustomEventReference("No")));
|
||||
GetCompanyTemplate();
|
||||
|
||||
}
|
||||
//PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/IndexOffice.aspx?cmd={0}", filepath, "查看 -")));
|
||||
}
|
||||
|
||||
private void GetCompanyTemplate()
|
||||
{
|
||||
string rootPath = Funs.RootPath;
|
||||
var model = BLL.CQMS_SubPlanService.GetSubPlanBySubPlanId(SubPlanId);
|
||||
string filepath = model.FilePath;
|
||||
string path = rootPath + filepath;
|
||||
DirectoryInfo pathInfo = new DirectoryInfo(path);
|
||||
string newPath = pathInfo.Parent.FullName;
|
||||
if (!Directory.Exists(newPath))
|
||||
{
|
||||
Directory.CreateDirectory(newPath);
|
||||
}
|
||||
if (drpCompanyTemplate.SelectedValue != Const._Null)
|
||||
{
|
||||
var template = BLL.Base_CompanytemplateService.GetBase_CompanyTemplateById(drpCompanyTemplate.SelectedValue);
|
||||
File.Copy(rootPath + template.FilePath, path);
|
||||
|
||||
|
||||
}
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/IndexOffice.aspx?cmd={0}|CQMSSubPlan", SubPlanId, "查看 -")));
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetHideReference());
|
||||
|
||||
}
|
||||
protected void IsHiddendrpCompanyTemplate()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(SubPlanId))
|
||||
{
|
||||
Model.Plan_SubPlan SubPlan = BLL.CQMS_SubPlanService.GetSubPlanBySubPlanId(SubPlanId);
|
||||
if (!File.Exists(Funs.RootPath + SubPlan.FilePath))
|
||||
{
|
||||
|
||||
drpCompanyTemplate.Hidden = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
drpCompanyTemplate.Hidden = false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -158,6 +158,15 @@ namespace FineUIPro.Web.CQMS.Plan
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button imgBtnFile;
|
||||
|
||||
/// <summary>
|
||||
/// drpCompanyTemplate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpCompanyTemplate;
|
||||
|
||||
/// <summary>
|
||||
/// btnEditWord 控件。
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user