diff --git a/DataBase/版本日志/SGGLDB_V2023-03-14.sql b/DataBase/版本日志/SGGLDB_V2023-03-14.sql
new file mode 100644
index 00000000..046b6c10
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_V2023-03-14.sql
@@ -0,0 +1,30 @@
+INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+ VALUES('FBE29945-515F-4CE0-B36E-444E4E3C047C','˾ļģ','BaseInfo/Companytemplate.aspx',75,'A93BA810-3511-4BB2-9C10-9663351DF79F','Menu_SysSet',1,1,1)
+ GO
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('5239F3C5-D659-40CF-8C10-5ECAA11D738C','FBE29945-515F-4CE0-B36E-444E4E3C047C','',1)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('B08DD0BC-FA16-4F13-8A66-369470C64D4B','FBE29945-515F-4CE0-B36E-444E4E3C047C','',2)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('00B56BB0-6B46-411E-813D-B3BD4AA7B333','FBE29945-515F-4CE0-B36E-444E4E3C047C','ɾ',3)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('D3689685-E16E-4AB2-8641-29416551F048','FBE29945-515F-4CE0-B36E-444E4E3C047C','',4)
+ GO
+
+CREATE TABLE [dbo].[Base_CompanyTemplate](
+ [TemplateId] [varchar](50) NOT NULL,
+ [Code] [varchar](50) NULL,
+ [Name] [varchar](100) NULL,
+ [FilePath] [varchar](300) NULL,
+ [Remarks] [varchar](300) NULL,
+ CONSTRAINT [PK_Base_CompanyTemplate] PRIMARY KEY CLUSTERED
+(
+ [TemplateId] ASC
+)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
+) ON [PRIMARY]
+
+GO
+
+SET ANSI_PADDING OFF
+GO
+
\ No newline at end of file
diff --git a/DataBase/菜单初始化脚本/0-0系统设置(Menu_SysSet).sql b/DataBase/菜单初始化脚本/0-0系统设置(Menu_SysSet).sql
index a286b3c4..844eab08 100644
--- a/DataBase/菜单初始化脚本/0-0系统设置(Menu_SysSet).sql
+++ b/DataBase/菜单初始化脚本/0-0系统设置(Menu_SysSet).sql
@@ -362,7 +362,18 @@ GO
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('D4A41AEC-10F3-44CD-B1D5-403E754AAC9C','99C99DF8-103F-4CA4-83CB-A6C924B5A698','',4)
GO
-
+ INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+ VALUES('FBE29945-515F-4CE0-B36E-444E4E3C047C','˾ļģ','BaseInfo/Companytemplate.aspx',75,'A93BA810-3511-4BB2-9C10-9663351DF79F','Menu_SysSet',1,1,1)
+ GO
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('5239F3C5-D659-40CF-8C10-5ECAA11D738C','FBE29945-515F-4CE0-B36E-444E4E3C047C','',1)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('B08DD0BC-FA16-4F13-8A66-369470C64D4B','FBE29945-515F-4CE0-B36E-444E4E3C047C','',2)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('00B56BB0-6B46-411E-813D-B3BD4AA7B333','FBE29945-515F-4CE0-B36E-444E4E3C047C','ɾ',3)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('D3689685-E16E-4AB2-8641-29416551F048','FBE29945-515F-4CE0-B36E-444E4E3C047C','',4)
+ GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('164CDCED-E794-4177-AADE-23CA8E1AA1B8','ѵ','BaseInfo/CQMSTrainType.aspx',80,'A93BA810-3511-4BB2-9C10-9663351DF79F','Menu_SysSet',1,1,1)
GO
diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj
index 3a63a896..35868507 100644
--- a/SGGL/BLL/BLL.csproj
+++ b/SGGL/BLL/BLL.csproj
@@ -211,6 +211,7 @@
+
diff --git a/SGGL/BLL/BaseInfo/BaseCompanytemplateService.cs b/SGGL/BLL/BaseInfo/BaseCompanytemplateService.cs
new file mode 100644
index 00000000..6d1a6d20
--- /dev/null
+++ b/SGGL/BLL/BaseInfo/BaseCompanytemplateService.cs
@@ -0,0 +1,157 @@
+using FineUIPro;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+
+namespace BLL
+{
+
+ public static class Base_CompanytemplateService
+ {
+ public static Model.SGGLDB db = Funs.DB;
+
+
+ #region 获取列表
+ ///
+ /// 记录数
+ ///
+ public static int count
+ {
+ get;
+ set;
+ }
+ public static List GetBase_CompanyTemplateByModle(Model.Base_CompanyTemplate table)
+ {
+ var q= from x in db.Base_CompanyTemplate
+ where
+ ( string.IsNullOrEmpty(table.TemplateId)||x.TemplateId.Contains(table.TemplateId)) &&
+ ( string.IsNullOrEmpty(table.Code)||x.Code.Contains(table.Code)) &&
+ ( string.IsNullOrEmpty(table.Name)||x.Name.Contains(table.Name)) &&
+ ( string.IsNullOrEmpty(table.FilePath)||x.FilePath.Contains(table.FilePath)) &&
+ ( string.IsNullOrEmpty(table.Remarks)||x.Remarks.Contains(table.Remarks))
+ select x
+ ;
+
+ return q.ToList();
+ }
+
+ /// 获取分页列表
+ ///
+ /// 页码
+ /// 每页数量
+ ///
+ public static IEnumerable getListData(Model.Base_CompanyTemplate table, Grid Grid1)
+ {
+ var q= GetBase_CompanyTemplateByModle(table);
+ count = q.Count();
+ if (count == 0)
+ {
+ return null;
+ }
+ // q= q.Take(Grid1.PageSize * Grid1.PageIndex).Skip(Grid1.PageSize * (Grid1.PageIndex)).ToList();
+ // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
+ return from x in q
+ select new
+ {
+ x.TemplateId,
+ x.Code,
+ x.Name,
+ x.FilePath,
+ x.Remarks,
+
+ };
+ }
+ #endregion
+
+ public static Model.Base_CompanyTemplate GetBase_CompanyTemplateById(string TemplateId)
+ {
+ return db.Base_CompanyTemplate.FirstOrDefault(x=>x.TemplateId==TemplateId);
+ }
+ public static Model.Base_CompanyTemplate GetBase_CompanyTemplateByCode(string Code)
+ {
+ return db.Base_CompanyTemplate.FirstOrDefault(x => x.Code== Code);
+ }
+ public static bool IsExitCode(string Code)
+ {
+ bool result = false;
+ var q= (from x in db.Base_CompanyTemplate where x.Code ==Code select x ).FirstOrDefault();
+ if (q!=null)
+ {
+ result = true;
+ }
+ return result;
+ }
+
+ public static void AddBase_CompanyTemplate(Model.Base_CompanyTemplate newtable)
+ {
+
+ Model.Base_CompanyTemplate table = new Model.Base_CompanyTemplate{
+ TemplateId=newtable.TemplateId,
+ Code=newtable.Code,
+ Name=newtable.Name,
+ FilePath=newtable.FilePath,
+ Remarks=newtable.Remarks,
+ };
+ db.Base_CompanyTemplate.InsertOnSubmit(table);
+ db.SubmitChanges();
+ }
+
+ public static void AddBulkBase_CompanyTemplate(List newtables)
+ {
+
+ db.Base_CompanyTemplate.InsertAllOnSubmit(newtables);
+ db.SubmitChanges();
+ }
+
+
+ public static void UpdateBase_CompanyTemplate(Model.Base_CompanyTemplate newtable)
+ {
+
+ Model.Base_CompanyTemplate table = db.Base_CompanyTemplate.FirstOrDefault(x=>x.TemplateId==newtable.TemplateId);
+ if (table != null)
+ {
+ table.TemplateId=newtable.TemplateId;
+ table.Code=newtable.Code;
+ table.Name=newtable.Name;
+ table.FilePath=newtable.FilePath;
+ table.Remarks=newtable.Remarks;
+ db.SubmitChanges();
+ }
+
+ }
+ public static void DeleteBase_CompanyTemplateById (string TemplateId)
+ {
+
+ Model.Base_CompanyTemplate table =db.Base_CompanyTemplate.FirstOrDefault(x=>x.TemplateId==TemplateId);
+ if (table != null)
+ {
+ db.Base_CompanyTemplate.DeleteOnSubmit(table);
+ db.SubmitChanges();
+ }
+
+ }
+
+ public static void DeleteALLBase_CompanyTemplate ()
+ {
+ if( db.Base_CompanyTemplate !=null)
+ {
+ db.Base_CompanyTemplate.DeleteAllOnSubmit( db.Base_CompanyTemplate);
+ db.SubmitChanges();
+ }
+ }
+ public static void InitBase_CompanyTemplateDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
+ {
+ dropName.DataValueField = "TemplateId";
+ dropName.DataTextField = "Name";
+ dropName.DataSource = GetBase_CompanyTemplateByModle(new Model.Base_CompanyTemplate());
+ dropName.DataBind();
+ if (isShowPlease)
+ {
+ Funs.FineUIPleaseSelect(dropName);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs
index 57450334..77de9e77 100644
--- a/SGGL/BLL/Common/Const.cs
+++ b/SGGL/BLL/Common/Const.cs
@@ -1020,6 +1020,10 @@
/// 公司质量样板
///
public const string CompanyModelMenuId = "99C99DF8-103F-4CA4-83CB-A6C924B5A698";
+ ///
+ /// 公司文件模板
+ ///
+ public const string CompanyTemplateMenuId = "FBE29945-515F-4CE0-B36E-444E4E3C047C";
///
/// 培训类别
diff --git a/SGGL/FineUIPro.Web/AttachFile/EditOffice.aspx.cs b/SGGL/FineUIPro.Web/AttachFile/EditOffice.aspx.cs
index f1f2f823..49a69429 100644
--- a/SGGL/FineUIPro.Web/AttachFile/EditOffice.aspx.cs
+++ b/SGGL/FineUIPro.Web/AttachFile/EditOffice.aspx.cs
@@ -34,6 +34,12 @@ namespace WordEdit
string filepath = model.FilePath;
url = Funs.SGGLUrl + filepath;
}
+ else if (a[1]== "Companytemplate")
+ {
+ var model = BLL.Base_CompanytemplateService.GetBase_CompanyTemplateById(a[0]);
+ string filepath = model.FilePath;
+ url = Funs.SGGLUrl + filepath;
+ }
}
diff --git a/SGGL/FineUIPro.Web/BaseInfo/Companytemplate.aspx b/SGGL/FineUIPro.Web/BaseInfo/Companytemplate.aspx
new file mode 100644
index 00000000..b1449087
--- /dev/null
+++ b/SGGL/FineUIPro.Web/BaseInfo/Companytemplate.aspx
@@ -0,0 +1,121 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Companytemplate.aspx.cs" Inherits="FineUIPro.Web.BaseInfo.Companytemplate" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/BaseInfo/Companytemplate.aspx.cs b/SGGL/FineUIPro.Web/BaseInfo/Companytemplate.aspx.cs
new file mode 100644
index 00000000..c94aa6f9
--- /dev/null
+++ b/SGGL/FineUIPro.Web/BaseInfo/Companytemplate.aspx.cs
@@ -0,0 +1,261 @@
+using BLL;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Web;
+using System.Web.UI;
+using AspNet=System.Web.UI.WebControls;
+
+namespace FineUIPro.Web.BaseInfo
+{
+ public partial class Companytemplate : PageBase
+ {
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ this.GetButtonPower();
+ this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
+ // 绑定表格
+ this.BindGrid();
+ }
+ }
+
+ #region 绑定数据
+ ///
+ /// 绑定数据
+ ///
+ private void BindGrid()
+ {
+ Model.Base_CompanyTemplate table = new Model.Base_CompanyTemplate();
+ var tb = BLL.Base_CompanytemplateService.getListData(table, Grid1);
+ Grid1.RecordCount = Base_CompanytemplateService.count;
+ //tb = GetFilteredTable(Grid1.FilteredData, tb);
+ Grid1.DataSource = tb;
+ Grid1.DataBind();
+ }
+ #endregion
+
+ #region GV 数据操作
+ ///
+ /// 过滤表头
+ ///
+ ///
+ ///
+ //protected void Grid1_FilterChange(object sender, EventArgs e)
+ //{
+ // this.BindGrid();
+ //}
+
+ ///
+ /// 分页
+ ///
+ ///
+ ///
+ protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
+ {
+ this.Grid1.PageIndex = e.NewPageIndex;
+ this.BindGrid();
+ }
+
+ ///
+ /// 排序
+ ///
+ ///
+ ///
+ protected void Grid1_Sort(object sender, GridSortEventArgs e)
+ {
+ this.Grid1.SortDirection = e.SortDirection;
+ this.Grid1.SortField = e.SortField;
+ this.BindGrid();
+ }
+
+ ///
+ /// 分页显示条数下拉框
+ ///
+ ///
+ ///
+ protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue);
+ this.BindGrid();
+ }
+ #endregion
+
+ #region 数据编辑事件
+ ///
+ /// 新增
+ ///
+ ///
+ ///
+ protected void btnNew_Click(object sender, EventArgs e)
+ {
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CompanytemplateEdit.aspx?TemplateId={0}", string.Empty, "增加 - ")));
+ }
+
+ ///
+ /// 编辑按钮
+ ///
+ ///
+ ///
+ protected void btnEdit_Click(object sender, EventArgs e)
+ {
+ if (Grid1.SelectedRowIndexArray.Length == 0)
+ {
+ Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
+ return;
+ }
+ string ID = Grid1.SelectedRowID;
+ var model = BLL.Base_CompanytemplateService.GetBase_CompanyTemplateById(ID);
+ if (model != null) ///已上报时不能删除
+ {
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CompanytemplateEdit.aspx?TemplateId={0}", ID, "编辑 - ")));
+ }
+ }
+ protected void imgBtnFile_Click(object sender, EventArgs e)
+ {
+ if (!string.IsNullOrEmpty(Grid1.SelectedRowID))
+ {
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("~/AttachFile/IndexOffice.aspx?cmd={0}|Companytemplate", Grid1.SelectedRowID, "查看 -")));
+ PageContext.RegisterStartupScript(Window1.GetHideReference());
+
+ }
+ else
+ {
+ Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
+ return;
+ }
+ }
+ ///
+ /// Grid行双击事件
+ ///
+ ///
+ ///
+ protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
+ {
+ this.btnEdit_Click(null, null);
+ }
+
+ ///
+ /// 批量删除
+ ///
+ ///
+ ///
+ protected void btnDelete_Click(object sender, EventArgs e)
+ {
+ if (Grid1.SelectedRowIndexArray.Length > 0)
+ {
+ foreach (int rowIndex in Grid1.SelectedRowIndexArray)
+ {
+ string rowID = Grid1.DataKeys[rowIndex][0].ToString();
+ var model = BLL.Base_CompanytemplateService.GetBase_CompanyTemplateById(rowID);
+ if (model != null)
+ {
+ BLL.Base_CompanytemplateService.DeleteBase_CompanyTemplateById(rowID);
+ }
+ }
+
+ BindGrid();
+ ShowNotify("删除数据成功!", MessageBoxIcon.Success);
+ }
+ }
+ #endregion
+
+ #region 关闭弹出窗
+ ///
+ /// 关闭弹出窗
+ ///
+ ///
+ ///
+ protected void Window1_Close(object sender, WindowCloseEventArgs e)
+ {
+ BindGrid();
+ }
+ #endregion
+
+ #region 获取权限按钮
+ ///
+ /// 获取按钮权限
+ ///
+ ///
+ ///
+ private void GetButtonPower()
+ {
+ var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.CompanyTemplateMenuId);
+ if (buttonList.Count > 0)
+ {
+ if (buttonList.Contains(BLL.Const.BtnAdd))
+ {
+ this.btnNew.Hidden = false;
+ }
+ if (buttonList.Contains(BLL.Const.BtnModify))
+ {
+ this.btnMenuEdit.Hidden = false;
+ }
+ if (buttonList.Contains(BLL.Const.BtnDelete))
+ {
+ this.btnMenuDelete.Hidden = false;
+ }
+ }
+ }
+ #endregion
+
+ #region 导出按钮
+ /// 导出按钮
+ ///
+ ///
+ ///
+ protected void btnOut_Click(object sender, EventArgs e)
+ {
+ Response.ClearContent();
+ string filename = Funs.GetNewFileName();
+ Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("" + filename, System.Text.Encoding.UTF8) + ".xls");
+ Response.ContentType = "application/excel";
+ Response.ContentEncoding = System.Text.Encoding.UTF8;
+ this.Grid1.PageSize = 500;
+ this.BindGrid();
+ Response.Write(GetGridTableHtml(Grid1));
+ Response.End();
+ }
+
+ ///
+ /// 导出方法
+ ///
+ ///
+ ///
+ private string GetGridTableHtml(Grid grid)
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("");
+ sb.Append("");
+ sb.Append("");
+ foreach (GridColumn column in grid.Columns)
+ {
+ sb.AppendFormat("| {0} | ", column.HeaderText);
+ }
+ sb.Append("
");
+ foreach (GridRow row in grid.Rows)
+ {
+ sb.Append("");
+ foreach (GridColumn column in grid.Columns)
+ {
+ string html = row.Values[column.ColumnIndex].ToString();
+ if (column.ColumnID == "tfNumber")
+ {
+ html = (row.FindControl("lblNumber") as AspNet.Label).Text;
+ }
+ sb.AppendFormat("| {0} | ", html);
+ }
+
+ sb.Append("
");
+ }
+
+ sb.Append("
");
+
+ return sb.ToString();
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/BaseInfo/Companytemplate.aspx.designer.cs b/SGGL/FineUIPro.Web/BaseInfo/Companytemplate.aspx.designer.cs
new file mode 100644
index 00000000..f8004061
--- /dev/null
+++ b/SGGL/FineUIPro.Web/BaseInfo/Companytemplate.aspx.designer.cs
@@ -0,0 +1,152 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.BaseInfo
+{
+
+
+ public partial class Companytemplate
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// Panel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel1;
+
+ ///
+ /// Grid1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid1;
+
+ ///
+ /// Toolbar2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar2;
+
+ ///
+ /// btnNew 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnNew;
+
+ ///
+ /// imgBtnFile 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button imgBtnFile;
+
+ ///
+ /// lblNumber 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label lblNumber;
+
+ ///
+ /// ToolbarSeparator1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
+
+ ///
+ /// ToolbarText1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarText ToolbarText1;
+
+ ///
+ /// ddlPageSize 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList ddlPageSize;
+
+ ///
+ /// Window1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window Window1;
+
+ ///
+ /// Menu1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Menu Menu1;
+
+ ///
+ /// btnMenuEdit 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuEdit;
+
+ ///
+ /// btnMenuDelete 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuDelete;
+ }
+}
diff --git a/SGGL/FineUIPro.Web/BaseInfo/CompanytemplateEdit.aspx b/SGGL/FineUIPro.Web/BaseInfo/CompanytemplateEdit.aspx
new file mode 100644
index 00000000..201bf4b9
--- /dev/null
+++ b/SGGL/FineUIPro.Web/BaseInfo/CompanytemplateEdit.aspx
@@ -0,0 +1,57 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CompanytemplateEdit.aspx.cs" Inherits="FineUIPro.Web.BaseInfo.CompanytemplateEdit" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/BaseInfo/CompanytemplateEdit.aspx.cs b/SGGL/FineUIPro.Web/BaseInfo/CompanytemplateEdit.aspx.cs
new file mode 100644
index 00000000..8c3fcef2
--- /dev/null
+++ b/SGGL/FineUIPro.Web/BaseInfo/CompanytemplateEdit.aspx.cs
@@ -0,0 +1,165 @@
+using BLL;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace FineUIPro.Web.BaseInfo
+{
+ public partial class CompanytemplateEdit : PageBase
+ {
+ #region
+ ///
+ /// 主键
+ ///
+ public string TemplateId
+ {
+ get
+ {
+ return (string)ViewState["TemplateId"];
+ }
+ set
+ {
+ ViewState["TemplateId"] = value;
+ }
+ }
+ #endregion
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
+ ////权限按钮方法
+ this.GetButtonPower();
+ this.TemplateId = Request.Params["TemplateId"];
+ if (!string.IsNullOrEmpty(this.TemplateId))
+ {
+ Model.Base_CompanyTemplate model = BLL.Base_CompanytemplateService.GetBase_CompanyTemplateById(this.TemplateId);
+ if (model != null)
+ {
+ this.txtCode.Text = model.Code;
+ this.txtName.Text = model.Name;
+ this.txtRemarks.Text = model.Remarks;
+
+ }
+ }
+ }
+ }
+
+ ///
+ /// 保存按钮
+ ///
+ ///
+ ///
+ protected void btnSave_Click(object sender, EventArgs e)
+ {
+ if (Save())
+ {
+ PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
+
+ }
+ }
+
+ private bool Save()
+ {
+ bool result=true;
+ var q = BLL.Base_CompanytemplateService.GetBase_CompanyTemplateByCode(this.txtCode.Text);
+ if (q != null && q.TemplateId != this.TemplateId)
+ {
+ ShowNotify("文件编号不能重复", MessageBoxIcon.Warning);
+ result = false;
+ return result;
+
+ }
+
+ Model.Base_CompanyTemplate table = new Model.Base_CompanyTemplate();
+ table.Code = this.txtCode.Text;
+ table.Name = this.txtName.Text;
+ table.FilePath = "FileUpload/Companytemplate/" + txtCode.Text + ".doc";
+ table.Remarks = this.txtRemarks.Text;
+ if (!File.Exists(Funs.RootPath + table.FilePath))
+ {
+ string rootPath = Funs.RootPath;
+ string filepath = table.FilePath;
+ string path = rootPath + filepath;
+ DirectoryInfo pathInfo = new DirectoryInfo(path);
+ string newPath = pathInfo.Parent.FullName;
+ if (!Directory.Exists(newPath))
+ {
+ Directory.CreateDirectory(newPath);
+ }
+ var stream = File.Create(path);
+ stream.Close();
+ }
+ if (string.IsNullOrEmpty(this.TemplateId))
+ {
+ table.TemplateId = SQLHelper.GetNewID(typeof(Model.Base_CompanyTemplate));
+ TemplateId = table.TemplateId;
+ BLL.Base_CompanytemplateService.AddBase_CompanyTemplate(table);
+
+ }
+ else
+ {
+ table.TemplateId = this.TemplateId;
+ BLL.Base_CompanytemplateService.UpdateBase_CompanyTemplate(table);
+ }
+ return result;
+ }
+
+
+ #region 获取按钮权限
+ ///
+ /// 获取按钮权限
+ ///
+ ///
+ ///
+ private void GetButtonPower()
+ {
+ var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.CompanyTemplateMenuId);
+ if (buttonList.Count() > 0)
+ {
+ if (buttonList.Contains(BLL.Const.BtnSave))
+ {
+ this.btnSave.Hidden = false;
+ }
+ }
+ }
+ #endregion
+
+ protected void btnEditWord_Click(object sender, EventArgs e)
+ {
+ if (string.IsNullOrEmpty(TemplateId))
+ {
+ Save();
+ }
+
+ Model.Base_CompanyTemplate table = BLL.Base_CompanytemplateService.GetBase_CompanyTemplateById(TemplateId);
+ if (!File.Exists(Funs.RootPath + table.FilePath))
+ {
+ string rootPath = Funs.RootPath;
+ string filepath = table.FilePath;
+ string path = rootPath + filepath;
+ DirectoryInfo pathInfo = new DirectoryInfo(path);
+ string newPath = pathInfo.Parent.FullName;
+ if (!Directory.Exists(newPath))
+ {
+ Directory.CreateDirectory(newPath);
+ }
+ var stream = File.Create(path);
+ stream.Close();
+ }
+ else
+ {
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("~/AttachFile/IndexOffice.aspx?cmd={0}|Companytemplate", TemplateId, "查看 -")));
+ PageContext.RegisterStartupScript(Window1.GetHideReference());
+
+ }
+ }
+
+
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/BaseInfo/CompanytemplateEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/BaseInfo/CompanytemplateEdit.aspx.designer.cs
new file mode 100644
index 00000000..26990e01
--- /dev/null
+++ b/SGGL/FineUIPro.Web/BaseInfo/CompanytemplateEdit.aspx.designer.cs
@@ -0,0 +1,116 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.BaseInfo
+{
+
+
+ public partial class CompanytemplateEdit
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// SimpleForm1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form SimpleForm1;
+
+ ///
+ /// txtCode 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtCode;
+
+ ///
+ /// txtName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtName;
+
+ ///
+ /// txtRemarks 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtRemarks;
+
+ ///
+ /// btnEditWord 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnEditWord;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// btnSave 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSave;
+
+ ///
+ /// btnClose 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnClose;
+
+ ///
+ /// Window1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window Window1;
+ }
+}
diff --git a/SGGL/FineUIPro.Web/CQMS/Plan/MainPlan.aspx b/SGGL/FineUIPro.Web/CQMS/Plan/MainPlan.aspx
index 1c68dbae..2829d2a9 100644
--- a/SGGL/FineUIPro.Web/CQMS/Plan/MainPlan.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Plan/MainPlan.aspx
@@ -36,7 +36,7 @@
-
diff --git a/SGGL/FineUIPro.Web/CQMS/Plan/MainPlanEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Plan/MainPlanEdit.aspx
index e9804240..87de7515 100644
--- a/SGGL/FineUIPro.Web/CQMS/Plan/MainPlanEdit.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Plan/MainPlanEdit.aspx
@@ -57,7 +57,8 @@
-
+
+
diff --git a/SGGL/FineUIPro.Web/CQMS/Plan/MainPlanEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Plan/MainPlanEdit.aspx.cs
index 0a646cbd..51593397 100644
--- a/SGGL/FineUIPro.Web/CQMS/Plan/MainPlanEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Plan/MainPlanEdit.aspx.cs
@@ -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());
+
+ }
+ ///
+ /// 是否隐藏选择模板
+ ///
+ 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, "查看 -")));
+ }
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/CQMS/Plan/MainPlanEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Plan/MainPlanEdit.aspx.designer.cs
index 1ba9e42b..82dc40d9 100644
--- a/SGGL/FineUIPro.Web/CQMS/Plan/MainPlanEdit.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Plan/MainPlanEdit.aspx.designer.cs
@@ -113,6 +113,15 @@ namespace FineUIPro.Web.CQMS.Plan
///
protected global::FineUIPro.Button imgBtnFile;
+ ///
+ /// drpCompanyTemplate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpCompanyTemplate;
+
///
/// btnEditWord 控件。
///
diff --git a/SGGL/FineUIPro.Web/CQMS/Plan/SubPlan.aspx b/SGGL/FineUIPro.Web/CQMS/Plan/SubPlan.aspx
index cf77bc11..98f66789 100644
--- a/SGGL/FineUIPro.Web/CQMS/Plan/SubPlan.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Plan/SubPlan.aspx
@@ -96,7 +96,7 @@
-
diff --git a/SGGL/FineUIPro.Web/CQMS/Plan/SubPlanEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Plan/SubPlanEdit.aspx
index eeec65db..a5e62e99 100644
--- a/SGGL/FineUIPro.Web/CQMS/Plan/SubPlanEdit.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Plan/SubPlanEdit.aspx
@@ -117,6 +117,9 @@
+
+
+
diff --git a/SGGL/FineUIPro.Web/CQMS/Plan/SubPlanEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Plan/SubPlanEdit.aspx.cs
index 870fd38a..af4633c1 100644
--- a/SGGL/FineUIPro.Web/CQMS/Plan/SubPlanEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Plan/SubPlanEdit.aspx.cs
@@ -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;
+ }
+
+
+ }
+
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/CQMS/Plan/SubPlanEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Plan/SubPlanEdit.aspx.designer.cs
index 8995e4e1..4feedde6 100644
--- a/SGGL/FineUIPro.Web/CQMS/Plan/SubPlanEdit.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Plan/SubPlanEdit.aspx.designer.cs
@@ -158,6 +158,15 @@ namespace FineUIPro.Web.CQMS.Plan
///
protected global::FineUIPro.Button imgBtnFile;
+ ///
+ /// drpCompanyTemplate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpCompanyTemplate;
+
///
/// btnEditWord 控件。
///
diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
index a123cd46..8f76add5 100644
--- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
+++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
@@ -225,6 +225,8 @@
+
+
@@ -5731,6 +5733,20 @@
CompanyModelKindEdit.aspx
+
+ Companytemplate.aspx
+ ASPXCodeBehind
+
+
+ Companytemplate.aspx
+
+
+ CompanytemplateEdit.aspx
+ ASPXCodeBehind
+
+
+ CompanytemplateEdit.aspx
+
ConstructionTestType.aspx
ASPXCodeBehind
diff --git a/SGGL/FineUIPro.Web/common/Menu_SysSet.xml b/SGGL/FineUIPro.Web/common/Menu_SysSet.xml
index 51d04b55..71acb007 100644
--- a/SGGL/FineUIPro.Web/common/Menu_SysSet.xml
+++ b/SGGL/FineUIPro.Web/common/Menu_SysSet.xml
@@ -30,6 +30,7 @@
+
diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs
index 1300d94f..959329f6 100644
--- a/SGGL/Model/Model.cs
+++ b/SGGL/Model/Model.cs
@@ -77,6 +77,9 @@ namespace Model
partial void InsertBase_CompanyModelKind(Base_CompanyModelKind instance);
partial void UpdateBase_CompanyModelKind(Base_CompanyModelKind instance);
partial void DeleteBase_CompanyModelKind(Base_CompanyModelKind instance);
+ partial void InsertBase_CompanyTemplate(Base_CompanyTemplate instance);
+ partial void UpdateBase_CompanyTemplate(Base_CompanyTemplate instance);
+ partial void DeleteBase_CompanyTemplate(Base_CompanyTemplate instance);
partial void InsertBase_Components(Base_Components instance);
partial void UpdateBase_Components(Base_Components instance);
partial void DeleteBase_Components(Base_Components instance);
@@ -1659,6 +1662,14 @@ namespace Model
}
}
+ public System.Data.Linq.Table Base_CompanyTemplate
+ {
+ get
+ {
+ return this.GetTable();
+ }
+ }
+
public System.Data.Linq.Table Base_Components
{
get
@@ -12850,6 +12861,164 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Base_CompanyTemplate")]
+ public partial class Base_CompanyTemplate : INotifyPropertyChanging, INotifyPropertyChanged
+ {
+
+ private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
+
+ private string _TemplateId;
+
+ private string _Code;
+
+ private string _Name;
+
+ private string _FilePath;
+
+ private string _Remarks;
+
+ #region 可扩展性方法定义
+ partial void OnLoaded();
+ partial void OnValidate(System.Data.Linq.ChangeAction action);
+ partial void OnCreated();
+ partial void OnTemplateIdChanging(string value);
+ partial void OnTemplateIdChanged();
+ partial void OnCodeChanging(string value);
+ partial void OnCodeChanged();
+ partial void OnNameChanging(string value);
+ partial void OnNameChanged();
+ partial void OnFilePathChanging(string value);
+ partial void OnFilePathChanged();
+ partial void OnRemarksChanging(string value);
+ partial void OnRemarksChanged();
+ #endregion
+
+ public Base_CompanyTemplate()
+ {
+ OnCreated();
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TemplateId", DbType="VarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
+ public string TemplateId
+ {
+ get
+ {
+ return this._TemplateId;
+ }
+ set
+ {
+ if ((this._TemplateId != value))
+ {
+ this.OnTemplateIdChanging(value);
+ this.SendPropertyChanging();
+ this._TemplateId = value;
+ this.SendPropertyChanged("TemplateId");
+ this.OnTemplateIdChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Code", DbType="VarChar(50)")]
+ public string Code
+ {
+ get
+ {
+ return this._Code;
+ }
+ set
+ {
+ if ((this._Code != value))
+ {
+ this.OnCodeChanging(value);
+ this.SendPropertyChanging();
+ this._Code = value;
+ this.SendPropertyChanged("Code");
+ this.OnCodeChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="VarChar(100)")]
+ public string Name
+ {
+ get
+ {
+ return this._Name;
+ }
+ set
+ {
+ if ((this._Name != value))
+ {
+ this.OnNameChanging(value);
+ this.SendPropertyChanging();
+ this._Name = value;
+ this.SendPropertyChanged("Name");
+ this.OnNameChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FilePath", DbType="VarChar(300)")]
+ public string FilePath
+ {
+ get
+ {
+ return this._FilePath;
+ }
+ set
+ {
+ if ((this._FilePath != value))
+ {
+ this.OnFilePathChanging(value);
+ this.SendPropertyChanging();
+ this._FilePath = value;
+ this.SendPropertyChanged("FilePath");
+ this.OnFilePathChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remarks", DbType="VarChar(300)")]
+ public string Remarks
+ {
+ get
+ {
+ return this._Remarks;
+ }
+ set
+ {
+ if ((this._Remarks != value))
+ {
+ this.OnRemarksChanging(value);
+ this.SendPropertyChanging();
+ this._Remarks = value;
+ this.SendPropertyChanged("Remarks");
+ this.OnRemarksChanged();
+ }
+ }
+ }
+
+ public event PropertyChangingEventHandler PropertyChanging;
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ protected virtual void SendPropertyChanging()
+ {
+ if ((this.PropertyChanging != null))
+ {
+ this.PropertyChanging(this, emptyChangingEventArgs);
+ }
+ }
+
+ protected virtual void SendPropertyChanged(String propertyName)
+ {
+ if ((this.PropertyChanged != null))
+ {
+ this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+ }
+
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Base_Components")]
public partial class Base_Components : INotifyPropertyChanging, INotifyPropertyChanged
{
@@ -73878,7 +74047,7 @@ namespace Model
OnCreated();
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(15) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
public string MaterialCode
{
get
@@ -73982,7 +74151,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialDef", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialDef", DbType="NVarChar(3000)")]
public string MaterialDef
{
get
@@ -78572,7 +78741,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(50)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(15)")]
public string MaterialCode
{
get
@@ -82920,7 +83089,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderCode", DbType="NVarChar(1000)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderCode", DbType="NVarChar(200)")]
public string CanWelderCode
{
get
@@ -122289,7 +122458,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialName", DbType="NVarChar(100)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialName", DbType="NVarChar(50)")]
public string MaterialName
{
get
@@ -122309,7 +122478,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SpecificationAndModel", DbType="NVarChar(200)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SpecificationAndModel", DbType="NVarChar(50)")]
public string SpecificationAndModel
{
get
@@ -122329,7 +122498,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(100)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(50)")]
public string MaterialCode
{
get
@@ -122349,7 +122518,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Material", DbType="NVarChar(100)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Material", DbType="NVarChar(50)")]
public string Material
{
get
@@ -181418,7 +181587,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RewardAndPunishDecision", DbType="NVarChar(100)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RewardAndPunishDecision", DbType="NVarChar(200)")]
public string RewardAndPunishDecision
{
get
@@ -235875,7 +236044,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderCode", DbType="NVarChar(1000)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderCode", DbType="NVarChar(200)")]
public string CanWelderCode
{
get