From 782619de37129fafedaa458b5089d1d4d7dd80fb Mon Sep 17 00:00:00 2001
From: wendy <408182087@qq.com>
Date: Fri, 27 Dec 2024 23:42:33 +0800
Subject: [PATCH] =?UTF-8?q?20241227=20=E6=96=B0=E5=A2=9Esupport=20document?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
FCL/BLL/BLL.csproj | 2 +
FCL/BLL/Common/Const.cs | 17 +
FCL/BLL/SupportDocument/GuideManualService.cs | 74 +++
FCL/BLL/SupportDocument/TemplateService.cs | 74 +++
.../AttachFile/webuploader3.aspx.cs | 51 +-
.../Evaluation/PerformanceReport.aspx.cs | 325 ++++++-----
FCL/FineUIPro.Web/FineUIPro.Web.csproj | 16 +
.../SupportDocument/GuideManual.aspx | 81 +++
.../SupportDocument/GuideManual.aspx.cs | 329 +++++++++++
.../GuideManual.aspx.designer.cs | 170 ++++++
.../SupportDocument/Template.aspx | 81 +++
.../SupportDocument/Template.aspx.cs | 329 +++++++++++
.../SupportDocument/Template.aspx.designer.cs | 170 ++++++
FCL/Model/Model.cs | 530 ++++++++++++++++--
14 files changed, 2075 insertions(+), 174 deletions(-)
create mode 100644 FCL/BLL/SupportDocument/GuideManualService.cs
create mode 100644 FCL/BLL/SupportDocument/TemplateService.cs
create mode 100644 FCL/FineUIPro.Web/SupportDocument/GuideManual.aspx
create mode 100644 FCL/FineUIPro.Web/SupportDocument/GuideManual.aspx.cs
create mode 100644 FCL/FineUIPro.Web/SupportDocument/GuideManual.aspx.designer.cs
create mode 100644 FCL/FineUIPro.Web/SupportDocument/Template.aspx
create mode 100644 FCL/FineUIPro.Web/SupportDocument/Template.aspx.cs
create mode 100644 FCL/FineUIPro.Web/SupportDocument/Template.aspx.designer.cs
diff --git a/FCL/BLL/BLL.csproj b/FCL/BLL/BLL.csproj
index a721c5e..942ed76 100644
--- a/FCL/BLL/BLL.csproj
+++ b/FCL/BLL/BLL.csproj
@@ -226,6 +226,8 @@
+
+
diff --git a/FCL/BLL/Common/Const.cs b/FCL/BLL/Common/Const.cs
index b4f1f10..672d5d5 100644
--- a/FCL/BLL/Common/Const.cs
+++ b/FCL/BLL/Common/Const.cs
@@ -165,6 +165,11 @@ namespace BLL
///
public const string BtnBatchDownload = "BatchDownload";
+ ///
+ /// 下载
+ ///
+ public const string BtnDownload = "Download";
+
///
/// 发送
///
@@ -464,6 +469,18 @@ namespace BLL
///
public const string IncidentInvestigationMenuId = "493D726E-FF86-4A76-A65B-CB14F02195D2";
#endregion
+
+ #region 文件管理
+ ///
+ /// 模板
+ ///
+ public const string TemplateMenuId = "BD66323D-7257-4D9D-8F4A-7D0F8724AB79";
+
+ ///
+ /// 指导手册
+ ///
+ public const string GuideManualMenuId = "4B9183A5-35CB-4FED-BFA9-E0869684B1B4";
+ #endregion
#endregion
#region 综合平台流程
diff --git a/FCL/BLL/SupportDocument/GuideManualService.cs b/FCL/BLL/SupportDocument/GuideManualService.cs
new file mode 100644
index 0000000..f1b36ff
--- /dev/null
+++ b/FCL/BLL/SupportDocument/GuideManualService.cs
@@ -0,0 +1,74 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BLL
+{
+ ///
+ /// 指导手册
+ ///
+ public class GuideManualService
+ {
+ ///
+ /// 根据Id获取指导手册
+ ///
+ ///
+ ///
+ public static Model.SupportDocument_GuideManual GetGuideManualById(string guideManualId)
+ {
+ return Funs.DB.SupportDocument_GuideManual.FirstOrDefault(e => e.GuideManualId == guideManualId);
+ }
+
+ ///
+ /// 添加
+ ///
+ ///
+ public static void AddGuideManual(Model.SupportDocument_GuideManual guideManual)
+ {
+ Model.SupportDocument_GuideManual newGuideManual = new Model.SupportDocument_GuideManual
+ {
+ GuideManualId = guideManual.GuideManualId,
+ GuideManual = guideManual.GuideManual,
+ UploadBy = guideManual.UploadBy,
+ UploadDate = guideManual.UploadDate,
+ AttachUrl = guideManual.AttachUrl
+ };
+ Funs.DB.SupportDocument_GuideManual.InsertOnSubmit(newGuideManual);
+ Funs.DB.SubmitChanges();
+ }
+
+ ///
+ /// 修改
+ ///
+ ///
+ public static void UpdateGuideManual(Model.SupportDocument_GuideManual guideManual)
+ {
+ Model.SupportDocument_GuideManual newGuideManual = Funs.DB.SupportDocument_GuideManual.FirstOrDefault(e => e.GuideManualId == guideManual.GuideManualId);
+ if (newGuideManual == null)
+ {
+ newGuideManual.GuideManual = guideManual.GuideManual;
+ newGuideManual.UploadBy = guideManual.UploadBy;
+ newGuideManual.UploadDate = guideManual.UploadDate;
+ newGuideManual.AttachUrl = guideManual.AttachUrl;
+ Funs.DB.SubmitChanges();
+ }
+ }
+
+ ///
+ /// 根据主键删除指导手册
+ ///
+ ///
+ public static void DeleteGuideManualById(string guideManualId)
+ {
+ Model.SupportDocument_GuideManual guideManual = Funs.DB.SupportDocument_GuideManual.FirstOrDefault(e => e.GuideManualId == guideManualId);
+ if (guideManual!=null)
+ {
+ BLL.AttachFileService.DeleteAttachFile(Funs.RootPath, guideManualId, BLL.Const.GuideManualMenuId);//删除附件
+ Funs.DB.SupportDocument_GuideManual.DeleteOnSubmit(guideManual);
+ Funs.DB.SubmitChanges();
+ }
+ }
+ }
+}
diff --git a/FCL/BLL/SupportDocument/TemplateService.cs b/FCL/BLL/SupportDocument/TemplateService.cs
new file mode 100644
index 0000000..7fe45eb
--- /dev/null
+++ b/FCL/BLL/SupportDocument/TemplateService.cs
@@ -0,0 +1,74 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BLL
+{
+ ///
+ /// 模板
+ ///
+ public class TemplateService
+ {
+ ///
+ /// 根据主键获取模板
+ ///
+ ///
+ ///
+ public static Model.SupportDocument_Template GetTemplateById(string templateId)
+ {
+ return Funs.DB.SupportDocument_Template.FirstOrDefault(e => e.TemplateId == templateId);
+ }
+
+ ///
+ /// 添加
+ ///
+ ///
+ public static void AddTemplate(Model.SupportDocument_Template template)
+ {
+ Model.SupportDocument_Template newTemplate = new Model.SupportDocument_Template
+ {
+ TemplateId = template.TemplateId,
+ Template = template.Template,
+ UploadBy = template.UploadBy,
+ UploadDate = template.UploadDate,
+ AttachUrl = template.AttachUrl,
+ };
+ Funs.DB.SupportDocument_Template.InsertOnSubmit(newTemplate);
+ Funs.DB.SubmitChanges();
+ }
+
+ ///
+ /// 修改
+ ///
+ ///
+ public static void UpdateTemplate(Model.SupportDocument_Template template)
+ {
+ Model.SupportDocument_Template newTemplate = Funs.DB.SupportDocument_Template.FirstOrDefault(e => e.TemplateId == template.TemplateId);
+ if (newTemplate!=null)
+ {
+ newTemplate.Template = template.Template;
+ newTemplate.UploadBy = template.UploadBy;
+ newTemplate.UploadDate = template.UploadDate;
+ newTemplate.AttachUrl = template.AttachUrl;
+ Funs.DB.SubmitChanges();
+ }
+ }
+
+ ///
+ /// 根据主键删除
+ ///
+ ///
+ public static void DeleteTemplateById(string templateId)
+ {
+ Model.SupportDocument_Template template = Funs.DB.SupportDocument_Template.FirstOrDefault(e => e.TemplateId == templateId);
+ if (template != null)
+ {
+ BLL.AttachFileService.DeleteAttachFile(Funs.RootPath, templateId, BLL.Const.TemplateMenuId);//删除附件
+ Funs.DB.SupportDocument_Template.DeleteOnSubmit(template);
+ Funs.DB.SubmitChanges();
+ }
+ }
+ }
+}
diff --git a/FCL/FineUIPro.Web/AttachFile/webuploader3.aspx.cs b/FCL/FineUIPro.Web/AttachFile/webuploader3.aspx.cs
index 58d6ed4..34ea140 100644
--- a/FCL/FineUIPro.Web/AttachFile/webuploader3.aspx.cs
+++ b/FCL/FineUIPro.Web/AttachFile/webuploader3.aspx.cs
@@ -236,6 +236,7 @@ namespace FineUIPro.Web.AttachFile
JObject item = source[i] as JObject;
string attachUrl = AttachPath + "\\" + item.Value("savedName").Replace('/', '\\');
string fileName = item.Value("name");
+ string name = fileName.Substring(0, fileName.LastIndexOf("."));
string Id = string.Empty;
if (MenuId == BLL.Const.StandardTemplateMenuId)
{
@@ -249,7 +250,6 @@ namespace FineUIPro.Web.AttachFile
BLL.StandardTemplateService.AddStandardTemplate(temp);
BLL.Sys_LogService.AddLog(this.CurrUser.UserId, "Add Standard Template!");
}
-
if (MenuId == BLL.Const.SESRelatedDateMenuId)
{
if (AttachPath.Contains("SignedContracts"))
@@ -312,7 +312,6 @@ namespace FineUIPro.Web.AttachFile
BLL.Sys_LogService.AddLog(this.CurrUser.UserId, "Add One Time Contracts Contract Management!");
}
}
-
if (MenuId == BLL.Const.CTSalesContractsMenuId)
{
if (AttachPath.Contains("SignedContracts"))
@@ -344,6 +343,30 @@ namespace FineUIPro.Web.AttachFile
BLL.Sys_LogService.AddLog(this.CurrUser.UserId, "Add CT Sales Contracts Signed Contract Management!");
}
}
+ if (MenuId==BLL.Const.TemplateMenuId)
+ {
+ Model.SupportDocument_Template temp = new Model.SupportDocument_Template();
+ Id = ToKeyId;
+ temp.TemplateId = Id;
+ temp.Template = name;
+ temp.UploadDate = DateTime.Now;
+ temp.UploadBy = this.CurrUser.UserId;
+ temp.AttachUrl = attachUrl;
+ BLL.TemplateService.AddTemplate(temp);
+ BLL.Sys_LogService.AddLog(this.CurrUser.UserId, "Add Template!");
+ }
+ if (MenuId==BLL.Const.GuideManualMenuId)
+ {
+ Model.SupportDocument_GuideManual temp = new Model.SupportDocument_GuideManual();
+ Id = ToKeyId;
+ temp.GuideManualId = Id;
+ temp.GuideManual = name;
+ temp.UploadDate = DateTime.Now;
+ temp.UploadBy = this.CurrUser.UserId;
+ temp.AttachUrl = attachUrl;
+ BLL.GuideManualService.AddGuideManual(temp);
+ BLL.Sys_LogService.AddLog(this.CurrUser.UserId, "Add Guide Manual!");
+ }
Model.AttachFile att = new Model.AttachFile();
att.AttachFileId = BLL.SQLHelper.GetNewID(typeof(Model.AttachFile));
@@ -465,6 +488,30 @@ namespace FineUIPro.Web.AttachFile
}
}
+ if (MenuId==BLL.Const.TemplateMenuId)
+ {
+ Model.SupportDocument_Template temp = new Model.SupportDocument_Template();
+ temp.TemplateId = ToKeyId;
+ temp.Template = fileName;
+ temp.UploadDate = DateTime.Now;
+ temp.AttachUrl = attachUrl;
+ temp.UploadBy = this.CurrUser.UserId;
+ BLL.TemplateService.UpdateTemplate(temp);
+ BLL.Sys_LogService.AddLog(this.CurrUser.UserId, "Modify Template!");
+ }
+
+ if (MenuId==BLL.Const.GuideManualMenuId)
+ {
+ Model.SupportDocument_GuideManual temp = new Model.SupportDocument_GuideManual();
+ temp.GuideManualId = ToKeyId;
+ temp.GuideManual = fileName;
+ temp.UploadDate = DateTime.Now;
+ temp.AttachUrl = attachUrl;
+ temp.UploadBy = this.CurrUser.UserId;
+ BLL.GuideManualService.UpdateGuideManual(temp);
+ BLL.Sys_LogService.AddLog(this.CurrUser.UserId, "Modify Guide Manual!");
+ }
+
var sour = from x in db.AttachFile where x.ToKeyId == ToKeyId select x;
Model.AttachFile att = db.AttachFile.FirstOrDefault(x => x.AttachFileId == sour.First().AttachFileId);
if (att != null)
diff --git a/FCL/FineUIPro.Web/Evaluation/PerformanceReport.aspx.cs b/FCL/FineUIPro.Web/Evaluation/PerformanceReport.aspx.cs
index 3f89485..0fb1935 100644
--- a/FCL/FineUIPro.Web/Evaluation/PerformanceReport.aspx.cs
+++ b/FCL/FineUIPro.Web/Evaluation/PerformanceReport.aspx.cs
@@ -171,7 +171,7 @@ namespace FineUIPro.Web.Evaluation
Funs.DB.SubmitChanges();
#region
- percentIn[UserId] = (int)(100 / 5);
+ percentIn[UserId] = (int)(100 / 6);
List ovList = new List();
List overParam = new List();
@@ -372,8 +372,8 @@ namespace FineUIPro.Web.Evaluation
#endregion
- #region
- percentIn[UserId] = (int)((100 * 2) / 5);
+ #region 按月提取安全监护框架承包商绩效
+ percentIn[UserId] = (int)((100 * 2) / 6);
List ovList1 = new List();
List overParam1 = new List();
@@ -386,62 +386,62 @@ namespace FineUIPro.Web.Evaluation
for (int i = 0; i < OverviewReport1.Rows.Count; i++)
{
Model.FC_OverviewReport ov = new Model.FC_OverviewReport();
- ov.ReportMonth = OverviewReport.Rows[i]["ReportMonth"].ToString();
- ov.FO_NO = OverviewReport.Rows[i]["FO_NO"].ToString();
- ov.Work_Description = OverviewReport.Rows[i]["Work_Description"].ToString();
- ov.Contractor = OverviewReport.Rows[i]["Contractor"].ToString();
- ov.ContractorCN = OverviewReport.Rows[i]["ContractorCN"].ToString();
- ov.ContractorEN = OverviewReport.Rows[i]["ContractorEN"].ToString();
- ov.ContractorShortName = OverviewReport.Rows[i]["ContractorShortName"].ToString();
- ov.Main_Coordinator = OverviewReport.Rows[i]["Main_Coordinator"].ToString();
- ov.Total = Convert.ToDecimal(OverviewReport.Rows[i]["Total"]);
- ov.Participation_Rate = Convert.ToDecimal(OverviewReport.Rows[i]["Participation_Rate"]);
- ov.EvaluateNum = Convert.ToInt32(OverviewReport.Rows[i]["EvaluateNum"]);
- ov.UserNum = Convert.ToInt32(OverviewReport.Rows[i]["UserNum"]);
+ ov.ReportMonth = OverviewReport1.Rows[i]["ReportMonth"].ToString();
+ ov.FO_NO = OverviewReport1.Rows[i]["FO_NO"].ToString();
+ ov.Work_Description = OverviewReport1.Rows[i]["Work_Description"].ToString();
+ ov.Contractor = OverviewReport1.Rows[i]["Contractor"].ToString();
+ ov.ContractorCN = OverviewReport1.Rows[i]["ContractorCN"].ToString();
+ ov.ContractorEN = OverviewReport1.Rows[i]["ContractorEN"].ToString();
+ ov.ContractorShortName = OverviewReport1.Rows[i]["ContractorShortName"].ToString();
+ ov.Main_Coordinator = OverviewReport1.Rows[i]["Main_Coordinator"].ToString();
+ ov.Total = Convert.ToDecimal(OverviewReport1.Rows[i]["Total"]);
+ ov.Participation_Rate = Convert.ToDecimal(OverviewReport1.Rows[i]["Participation_Rate"]);
+ ov.EvaluateNum = Convert.ToInt32(OverviewReport1.Rows[i]["EvaluateNum"]);
+ ov.UserNum = Convert.ToInt32(OverviewReport1.Rows[i]["UserNum"]);
- if (OverviewReport.Rows[i]["AvgEvaScore1"] != null && OverviewReport.Rows[i]["AvgEvaScore1"].ToString() != "")
+ if (OverviewReport1.Rows[i]["AvgEvaScore1"] != null && OverviewReport1.Rows[i]["AvgEvaScore1"].ToString() != "")
{
- ov.AvgEvaScore1 = Convert.ToDecimal(OverviewReport.Rows[i]["AvgEvaScore1"]);
+ ov.AvgEvaScore1 = Convert.ToDecimal(OverviewReport1.Rows[i]["AvgEvaScore1"]);
}
else
{
ov.AvgEvaScore1 = null;
}
- if (OverviewReport.Rows[i]["TotalAvgScore1"] != null && OverviewReport.Rows[i]["TotalAvgScore1"].ToString() != "")
+ if (OverviewReport1.Rows[i]["TotalAvgScore1"] != null && OverviewReport1.Rows[i]["TotalAvgScore1"].ToString() != "")
{
- ov.TotalAvgScore1 = Convert.ToDecimal(OverviewReport.Rows[i]["TotalAvgScore1"]);
+ ov.TotalAvgScore1 = Convert.ToDecimal(OverviewReport1.Rows[i]["TotalAvgScore1"]);
}
else
{
ov.TotalAvgScore1 = null;
}
- if (OverviewReport.Rows[i]["AvgEvaScore2"] != null && OverviewReport.Rows[i]["AvgEvaScore2"].ToString() != "")
+ if (OverviewReport1.Rows[i]["AvgEvaScore2"] != null && OverviewReport1.Rows[i]["AvgEvaScore2"].ToString() != "")
{
- ov.AvgEvaScore2 = Convert.ToDecimal(OverviewReport.Rows[i]["AvgEvaScore2"]);
+ ov.AvgEvaScore2 = Convert.ToDecimal(OverviewReport1.Rows[i]["AvgEvaScore2"]);
}
else
{
ov.AvgEvaScore2 = null;
}
- if (OverviewReport.Rows[i]["TotalAvgScore2"] != null && OverviewReport.Rows[i]["TotalAvgScore2"].ToString() != "")
+ if (OverviewReport1.Rows[i]["TotalAvgScore2"] != null && OverviewReport1.Rows[i]["TotalAvgScore2"].ToString() != "")
{
- ov.TotalAvgScore2 = Convert.ToDecimal(OverviewReport.Rows[i]["TotalAvgScore2"]);
+ ov.TotalAvgScore2 = Convert.ToDecimal(OverviewReport1.Rows[i]["TotalAvgScore2"]);
}
else
{
ov.TotalAvgScore2 = null;
}
- if (OverviewReport.Rows[i]["AvgEvaScore3"] != null && OverviewReport.Rows[i]["AvgEvaScore3"].ToString() != "")
+ if (OverviewReport1.Rows[i]["AvgEvaScore3"] != null && OverviewReport1.Rows[i]["AvgEvaScore3"].ToString() != "")
{
- ov.AvgEvaScore3 = Convert.ToDecimal(OverviewReport.Rows[i]["AvgEvaScore3"]);
+ ov.AvgEvaScore3 = Convert.ToDecimal(OverviewReport1.Rows[i]["AvgEvaScore3"]);
}
else
{
ov.AvgEvaScore3 = null;
}
- if (OverviewReport.Rows[i]["TotalAvgScore3"] != null && OverviewReport.Rows[i]["TotalAvgScore3"].ToString() != "")
+ if (OverviewReport1.Rows[i]["TotalAvgScore3"] != null && OverviewReport1.Rows[i]["TotalAvgScore3"].ToString() != "")
{
ov.TotalAvgScore3 = Convert.ToDecimal(OverviewReport.Rows[i]["TotalAvgScore3"]);
}
@@ -467,99 +467,99 @@ namespace FineUIPro.Web.Evaluation
// ov.TotalAvgScore4 = null;
//}
- if (OverviewReport.Rows[i]["AvgEvaScore5"] != null && OverviewReport.Rows[i]["AvgEvaScore5"].ToString() != "")
+ if (OverviewReport1.Rows[i]["AvgEvaScore5"] != null && OverviewReport1.Rows[i]["AvgEvaScore5"].ToString() != "")
{
- ov.AvgEvaScore5 = Convert.ToDecimal(OverviewReport.Rows[i]["AvgEvaScore5"]);
+ ov.AvgEvaScore5 = Convert.ToDecimal(OverviewReport1.Rows[i]["AvgEvaScore5"]);
}
else
{
ov.AvgEvaScore5 = null;
}
- if (OverviewReport.Rows[i]["TotalAvgScore5"] != null && OverviewReport.Rows[i]["TotalAvgScore5"].ToString() != "")
+ if (OverviewReport1.Rows[i]["TotalAvgScore5"] != null && OverviewReport1.Rows[i]["TotalAvgScore5"].ToString() != "")
{
- ov.TotalAvgScore5 = Convert.ToDecimal(OverviewReport.Rows[i]["TotalAvgScore5"]);
+ ov.TotalAvgScore5 = Convert.ToDecimal(OverviewReport1.Rows[i]["TotalAvgScore5"]);
}
else
{
ov.TotalAvgScore5 = null;
}
- if (OverviewReport.Rows[i]["AvgEvaScore6"] != null && OverviewReport.Rows[i]["AvgEvaScore6"].ToString() != "")
+ if (OverviewReport1.Rows[i]["AvgEvaScore6"] != null && OverviewReport1.Rows[i]["AvgEvaScore6"].ToString() != "")
{
- ov.AvgEvaScore6 = Convert.ToDecimal(OverviewReport.Rows[i]["AvgEvaScore6"]);
+ ov.AvgEvaScore6 = Convert.ToDecimal(OverviewReport1.Rows[i]["AvgEvaScore6"]);
}
else
{
ov.AvgEvaScore6 = null;
}
- if (OverviewReport.Rows[i]["TotalAvgScore6"] != null && OverviewReport.Rows[i]["TotalAvgScore6"].ToString() != "")
+ if (OverviewReport1.Rows[i]["TotalAvgScore6"] != null && OverviewReport1.Rows[i]["TotalAvgScore6"].ToString() != "")
{
- ov.TotalAvgScore6 = Convert.ToDecimal(OverviewReport.Rows[i]["TotalAvgScore6"]);
+ ov.TotalAvgScore6 = Convert.ToDecimal(OverviewReport1.Rows[i]["TotalAvgScore6"]);
}
else
{
ov.TotalAvgScore6 = null;
}
- if (OverviewReport.Rows[i]["TimelyAvgSocre"] != null && OverviewReport.Rows[i]["TimelyAvgSocre"].ToString() != "")
+ if (OverviewReport1.Rows[i]["TimelyAvgSocre"] != null && OverviewReport1.Rows[i]["TimelyAvgSocre"].ToString() != "")
{
- ov.TimelyAvgSocre = Convert.ToDecimal(OverviewReport.Rows[i]["TimelyAvgSocre"]);
+ ov.TimelyAvgSocre = Convert.ToDecimal(OverviewReport1.Rows[i]["TimelyAvgSocre"]);
}
else
{
ov.TimelyAvgSocre = null;
}
- if (OverviewReport.Rows[i]["HonestyAvgScore"] != null && OverviewReport.Rows[i]["HonestyAvgScore"].ToString() != "")
+ if (OverviewReport1.Rows[i]["HonestyAvgScore"] != null && OverviewReport1.Rows[i]["HonestyAvgScore"].ToString() != "")
{
- ov.HonestyAvgScore = Convert.ToDecimal(OverviewReport.Rows[i]["HonestyAvgScore"]);
+ ov.HonestyAvgScore = Convert.ToDecimal(OverviewReport1.Rows[i]["HonestyAvgScore"]);
}
else
{
ov.HonestyAvgScore = null;
}
- if (OverviewReport.Rows[i]["CTSSAvgScore"] != null && OverviewReport.Rows[i]["CTSSAvgScore"].ToString() != "")
+ if (OverviewReport1.Rows[i]["CTSSAvgScore"] != null && OverviewReport1.Rows[i]["CTSSAvgScore"].ToString() != "")
{
- ov.CTSSAvgScore = Convert.ToDecimal(OverviewReport.Rows[i]["CTSSAvgScore"]);
+ ov.CTSSAvgScore = Convert.ToDecimal(OverviewReport1.Rows[i]["CTSSAvgScore"]);
}
else
{
ov.CTSSAvgScore = null;
}
- if (OverviewReport.Rows[i]["CTSCAvgScore"] != null && OverviewReport.Rows[i]["CTSCAvgScore"].ToString() != "")
+ if (OverviewReport1.Rows[i]["CTSCAvgScore"] != null && OverviewReport1.Rows[i]["CTSCAvgScore"].ToString() != "")
{
- ov.CTSCAvgScore = Convert.ToDecimal(OverviewReport.Rows[i]["CTSCAvgScore"]);
+ ov.CTSCAvgScore = Convert.ToDecimal(OverviewReport1.Rows[i]["CTSCAvgScore"]);
}
else
{
ov.CTSCAvgScore = null;
}
- if (OverviewReport.Rows[i]["MainCoordinatorAvgScore"] != null && OverviewReport.Rows[i]["MainCoordinatorAvgScore"].ToString() != "")
+ if (OverviewReport1.Rows[i]["MainCoordinatorAvgScore"] != null && OverviewReport1.Rows[i]["MainCoordinatorAvgScore"].ToString() != "")
{
- ov.MainCoordinatorAvgScore = Convert.ToDecimal(OverviewReport.Rows[i]["MainCoordinatorAvgScore"]);
+ ov.MainCoordinatorAvgScore = Convert.ToDecimal(OverviewReport1.Rows[i]["MainCoordinatorAvgScore"]);
}
else
{
ov.MainCoordinatorAvgScore = null;
}
- if (OverviewReport.Rows[i]["UserRepresentativeAvgScore"] != null && OverviewReport.Rows[i]["UserRepresentativeAvgScore"].ToString() != "")
+ if (OverviewReport1.Rows[i]["UserRepresentativeAvgScore"] != null && OverviewReport1.Rows[i]["UserRepresentativeAvgScore"].ToString() != "")
{
- ov.UserRepresentativeAvgScore = Convert.ToDecimal(OverviewReport.Rows[i]["UserRepresentativeAvgScore"]);
+ ov.UserRepresentativeAvgScore = Convert.ToDecimal(OverviewReport1.Rows[i]["UserRepresentativeAvgScore"]);
}
else
{
ov.UserRepresentativeAvgScore = null;
}
- if (OverviewReport.Rows[i]["CTSTAvgScore"] != null && OverviewReport.Rows[i]["CTSTAvgScore"].ToString() != "")
+ if (OverviewReport1.Rows[i]["CTSTAvgScore"] != null && OverviewReport1.Rows[i]["CTSTAvgScore"].ToString() != "")
{
- ov.CTSTAvgScore = Convert.ToDecimal(OverviewReport.Rows[i]["CTSTAvgScore"]);
+ ov.CTSTAvgScore = Convert.ToDecimal(OverviewReport1.Rows[i]["CTSTAvgScore"]);
}
else
{
ov.CTSTAvgScore = null;
}
- if (OverviewReport.Rows[i]["CTEDAvgScore"] != null && OverviewReport.Rows[i]["CTEDAvgScore"].ToString() != "")
+ if (OverviewReport1.Rows[i]["CTEDAvgScore"] != null && OverviewReport1.Rows[i]["CTEDAvgScore"].ToString() != "")
{
- ov.CTEDAvgScore = Convert.ToDecimal(OverviewReport.Rows[i]["CTEDAvgScore"]);
+ ov.CTEDAvgScore = Convert.ToDecimal(OverviewReport1.Rows[i]["CTEDAvgScore"]);
}
else
{
@@ -573,8 +573,9 @@ namespace FineUIPro.Web.Evaluation
Funs.DB.SubmitChanges();
#endregion
- #region
- percentIn[UserId] = (int)((100 * 3) / 5);
+ #region 未评人员
+ #region 未评人员-常规
+ percentIn[UserId] = (int)((100 * 3) / 6);
List NoEvalUserList = new List();
List param = new List();
@@ -771,8 +772,8 @@ namespace FineUIPro.Web.Evaluation
}
#endregion
- #region
- percentIn[UserId] = (int)((100 * 4) / 5);
+ #region 未评人员-安全
+ percentIn[UserId] = (int)((100 * 4) / 6);
List NoEvalUserList1 = new List();
List param1 = new List();
@@ -966,12 +967,12 @@ namespace FineUIPro.Web.Evaluation
Funs.DB.FC_NoEvaluatedUser.InsertAllOnSubmit(NoEvalUserList1);
Funs.DB.SubmitChanges();
}
- percentIn[UserId] = (int)((100 * 4) / 4);
+ #endregion
#endregion
#region 参与率
- percentIn[UserId] = (int)((100 * 5) / 5);
+ percentIn[UserId] = (int)((100 * 5) / 6);
List departEvaRateList = new List();
List departEvaRateParam1 = new List();
departEvaRateParam1.Add(new SqlParameter("@StartTime", sTime));
@@ -995,12 +996,49 @@ namespace FineUIPro.Web.Evaluation
{
ov.Participation_Rate_Type = "部门参与率";
}
- ov.IsSafe = true;
+ ov.IsSafe = false;
departEvaRateList.Add(ov);
}
}
- Funs.DB.FC_BigDepartEvaRate.InsertAllOnSubmit(departEvaRateList);
- Funs.DB.SubmitChanges();
+ if (departEvaRateList.Count > 0)
+ {
+ Funs.DB.FC_BigDepartEvaRate.InsertAllOnSubmit(departEvaRateList);
+ Funs.DB.SubmitChanges();
+ }
+
+ percentIn[UserId] = (int)((100 * 6) / 6);
+ List departEvaRateList2 = new List();
+ List departEvaRateParam2 = new List();
+ departEvaRateParam2.Add(new SqlParameter("@StartTime", sTime));
+ departEvaRateParam2.Add(new SqlParameter("@EndTime", eTime));
+ SqlParameter[] departEvaRateParamList2 = departEvaRateParam2.ToArray();
+ DataTable departEvaRate2 = SQLHelper.GetDataTableRunProc("sp_Safety_DepParticipationRate", departEvaRateParamList2);
+ if (departEvaRate2.Rows.Count > 0)
+ {
+ for (int i = 0; i < departEvaRate2.Rows.Count; i++)
+ {
+ Model.FC_BigDepartEvaRate ov = new Model.FC_BigDepartEvaRate();
+ ov.ReportMonth = departEvaRate2.Rows[i]["ReportMonth"].ToString();
+ ov.Depart = departEvaRate2.Rows[i]["DepartCode"].ToString().Replace("Z", "");
+ ov.Team = departEvaRate2.Rows[i]["SubDepartCode"].ToString();
+ ov.Participation_Rate = Convert.ToDecimal(departEvaRate2.Rows[i]["Rate"]);
+ if (ov.Team != null && !string.IsNullOrEmpty(ov.Team))
+ {
+ ov.Participation_Rate_Type = "团队参与率";
+ }
+ else
+ {
+ ov.Participation_Rate_Type = "部门参与率";
+ }
+ ov.IsSafe = true;
+ departEvaRateList2.Add(ov);
+ }
+ }
+ if (departEvaRateList2.Count > 0)
+ {
+ Funs.DB.FC_BigDepartEvaRate.InsertAllOnSubmit(departEvaRateList2);
+ Funs.DB.SubmitChanges();
+ }
#endregion
}
#endregion
@@ -1053,7 +1091,7 @@ namespace FineUIPro.Web.Evaluation
#region
for (int j = 0; j < toDiff; j++)
{
- percentIn[UserId] = (int)(100 * (j + 1) / (toDiff * 5));
+ percentIn[UserId] = (int)(100 * (j + 1) / (toDiff * 6));
List ovList = new List();
List overParam = new List();
@@ -1253,10 +1291,10 @@ namespace FineUIPro.Web.Evaluation
Funs.DB.SubmitChanges();
}
#endregion
- #region
+ #region 提取安全监护框架承包商绩效
for (int j = 0; j < toDiff; j++)
{
- percentIn[UserId] = (int)((100 * (j + 1+ toDiff)) / (toDiff * 5));
+ percentIn[UserId] = (int)((100 * (j + 1+ toDiff)) / (toDiff * 6));
List ovList = new List();
List overParam = new List();
@@ -1332,24 +1370,6 @@ namespace FineUIPro.Web.Evaluation
{
ov.TotalAvgScore3 = null;
}
-
- //if (OverviewReport.Rows[i]["AvgEvaScore4"] != null && OverviewReport.Rows[i]["AvgEvaScore4"].ToString() != "")
- //{
- // ov.AvgEvaScore4 = Convert.ToDecimal(OverviewReport.Rows[i]["AvgEvaScore4"]);
- //}
- //else
- //{
- // ov.AvgEvaScore4 = null;
- //}
- //if (OverviewReport.Rows[i]["TotalAvgScore4"] != null && OverviewReport.Rows[i]["TotalAvgScore4"].ToString() != "")
- //{
- // ov.TotalAvgScore4 = Convert.ToDecimal(OverviewReport.Rows[i]["TotalAvgScore4"]);
- //}
- //else
- //{
- // ov.TotalAvgScore4 = null;
- //}
-
if (OverviewReport.Rows[i]["AvgEvaScore5"] != null && OverviewReport.Rows[i]["AvgEvaScore5"].ToString() != "")
{
ov.AvgEvaScore5 = Convert.ToDecimal(OverviewReport.Rows[i]["AvgEvaScore5"]);
@@ -1460,7 +1480,7 @@ namespace FineUIPro.Web.Evaluation
#region
for (int j = 0; j < toDiff; j++)
{
- percentIn[UserId] = (int)((100 * (j + 1 + toDiff * 2)) / (toDiff * 5));
+ percentIn[UserId] = (int)((100 * (j + 1 + toDiff * 2)) / (toDiff * 6));
List NoEvalUserList = new List();
List param = new List();
@@ -1660,7 +1680,7 @@ namespace FineUIPro.Web.Evaluation
#region
for (int j = 0; j < toDiff; j++)
{
- percentIn[UserId] = (int)((100 * (j + 1 + toDiff * 3)) / (toDiff * 5));
+ percentIn[UserId] = (int)((100 * (j + 1 + toDiff * 3)) / (toDiff * 6));
List NoEvalUserList = new List();
List param = new List();
@@ -1858,31 +1878,10 @@ namespace FineUIPro.Web.Evaluation
}
#endregion
+ #region 提取部门参与率
for (int j = 0; j < toDiff; j++)
{
- percentIn[UserId] = (int)(100 * (j + 4) / (toDiff * 5));
-
- //List ovList = new List();
- //List overParam = new List();
- //overParam.Add(new SqlParameter("@StartTime", sTime.AddMonths(j)));
- //overParam.Add(new SqlParameter("@EndTime", eTime.AddMonths(j)));
- //SqlParameter[] overParList = overParam.ToArray();
- //DataTable OverviewReport = SQLHelper.GetDataTableRunProc("sp_DepParticipationRate", overParList);
- //if (OverviewReport.Rows.Count > 0)
- //{
- // for (int i = 0; i < OverviewReport.Rows.Count; i++)
- // {
- // Model.FC_OverviewReport ov = new Model.FC_OverviewReport();
- // ov.ReportMonth = OverviewReport.Rows[i]["ReportMonth"].ToString();
- // ov.Participation_Rate = Convert.ToDecimal(OverviewReport.Rows[i]["Participation_Rate"]);
-
-
- // ov.IsSafe = false;
- // ovList.Add(ov);
- // }
- //}
- //Funs.DB.FC_OverviewReport.InsertAllOnSubmit(ovList);
- //Funs.DB.SubmitChanges();
+ percentIn[UserId] = (int)((100 * (j + 1 + toDiff * 4)) / (toDiff * 6));
List departEvaRateList = new List();
List departEvaRateParam1 = new List();
@@ -1914,20 +1913,43 @@ namespace FineUIPro.Web.Evaluation
Funs.DB.SubmitChanges();
}
}
- //if (j == 0)
- //{
- // NewOverviewReport = OverviewReport.Copy();
- //}
- //else
- //{
- // foreach (DataRow dr in OverviewReport.Rows)
- // {
- // NewOverviewReport.ImportRow(dr);
- // }
- //}
+ for (int j = 0; j < toDiff; j++)
+ {
+ percentIn[UserId] = (int)((100 * (j + 1 + toDiff * 5)) / (toDiff * 6));
+
+ List departEvaRateList = new List();
+ List departEvaRateParam2 = new List();
+ departEvaRateParam2.Add(new SqlParameter("@StartTime", sTime.AddMonths(j)));
+ departEvaRateParam2.Add(new SqlParameter("@EndTime", eTime.AddMonths(j)));
+ SqlParameter[] departEvaRateList2 = departEvaRateParam2.ToArray();
+ DataTable departEvaRate = SQLHelper.GetDataTableRunProc("sp_Safety_DepParticipationRate", departEvaRateList2);
+ if (departEvaRate.Rows.Count > 0)
+ {
+ for (int i = 0; i < departEvaRate.Rows.Count; i++)
+ {
+ Model.FC_BigDepartEvaRate ov = new Model.FC_BigDepartEvaRate();
+ ov.ReportMonth = departEvaRate.Rows[i]["ReportMonth"].ToString();
+ ov.Depart = departEvaRate.Rows[i]["DepartCode"].ToString().Replace("Z", "");
+ ov.Team = departEvaRate.Rows[i]["SubDepartCode"].ToString();
+ ov.Participation_Rate = Convert.ToDecimal(departEvaRate.Rows[i]["Rate"]);
+ if (ov.Team != null && !string.IsNullOrEmpty(ov.Team))
+ {
+ ov.Participation_Rate_Type = "团队参与率";
+ }
+ else
+ {
+ ov.Participation_Rate_Type = "部门参与率";
+ }
+ ov.IsSafe = true;
+ departEvaRateList.Add(ov);
+ }
+ Funs.DB.FC_BigDepartEvaRate.InsertAllOnSubmit(departEvaRateList);
+ Funs.DB.SubmitChanges();
+ }
+ }
+ #endregion
}
-
#endregion
#region 导出中文版
@@ -1941,12 +1963,12 @@ namespace FineUIPro.Web.Evaluation
percent = 0;
url = "";
List punishList = (from x in Funs.DB.View_EMC_Punishment where x.Flag == "1" select x).ToList();
- List cmList = (from x in Funs.DB.View_FC_ContractManagement where x.IsExport==true orderby x.FO_NO, x.FileType select x).ToList();
- List conList = (from x in Funs.DB.View_FC_Contractor where x.FC_Status=="Valid" || x.FC_Status == "Expired Soon" orderby x.Contractor, x.Expire_Date select x).ToList();
+ List cmList = (from x in Funs.DB.View_FC_ContractManagement where x.FileType == "NCR" || x.FileType == "合同约谈" || x.FileType == "停工整改报告" orderby x.FO_NO, x.FileType select x).ToList();
+ List conList = (from x in Funs.DB.View_FC_Contractor orderby x.Contractor, x.Expire_Date select x).ToList();
List overviewReport = (from x in Funs.DB.FC_OverviewReport where x.IsSafe == false orderby x.ReportMonth, x.FO_NO select x).ToList();
List safeOverviewReport = (from x in Funs.DB.FC_OverviewReport where x.IsSafe == true orderby x.ReportMonth, x.FO_NO select x).ToList();
List noEvaluatedUser= (from x in Funs.DB.FC_NoEvaluatedUser orderby x.ReportMonth, x.IsSafe select x).ToList();
- List participationRateReport = (from x in Funs.DB.FC_BigDepartEvaRate orderby x.ReportMonth,x.Team select x).ToList();
+ List participationRateReport = (from x in Funs.DB.FC_BigDepartEvaRate orderby x.ReportMonth, x.Team select x).ToList();
List sesReportList = (from x in Funs.DB.FC_SESReport where x.Accepted != "" && x.Accepted != null select x).ToList();
Thread t = new Thread(new ThreadStart(() => { ExportCN(punishList, cmList, conList, overviewReport , safeOverviewReport, noEvaluatedUser, participationRateReport, sesReportList); }));
@@ -2526,7 +2548,7 @@ namespace FineUIPro.Web.Evaluation
wsevalu.GetRow(rowEvalIndex).GetCell(0).CellStyle = fontStyle;
//合同类型
if (wsevalu.GetRow(rowEvalIndex).GetCell(1) == null) wsevalu.GetRow(rowEvalIndex).CreateCell(1);
- wsevalu.GetRow(rowEvalIndex).GetCell(1).SetCellValue(item.IsSafe == false ? "非安全" : "安全");
+ wsevalu.GetRow(rowEvalIndex).GetCell(1).SetCellValue(item.IsSafe == false ? "常规" : "安全");
wsevalu.GetRow(rowEvalIndex).GetCell(1).CellStyle = fontStyle;
//姓名
if (wsevalu.GetRow(rowEvalIndex).GetCell(2) == null) wsevalu.GetRow(rowEvalIndex).CreateCell(2);
@@ -2545,13 +2567,29 @@ namespace FineUIPro.Web.Evaluation
wsevalu.GetRow(rowEvalIndex).GetCell(5).SetCellValue(item.RoleName);
wsevalu.GetRow(rowEvalIndex).GetCell(5).CellStyle = fontStyle;
//部门
- if (wsevalu.GetRow(rowEvalIndex).GetCell(6) == null) wsevalu.GetRow(rowEvalIndex).CreateCell(6);
- wsevalu.GetRow(rowEvalIndex).GetCell(6).SetCellValue(item.DepartName.Substring(0, item.DepartName.LastIndexOf("/")));
- wsevalu.GetRow(rowEvalIndex).GetCell(6).CellStyle = fontStyle;
+ if (item.DepartName != null && !string.IsNullOrEmpty(item.DepartName))
+ {
+ if (wsevalu.GetRow(rowEvalIndex).GetCell(6) == null) wsevalu.GetRow(rowEvalIndex).CreateCell(6);
+ int index = item.DepartName.IndexOf('/');
+ if (index > 0)
+ {
+ wsevalu.GetRow(rowEvalIndex).GetCell(6).SetCellValue(item.DepartName.Substring(0, index));
+ }
+ else
+ {
+ wsevalu.GetRow(rowEvalIndex).GetCell(6).SetCellValue(item.DepartName);
+ }
+ wsevalu.GetRow(rowEvalIndex).GetCell(6).CellStyle = fontStyle;
+ }
+
//团队
- if (wsevalu.GetRow(rowEvalIndex).GetCell(7) == null) wsevalu.GetRow(rowEvalIndex).CreateCell(7);
- wsevalu.GetRow(rowEvalIndex).GetCell(7).SetCellValue(item.DepartName);
- wsevalu.GetRow(rowEvalIndex).GetCell(7).CellStyle = fontStyle;
+ if (item.DepartName != null && !string.IsNullOrEmpty(item.DepartName) && item.DepartName.Contains("/"))
+ {
+ if (wsevalu.GetRow(rowEvalIndex).GetCell(7) == null) wsevalu.GetRow(rowEvalIndex).CreateCell(7);
+ wsevalu.GetRow(rowEvalIndex).GetCell(7).SetCellValue(item.DepartName);
+ wsevalu.GetRow(rowEvalIndex).GetCell(7).CellStyle = fontStyle;
+ }
+
//if (wsevalu.GetRow(rowEvalIndex).GetCell(6) == null) wsevalu.GetRow(rowEvalIndex).CreateCell(6);
//wsevalu.GetRow(rowEvalIndex).GetCell(6).SetCellValue(item.NotEvaluatedFoNo);
@@ -2718,8 +2756,8 @@ namespace FineUIPro.Web.Evaluation
percent = 0;
url = "";
List punishList = (from x in Funs.DB.View_EMC_Punishment where x.Flag == "1" select x).ToList();
- List cmList = (from x in Funs.DB.View_FC_ContractManagement where x.IsExport == true orderby x.FO_NO, x.FileType select x).ToList();
- List conList = (from x in Funs.DB.View_FC_Contractor where x.FC_Status == "Valid" || x.FC_Status == "Expired Soon" orderby x.Contractor, x.Expire_Date select x).ToList();
+ List cmList = (from x in Funs.DB.View_FC_ContractManagement where x.FileType == "NCR" || x.FileType == "合同约谈" || x.FileType == "停工整改报告" orderby x.FO_NO, x.FileType select x).ToList();
+ List conList = (from x in Funs.DB.View_FC_Contractor orderby x.Contractor, x.Expire_Date select x).ToList();
List overviewReport = (from x in Funs.DB.FC_OverviewReport where x.IsSafe == false orderby x.ReportMonth, x.FO_NO select x).ToList();
List safeOverviewReport = (from x in Funs.DB.FC_OverviewReport where x.IsSafe == true orderby x.ReportMonth, x.FO_NO select x).ToList();
List noEvaluatedUser = (from x in Funs.DB.FC_NoEvaluatedUser orderby x.ReportMonth, x.IsSafe select x).ToList();
@@ -3298,7 +3336,7 @@ namespace FineUIPro.Web.Evaluation
wsevalu.GetRow(rowEvalIndex).GetCell(0).SetCellValue(item.ReportMonth);
wsevalu.GetRow(rowEvalIndex).GetCell(0).CellStyle = fontStyle;
if (wsevalu.GetRow(rowEvalIndex).GetCell(1) == null) wsevalu.GetRow(rowEvalIndex).CreateCell(1);
- wsevalu.GetRow(rowEvalIndex).GetCell(1).SetCellValue(item.IsSafe == false ? "非安全" : "安全");
+ wsevalu.GetRow(rowEvalIndex).GetCell(1).SetCellValue(item.IsSafe == false ? "常规" : "安全");
wsevalu.GetRow(rowEvalIndex).GetCell(1).CellStyle = fontStyle;
if (wsevalu.GetRow(rowEvalIndex).GetCell(2) == null) wsevalu.GetRow(rowEvalIndex).CreateCell(2);
wsevalu.GetRow(rowEvalIndex).GetCell(2).SetCellValue(item.UserName);
@@ -3312,12 +3350,27 @@ namespace FineUIPro.Web.Evaluation
if (wsevalu.GetRow(rowEvalIndex).GetCell(5) == null) wsevalu.GetRow(rowEvalIndex).CreateCell(5);
wsevalu.GetRow(rowEvalIndex).GetCell(5).SetCellValue(item.RoleName);
wsevalu.GetRow(rowEvalIndex).GetCell(5).CellStyle = fontStyle;
- if (wsevalu.GetRow(rowEvalIndex).GetCell(6) == null) wsevalu.GetRow(rowEvalIndex).CreateCell(6);
- wsevalu.GetRow(rowEvalIndex).GetCell(6).SetCellValue(item.DepartName.Substring(0, item.DepartName.LastIndexOf("/")));
- wsevalu.GetRow(rowEvalIndex).GetCell(6).CellStyle = fontStyle;
- if (wsevalu.GetRow(rowEvalIndex).GetCell(7) == null) wsevalu.GetRow(rowEvalIndex).CreateCell(7);
- wsevalu.GetRow(rowEvalIndex).GetCell(7).SetCellValue(item.DepartName);
- wsevalu.GetRow(rowEvalIndex).GetCell(7).CellStyle = fontStyle;
+ if (!string.IsNullOrEmpty(item.DepartName) && item.DepartName != null)
+ {
+ if (wsevalu.GetRow(rowEvalIndex).GetCell(6) == null) wsevalu.GetRow(rowEvalIndex).CreateCell(6);
+ int index = item.DepartName.IndexOf('/');
+ if (index > 0)
+ {
+ wsevalu.GetRow(rowEvalIndex).GetCell(6).SetCellValue(item.DepartName.Substring(0, index));
+
+ }
+ else
+ {
+ wsevalu.GetRow(rowEvalIndex).GetCell(6).SetCellValue(item.DepartName);
+ }
+ wsevalu.GetRow(rowEvalIndex).GetCell(6).CellStyle = fontStyle;
+ }
+ if (!string.IsNullOrEmpty(item.DepartName) && item.DepartName != null && item.DepartName.Contains("/"))
+ {
+ if (wsevalu.GetRow(rowEvalIndex).GetCell(7) == null) wsevalu.GetRow(rowEvalIndex).CreateCell(7);
+ wsevalu.GetRow(rowEvalIndex).GetCell(7).SetCellValue(item.DepartName);
+ wsevalu.GetRow(rowEvalIndex).GetCell(7).CellStyle = fontStyle;
+ }
//if (wsevalu.GetRow(rowEvalIndex).GetCell(6) == null) wsevalu.GetRow(rowEvalIndex).CreateCell(6);
//wsevalu.GetRow(rowEvalIndex).GetCell(6).SetCellValue(item.NotEvaluatedFoNo);
//wsevalu.GetRow(rowEvalIndex).GetCell(6).CellStyle = fontStyle;
diff --git a/FCL/FineUIPro.Web/FineUIPro.Web.csproj b/FCL/FineUIPro.Web/FineUIPro.Web.csproj
index d0a7651..be75ca0 100644
--- a/FCL/FineUIPro.Web/FineUIPro.Web.csproj
+++ b/FCL/FineUIPro.Web/FineUIPro.Web.csproj
@@ -2678,6 +2678,8 @@
+
+
@@ -3629,6 +3631,20 @@
index.aspx
+
+ GuideManual.aspx
+ ASPXCodeBehind
+
+
+ GuideManual.aspx
+
+
+ Template.aspx
+ ASPXCodeBehind
+
+
+ Template.aspx
+
DataBackup.aspx
ASPXCodeBehind
diff --git a/FCL/FineUIPro.Web/SupportDocument/GuideManual.aspx b/FCL/FineUIPro.Web/SupportDocument/GuideManual.aspx
new file mode 100644
index 0000000..3c8a4a8
--- /dev/null
+++ b/FCL/FineUIPro.Web/SupportDocument/GuideManual.aspx
@@ -0,0 +1,81 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GuideManual.aspx.cs" Inherits="FineUIPro.Web.SupportDocument.GuideManual" %>
+
+
+
+
+
+
+ Guide Manual
+
+
+
+
+
diff --git a/FCL/FineUIPro.Web/SupportDocument/GuideManual.aspx.cs b/FCL/FineUIPro.Web/SupportDocument/GuideManual.aspx.cs
new file mode 100644
index 0000000..5249883
--- /dev/null
+++ b/FCL/FineUIPro.Web/SupportDocument/GuideManual.aspx.cs
@@ -0,0 +1,329 @@
+using BLL;
+using ICSharpCode.SharpZipLib.Zip;
+using System;
+using System.Collections.Generic;
+using System.Data.SqlClient;
+using System.Data;
+using System.IO;
+using System.Linq;
+using System.Net;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace FineUIPro.Web.SupportDocument
+{
+ public partial class GuideManual : PageBase
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ GetButtonPower();//按钮权限
+ BindGrid();
+
+ }
+ }
+
+ private void BindGrid()
+ {
+ string strSql = @"SELECT t.GuideManualId,
+ t.GuideManual,
+ t.UploadBy,
+ t.UploadDate,
+ t.AttachUrl,
+ U.UserName AS UploadByName
+ FROM dbo.SupportDocument_GuideManual AS t
+ LEFT JOIN Sys_User AS U ON U.UserId = t.UploadBy
+ WHERE 1=1 ";
+
+ List listStr = new List();
+ //if (tvStandardTemp.SelectedNodeID != "0" && tvStandardTemp.SelectedNodeID != null)
+ //{
+ // strSql += " AND t.TemplateTypeId = @TemplateTypeId";
+ // listStr.Add(new SqlParameter("@TemplateTypeId", tvStandardTemp.SelectedNodeID));
+ //}
+ strSql += " ORDER BY t.UploadDate DESC";
+ SqlParameter[] parameter = listStr.ToArray();
+
+ DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
+ Grid1.RecordCount = tb.Rows.Count;
+ var table = this.GetPagedDataTable(Grid1, tb);
+ Grid1.DataSource = table;
+ Grid1.DataBind();
+
+ for (int i = 0; i < Grid1.Rows.Count; i++)
+ {
+ System.Web.UI.WebControls.LinkButton lbtnUrl = ((System.Web.UI.WebControls.LinkButton)(this.Grid1.Rows[i].FindControl("lbtnUrl1")));
+ string url = lbtnUrl.CommandArgument.ToString();
+ if (!string.IsNullOrEmpty(url))
+ {
+ url = url.Replace('\\', '/');
+ lbtnUrl.Text = BLL.UploadAttachmentService.ShowAttachment("../", url);
+ }
+ }
+ }
+
+ //protected void btnSearch_Click(object sender, EventArgs e)
+ //{
+ // if (!string.IsNullOrEmpty(this.tvStandardTemp.SelectedNodeID))
+ // {
+ // BindGrid(this.tvStandardTemp.SelectedNodeID);
+ // }
+ //}
+ protected void btnAdd_Click(object sender, EventArgs e)
+ {
+ string id = SQLHelper.GetNewID(typeof(Model.SupportDocument_GuideManual));
+ PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader3.aspx?type=add&toKeyId={0}&path=FileUpload/SupportDocument/GuideManual&menuId={1}", id, BLL.Const.GuideManualMenuId)));
+ }
+
+ protected void btnEdit_Click(object sender, EventArgs e)
+ {
+ string rowId = Grid1.SelectedRowID;
+ if (!string.IsNullOrEmpty(rowId))
+ {
+ PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader3.aspx?type=edit&toKeyId={0}&path=FileUpload/SupportDocument/GuideManual&menuId={1}", rowId, BLL.Const.GuideManualMenuId)));
+ }
+ else
+ {
+ Alert.ShowInTop("Please select the record to modify!", MessageBoxIcon.Warning);
+ return;
+ }
+ //PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("StandardTemplateEdit.aspx?templateId={0}", rowId, "编辑 - ")));
+ }
+ 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 t = BLL.GuideManualService.GetGuideManualById(rowID);
+ if (t != null)
+ {
+ BLL.GuideManualService.DeleteGuideManualById(rowID);
+ }
+ }
+ BindGrid();
+ BLL.Sys_LogService.AddLog(this.CurrUser.UserId, "Delete Guide Manual");
+ ShowNotify("Deleted successfully!");
+ }
+ else
+ {
+ Alert.ShowInTop("Please select the record to Delete!", MessageBoxIcon.Warning);
+ return;
+ }
+ }
+
+
+ protected void Grid1_RowDoubleClick(object sender, EventArgs e)
+ {
+ string rowId = Grid1.SelectedRowID;
+ if (!string.IsNullOrEmpty(rowId))
+ {
+ PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader3.aspx?type=edit&toKeyId={0}&path=FileUpload/SupportDocument/GuideManual&menuId={1}", rowId, BLL.Const.GuideManualMenuId)));
+ }
+ else
+ {
+ Alert.ShowInTop("Please select the record to modify!", MessageBoxIcon.Warning);
+ return;
+ }
+ //PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("StandardTemplateEdit.aspx?templateId={0}", rowId, "编辑 - ")));
+ }
+
+ protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
+ {
+ Grid1.PageIndex = e.NewPageIndex;
+ BindGrid();
+ }
+
+ ///
+ /// 分页显示条数下拉框
+ ///
+ ///
+ ///
+ protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
+ BindGrid();
+ }
+
+ protected void Window1_Close(object sender, WindowCloseEventArgs e)
+ {
+ BindGrid();
+ }
+
+ #region 权限设置
+ ///
+ /// 菜单按钮权限
+ ///
+ private void GetButtonPower()
+ {
+ var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.UserId, BLL.Const.GuideManualMenuId);
+ if (buttonList.Count() > 0)
+ {
+ if (buttonList.Contains(BLL.Const.BtnAdd))
+ {
+ this.btnNew.Hidden = false;
+ }
+ if (buttonList.Contains(BLL.Const.BtnModify))
+ {
+ this.btnEdit.Hidden = false;
+ }
+ if (buttonList.Contains(BLL.Const.BtnDownload))
+ {
+ this.btnBatchDownload.Hidden = false;
+ }
+ if (buttonList.Contains(BLL.Const.BtnDelete))
+ {
+ this.btnDelete.Hidden = false;
+ }
+ }
+ }
+ #endregion
+
+ protected void btnBatchDownload_Click(object sender, EventArgs e)
+ {
+ string rootPath = Server.MapPath("~/").Replace('\\', '/');
+ if (Grid1.SelectedRowIDArray.Count() == 0)
+ {
+ Alert.ShowInParent("Please select Download Row!");
+ return;
+ }
+ else
+ {
+ string[] rowList = Grid1.SelectedRowIDArray;
+ List durl = new List();
+ List urlList = (from x in Funs.DB.SupportDocument_GuideManual where rowList.Contains(x.GuideManualId) && x.AttachUrl != null && x.AttachUrl != "" select x.AttachUrl).ToList();
+ string date = DateTime.Now.ToString("yyyyMMddHHmmss");
+ string destFile = rootPath + "FileUpload\\Temp\\GuideManual" + date;
+ string zipFileName = "GuideManual_" + date;
+ if (!Directory.Exists(destFile))
+ {
+ Directory.CreateDirectory(destFile);
+ }
+
+ foreach (string url in urlList)
+ {
+ string sourceFileName = rootPath + url.Replace('\\', '/');
+ string[] subUrl = sourceFileName.Split('/');
+ string fileName = subUrl[subUrl.Count() - 1];
+
+
+ string newFileName = fileName.Substring(fileName.IndexOf("~") + 1);
+ if (newFileName.Contains("_"))
+ {
+ if (newFileName.Substring(0, 1) == "_")
+ {
+ newFileName = newFileName.Substring(1, newFileName.Length - 1);
+ }
+ else
+ {
+ newFileName = newFileName.Replace(newFileName.Split('_')[0], "");
+ newFileName = newFileName.Substring(1);
+ }
+ }
+ string destFileName = destFile + "/" + newFileName;
+ if (File.Exists(sourceFileName))
+ {
+ File.Copy(sourceFileName, destFileName, true);
+ }
+ }
+ FileZipDownload(destFile.Replace('\\', '/'), zipFileName);
+ }
+ }
+
+ public string DownloadFileByHttpUrl(List HttpUrlList)
+ {
+ if (HttpUrlList == null || HttpUrlList.Count == 0)
+ {
+ return "没有附件";
+ }
+ try
+ {
+ var random = new Random();
+ var zipMs = new MemoryStream();
+ ZipOutputStream zipStream = new ZipOutputStream(zipMs);
+ zipStream.SetLevel(6);//压缩率0~9
+ foreach (var url in HttpUrlList)
+ {
+ if (!string.IsNullOrWhiteSpace(url))
+ {
+ string rootPath = System.Configuration.ConfigurationManager.AppSettings["RootUrl"];
+ string surl = rootPath + url.Replace('\\', '/');
+ var urlStr = HttpUtility.UrlDecode(surl);
+ Console.WriteLine(urlStr);
+ string fileExt = Path.GetExtension(urlStr).ToLower();
+ string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(urlStr);
+ var strName = fileNameWithoutExtension.Substring(fileNameWithoutExtension.LastIndexOf("/") + 1) + random.Next(1000, 9999) + fileExt;
+ zipStream.PutNextEntry(new ZipEntry(strName));
+ ServicePointManager.ServerCertificateValidationCallback += (s, cert, chain, sslPolicyErrors) => true;
+ ServicePointManager.SecurityProtocol = (SecurityProtocolType)192 | (SecurityProtocolType)768 | (SecurityProtocolType)3072;
+ HttpWebRequest request = (HttpWebRequest)WebRequest.Create(urlStr);
+ request.AllowAutoRedirect = true;
+ WebProxy proxy = new WebProxy();
+ proxy.BypassProxyOnLocal = true;
+ proxy.UseDefaultCredentials = true;
+ request.Proxy = proxy;
+ WebResponse response = request.GetResponse();
+ using (Stream streams = response.GetResponseStream())
+ {
+ Byte[] buffer = new Byte[1024];
+ int current = 0;
+ while ((current = streams.Read(buffer, 0, buffer.Length)) != 0)
+ {
+ zipStream.Write(buffer, 0, current);
+ }
+ zipStream.Flush();
+ }
+ }
+ }
+ zipStream.Finish();
+ zipMs.Position = 0;
+ //下边为打包压缩
+ MemoryStream stream = zipMs;
+ byte[] srcBuf = new Byte[stream.Length];
+ stream.Read(srcBuf, 0, srcBuf.Length);
+ stream.Seek(0, SeekOrigin.Begin);
+
+ string filePath = "C:/DownLoad";//Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
+ if (!Directory.Exists(filePath))
+ {
+ Directory.CreateDirectory(filePath);
+ }
+ string date = DateTime.Now.ToString("yyyyMMddHHmmss");
+ string con = "GuideManual";
+
+
+ var file_name = con + "_" + date + ".zip";
+ using (FileStream fs = new FileStream(filePath + "\\" + file_name, FileMode.Create, FileAccess.Write))
+ {
+ fs.Write(srcBuf, 0, srcBuf.Length);
+ fs.Close();
+ return "已下载到C盘Download文件下!";
+ }
+ }
+ catch (Exception ex)
+ {
+ return "下载失败:" + ex.ToString();
+ }
+ }
+
+ private void FileZipDownload(string destFilePath, string zipFileName)
+ {
+ string zipFilePath = destFilePath + ".zip";
+ System.IO.Compression.ZipFile.CreateFromDirectory(destFilePath, zipFilePath);
+ FileInfo info = new FileInfo(zipFilePath);
+ long fileSize = info.Length;
+ System.Web.HttpContext.Current.Response.Clear();
+ System.Web.HttpContext.Current.Response.ContentType = "application/x-zip-compressed";
+ System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(zipFileName + ".zip", System.Text.Encoding.UTF8));
+ System.Web.HttpContext.Current.Response.AddHeader("Content-Length", fileSize.ToString());
+ System.Web.HttpContext.Current.Response.TransmitFile(zipFilePath, 0, fileSize);
+ System.Web.HttpContext.Current.Response.Flush();
+ System.Web.HttpContext.Current.Response.Close();
+ Funs.DeleteDir(destFilePath);
+ File.Delete(zipFilePath);
+ }
+ }
+}
\ No newline at end of file
diff --git a/FCL/FineUIPro.Web/SupportDocument/GuideManual.aspx.designer.cs b/FCL/FineUIPro.Web/SupportDocument/GuideManual.aspx.designer.cs
new file mode 100644
index 0000000..bc9b4ca
--- /dev/null
+++ b/FCL/FineUIPro.Web/SupportDocument/GuideManual.aspx.designer.cs
@@ -0,0 +1,170 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.SupportDocument
+{
+
+
+ public partial class GuideManual
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// Panel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel1;
+
+ ///
+ /// Panel2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel2;
+
+ ///
+ /// Grid1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid1;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// ToolbarFill2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarFill ToolbarFill2;
+
+ ///
+ /// btnNew 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnNew;
+
+ ///
+ /// btnEdit 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnEdit;
+
+ ///
+ /// btnDelete 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnDelete;
+
+ ///
+ /// btnBatchDownload 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnBatchDownload;
+
+ ///
+ /// Label1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label1;
+
+ ///
+ /// lbtnUrl1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.LinkButton lbtnUrl1;
+
+ ///
+ /// ToolbarSeparator1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
+
+ ///
+ /// ToolbarText1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarText ToolbarText1;
+
+ ///
+ /// ddlPageSize 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList ddlPageSize;
+
+ ///
+ /// WindowAtt 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window WindowAtt;
+ }
+}
diff --git a/FCL/FineUIPro.Web/SupportDocument/Template.aspx b/FCL/FineUIPro.Web/SupportDocument/Template.aspx
new file mode 100644
index 0000000..02a855f
--- /dev/null
+++ b/FCL/FineUIPro.Web/SupportDocument/Template.aspx
@@ -0,0 +1,81 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Template.aspx.cs" Inherits="FineUIPro.Web.SupportDocument.Template" %>
+
+
+
+
+
+
+ Template
+
+
+
+
+
diff --git a/FCL/FineUIPro.Web/SupportDocument/Template.aspx.cs b/FCL/FineUIPro.Web/SupportDocument/Template.aspx.cs
new file mode 100644
index 0000000..79021a1
--- /dev/null
+++ b/FCL/FineUIPro.Web/SupportDocument/Template.aspx.cs
@@ -0,0 +1,329 @@
+using BLL;
+using ICSharpCode.SharpZipLib.Zip;
+using System;
+using System.Collections.Generic;
+using System.Data.SqlClient;
+using System.Data;
+using System.IO;
+using System.Linq;
+using System.Net;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace FineUIPro.Web.SupportDocument
+{
+ public partial class Template : PageBase
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ GetButtonPower();//按钮权限
+ BindGrid();
+
+ }
+ }
+
+ private void BindGrid()
+ {
+ string strSql = @"SELECT t.TemplateId,
+ t.Template,
+ t.UploadBy,
+ t.UploadDate,
+ t.AttachUrl,
+ U.UserName AS UploadByName
+ FROM dbo.SupportDocument_Template AS t
+ LEFT JOIN Sys_User AS U ON U.UserId = t.UploadBy
+ WHERE 1=1 ";
+
+ List listStr = new List();
+ //if (tvStandardTemp.SelectedNodeID != "0" && tvStandardTemp.SelectedNodeID != null)
+ //{
+ // strSql += " AND t.TemplateTypeId = @TemplateTypeId";
+ // listStr.Add(new SqlParameter("@TemplateTypeId", tvStandardTemp.SelectedNodeID));
+ //}
+ strSql += " ORDER BY t.UploadDate DESC";
+ SqlParameter[] parameter = listStr.ToArray();
+
+ DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
+ Grid1.RecordCount = tb.Rows.Count;
+ var table = this.GetPagedDataTable(Grid1, tb);
+ Grid1.DataSource = table;
+ Grid1.DataBind();
+
+ for (int i = 0; i < Grid1.Rows.Count; i++)
+ {
+ System.Web.UI.WebControls.LinkButton lbtnUrl = ((System.Web.UI.WebControls.LinkButton)(this.Grid1.Rows[i].FindControl("lbtnUrl1")));
+ string url = lbtnUrl.CommandArgument.ToString();
+ if (!string.IsNullOrEmpty(url))
+ {
+ url = url.Replace('\\', '/');
+ lbtnUrl.Text = BLL.UploadAttachmentService.ShowAttachment("../", url);
+ }
+ }
+ }
+
+ //protected void btnSearch_Click(object sender, EventArgs e)
+ //{
+ // if (!string.IsNullOrEmpty(this.tvStandardTemp.SelectedNodeID))
+ // {
+ // BindGrid(this.tvStandardTemp.SelectedNodeID);
+ // }
+ //}
+ protected void btnAdd_Click(object sender, EventArgs e)
+ {
+ string id = SQLHelper.GetNewID(typeof(Model.SupportDocument_Template));
+ PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader3.aspx?type=add&toKeyId={0}&path=FileUpload/SupportDocument/Template&menuId={1}", id, BLL.Const.TemplateMenuId)));
+ }
+
+ protected void btnEdit_Click(object sender, EventArgs e)
+ {
+ string rowId = Grid1.SelectedRowID;
+ if (!string.IsNullOrEmpty(rowId))
+ {
+ PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader3.aspx?type=edit&toKeyId={0}&path=FileUpload/SupportDocument/Template&menuId={1}", rowId, BLL.Const.TemplateMenuId)));
+ }
+ else
+ {
+ Alert.ShowInTop("Please select the record to modify!", MessageBoxIcon.Warning);
+ return;
+ }
+ //PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("StandardTemplateEdit.aspx?templateId={0}", rowId, "编辑 - ")));
+ }
+ 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 t = BLL.TemplateService.GetTemplateById(rowID);
+ if (t != null)
+ {
+ BLL.TemplateService.DeleteTemplateById(rowID);
+ }
+ }
+ BindGrid();
+ BLL.Sys_LogService.AddLog(this.CurrUser.UserId, "Delete Template");
+ ShowNotify("Deleted successfully!");
+ }
+ else
+ {
+ Alert.ShowInTop("Please select the record to Delete!", MessageBoxIcon.Warning);
+ return;
+ }
+ }
+
+
+ protected void Grid1_RowDoubleClick(object sender, EventArgs e)
+ {
+ string rowId = Grid1.SelectedRowID;
+ if (!string.IsNullOrEmpty(rowId))
+ {
+ PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader3.aspx?type=edit&toKeyId={0}&path=FileUpload/SupportDocument/Template&menuId={1}", rowId, BLL.Const.TemplateMenuId)));
+ }
+ else
+ {
+ Alert.ShowInTop("Please select the record to modify!", MessageBoxIcon.Warning);
+ return;
+ }
+ //PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("StandardTemplateEdit.aspx?templateId={0}", rowId, "编辑 - ")));
+ }
+
+ protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
+ {
+ Grid1.PageIndex = e.NewPageIndex;
+ BindGrid();
+ }
+
+ ///
+ /// 分页显示条数下拉框
+ ///
+ ///
+ ///
+ protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
+ BindGrid();
+ }
+
+ protected void Window1_Close(object sender, WindowCloseEventArgs e)
+ {
+ BindGrid();
+ }
+
+ #region 权限设置
+ ///
+ /// 菜单按钮权限
+ ///
+ private void GetButtonPower()
+ {
+ var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.UserId, BLL.Const.TemplateMenuId);
+ if (buttonList.Count() > 0)
+ {
+ if (buttonList.Contains(BLL.Const.BtnAdd))
+ {
+ this.btnNew.Hidden = false;
+ }
+ if (buttonList.Contains(BLL.Const.BtnModify))
+ {
+ this.btnEdit.Hidden = false;
+ }
+ if (buttonList.Contains(BLL.Const.BtnDownload))
+ {
+ this.btnBatchDownload.Hidden = false;
+ }
+ if (buttonList.Contains(BLL.Const.BtnDelete))
+ {
+ this.btnDelete.Hidden = false;
+ }
+ }
+ }
+ #endregion
+
+ protected void btnBatchDownload_Click(object sender, EventArgs e)
+ {
+ string rootPath = Server.MapPath("~/").Replace('\\', '/');
+ if (Grid1.SelectedRowIDArray.Count() == 0)
+ {
+ Alert.ShowInParent("Please select Download Row!");
+ return;
+ }
+ else
+ {
+ string[] rowList = Grid1.SelectedRowIDArray;
+ List durl = new List();
+ List urlList = (from x in Funs.DB.SupportDocument_Template where rowList.Contains(x.TemplateId) && x.AttachUrl != null && x.AttachUrl != "" select x.AttachUrl).ToList();
+ string date = DateTime.Now.ToString("yyyyMMddHHmmss");
+ string destFile = rootPath + "FileUpload\\Temp\\Template" + date;
+ string zipFileName = "Template_" + date;
+ if (!Directory.Exists(destFile))
+ {
+ Directory.CreateDirectory(destFile);
+ }
+
+ foreach (string url in urlList)
+ {
+ string sourceFileName = rootPath + url.Replace('\\', '/');
+ string[] subUrl = sourceFileName.Split('/');
+ string fileName = subUrl[subUrl.Count() - 1];
+
+
+ string newFileName = fileName.Substring(fileName.IndexOf("~") + 1);
+ if (newFileName.Contains("_"))
+ {
+ if (newFileName.Substring(0, 1) == "_")
+ {
+ newFileName = newFileName.Substring(1, newFileName.Length - 1);
+ }
+ else
+ {
+ newFileName = newFileName.Replace(newFileName.Split('_')[0], "");
+ newFileName = newFileName.Substring(1);
+ }
+ }
+ string destFileName = destFile + "/" + newFileName;
+ if (File.Exists(sourceFileName))
+ {
+ File.Copy(sourceFileName, destFileName, true);
+ }
+ }
+ FileZipDownload(destFile.Replace('\\', '/'), zipFileName);
+ }
+ }
+
+ public string DownloadFileByHttpUrl(List HttpUrlList)
+ {
+ if (HttpUrlList == null || HttpUrlList.Count == 0)
+ {
+ return "没有附件";
+ }
+ try
+ {
+ var random = new Random();
+ var zipMs = new MemoryStream();
+ ZipOutputStream zipStream = new ZipOutputStream(zipMs);
+ zipStream.SetLevel(6);//压缩率0~9
+ foreach (var url in HttpUrlList)
+ {
+ if (!string.IsNullOrWhiteSpace(url))
+ {
+ string rootPath = System.Configuration.ConfigurationManager.AppSettings["RootUrl"];
+ string surl = rootPath + url.Replace('\\', '/');
+ var urlStr = HttpUtility.UrlDecode(surl);
+ Console.WriteLine(urlStr);
+ string fileExt = Path.GetExtension(urlStr).ToLower();
+ string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(urlStr);
+ var strName = fileNameWithoutExtension.Substring(fileNameWithoutExtension.LastIndexOf("/") + 1) + random.Next(1000, 9999) + fileExt;
+ zipStream.PutNextEntry(new ZipEntry(strName));
+ ServicePointManager.ServerCertificateValidationCallback += (s, cert, chain, sslPolicyErrors) => true;
+ ServicePointManager.SecurityProtocol = (SecurityProtocolType)192 | (SecurityProtocolType)768 | (SecurityProtocolType)3072;
+ HttpWebRequest request = (HttpWebRequest)WebRequest.Create(urlStr);
+ request.AllowAutoRedirect = true;
+ WebProxy proxy = new WebProxy();
+ proxy.BypassProxyOnLocal = true;
+ proxy.UseDefaultCredentials = true;
+ request.Proxy = proxy;
+ WebResponse response = request.GetResponse();
+ using (Stream streams = response.GetResponseStream())
+ {
+ Byte[] buffer = new Byte[1024];
+ int current = 0;
+ while ((current = streams.Read(buffer, 0, buffer.Length)) != 0)
+ {
+ zipStream.Write(buffer, 0, current);
+ }
+ zipStream.Flush();
+ }
+ }
+ }
+ zipStream.Finish();
+ zipMs.Position = 0;
+ //下边为打包压缩
+ MemoryStream stream = zipMs;
+ byte[] srcBuf = new Byte[stream.Length];
+ stream.Read(srcBuf, 0, srcBuf.Length);
+ stream.Seek(0, SeekOrigin.Begin);
+
+ string filePath = "C:/DownLoad";//Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
+ if (!Directory.Exists(filePath))
+ {
+ Directory.CreateDirectory(filePath);
+ }
+ string date = DateTime.Now.ToString("yyyyMMddHHmmss");
+ string con = "Template";
+
+
+ var file_name = con + "_" + date + ".zip";
+ using (FileStream fs = new FileStream(filePath + "\\" + file_name, FileMode.Create, FileAccess.Write))
+ {
+ fs.Write(srcBuf, 0, srcBuf.Length);
+ fs.Close();
+ return "已下载到C盘Download文件下!";
+ }
+ }
+ catch (Exception ex)
+ {
+ return "下载失败:" + ex.ToString();
+ }
+ }
+
+ private void FileZipDownload(string destFilePath, string zipFileName)
+ {
+ string zipFilePath = destFilePath + ".zip";
+ System.IO.Compression.ZipFile.CreateFromDirectory(destFilePath, zipFilePath);
+ FileInfo info = new FileInfo(zipFilePath);
+ long fileSize = info.Length;
+ System.Web.HttpContext.Current.Response.Clear();
+ System.Web.HttpContext.Current.Response.ContentType = "application/x-zip-compressed";
+ System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(zipFileName + ".zip", System.Text.Encoding.UTF8));
+ System.Web.HttpContext.Current.Response.AddHeader("Content-Length", fileSize.ToString());
+ System.Web.HttpContext.Current.Response.TransmitFile(zipFilePath, 0, fileSize);
+ System.Web.HttpContext.Current.Response.Flush();
+ System.Web.HttpContext.Current.Response.Close();
+ Funs.DeleteDir(destFilePath);
+ File.Delete(zipFilePath);
+ }
+ }
+}
\ No newline at end of file
diff --git a/FCL/FineUIPro.Web/SupportDocument/Template.aspx.designer.cs b/FCL/FineUIPro.Web/SupportDocument/Template.aspx.designer.cs
new file mode 100644
index 0000000..2c63d16
--- /dev/null
+++ b/FCL/FineUIPro.Web/SupportDocument/Template.aspx.designer.cs
@@ -0,0 +1,170 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.SupportDocument
+{
+
+
+ public partial class Template
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// Panel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel1;
+
+ ///
+ /// Panel2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel2;
+
+ ///
+ /// Grid1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid1;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// ToolbarFill2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarFill ToolbarFill2;
+
+ ///
+ /// btnNew 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnNew;
+
+ ///
+ /// btnEdit 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnEdit;
+
+ ///
+ /// btnDelete 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnDelete;
+
+ ///
+ /// btnBatchDownload 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnBatchDownload;
+
+ ///
+ /// Label1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label1;
+
+ ///
+ /// lbtnUrl1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.LinkButton lbtnUrl1;
+
+ ///
+ /// ToolbarSeparator1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
+
+ ///
+ /// ToolbarText1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarText ToolbarText1;
+
+ ///
+ /// ddlPageSize 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList ddlPageSize;
+
+ ///
+ /// WindowAtt 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window WindowAtt;
+ }
+}
diff --git a/FCL/Model/Model.cs b/FCL/Model/Model.cs
index 78288ca..e02f575 100644
--- a/FCL/Model/Model.cs
+++ b/FCL/Model/Model.cs
@@ -170,6 +170,12 @@ namespace Model
partial void InsertStandardTemplate(StandardTemplate instance);
partial void UpdateStandardTemplate(StandardTemplate instance);
partial void DeleteStandardTemplate(StandardTemplate instance);
+ partial void InsertSupportDocument_GuideManual(SupportDocument_GuideManual instance);
+ partial void UpdateSupportDocument_GuideManual(SupportDocument_GuideManual instance);
+ partial void DeleteSupportDocument_GuideManual(SupportDocument_GuideManual instance);
+ partial void InsertSupportDocument_Template(SupportDocument_Template instance);
+ partial void UpdateSupportDocument_Template(SupportDocument_Template instance);
+ partial void DeleteSupportDocument_Template(SupportDocument_Template instance);
partial void InsertSyncDataUserLogs(SyncDataUserLogs instance);
partial void UpdateSyncDataUserLogs(SyncDataUserLogs instance);
partial void DeleteSyncDataUserLogs(SyncDataUserLogs instance);
@@ -664,6 +670,22 @@ namespace Model
}
}
+ public System.Data.Linq.Table SupportDocument_GuideManual
+ {
+ get
+ {
+ return this.GetTable();
+ }
+ }
+
+ public System.Data.Linq.Table SupportDocument_Template
+ {
+ get
+ {
+ return this.GetTable();
+ }
+ }
+
public System.Data.Linq.Table SyncDataUserLogs
{
get
@@ -23856,6 +23878,404 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.SupportDocument_GuideManual")]
+ public partial class SupportDocument_GuideManual : INotifyPropertyChanging, INotifyPropertyChanged
+ {
+
+ private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
+
+ private string _GuideManualId;
+
+ private string _GuideManual;
+
+ private string _UploadBy;
+
+ private System.Nullable _UploadDate;
+
+ private string _AttachUrl;
+
+ private EntityRef _Sys_User;
+
+ #region 可扩展性方法定义
+ partial void OnLoaded();
+ partial void OnValidate(System.Data.Linq.ChangeAction action);
+ partial void OnCreated();
+ partial void OnGuideManualIdChanging(string value);
+ partial void OnGuideManualIdChanged();
+ partial void OnGuideManualChanging(string value);
+ partial void OnGuideManualChanged();
+ partial void OnUploadByChanging(string value);
+ partial void OnUploadByChanged();
+ partial void OnUploadDateChanging(System.Nullable value);
+ partial void OnUploadDateChanged();
+ partial void OnAttachUrlChanging(string value);
+ partial void OnAttachUrlChanged();
+ #endregion
+
+ public SupportDocument_GuideManual()
+ {
+ this._Sys_User = default(EntityRef);
+ OnCreated();
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GuideManualId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
+ public string GuideManualId
+ {
+ get
+ {
+ return this._GuideManualId;
+ }
+ set
+ {
+ if ((this._GuideManualId != value))
+ {
+ this.OnGuideManualIdChanging(value);
+ this.SendPropertyChanging();
+ this._GuideManualId = value;
+ this.SendPropertyChanged("GuideManualId");
+ this.OnGuideManualIdChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GuideManual", DbType="NVarChar(200)")]
+ public string GuideManual
+ {
+ get
+ {
+ return this._GuideManual;
+ }
+ set
+ {
+ if ((this._GuideManual != value))
+ {
+ this.OnGuideManualChanging(value);
+ this.SendPropertyChanging();
+ this._GuideManual = value;
+ this.SendPropertyChanged("GuideManual");
+ this.OnGuideManualChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UploadBy", DbType="NVarChar(50)")]
+ public string UploadBy
+ {
+ get
+ {
+ return this._UploadBy;
+ }
+ set
+ {
+ if ((this._UploadBy != value))
+ {
+ if (this._Sys_User.HasLoadedOrAssignedValue)
+ {
+ throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
+ }
+ this.OnUploadByChanging(value);
+ this.SendPropertyChanging();
+ this._UploadBy = value;
+ this.SendPropertyChanged("UploadBy");
+ this.OnUploadByChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UploadDate", DbType="DateTime")]
+ public System.Nullable UploadDate
+ {
+ get
+ {
+ return this._UploadDate;
+ }
+ set
+ {
+ if ((this._UploadDate != value))
+ {
+ this.OnUploadDateChanging(value);
+ this.SendPropertyChanging();
+ this._UploadDate = value;
+ this.SendPropertyChanged("UploadDate");
+ this.OnUploadDateChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttachUrl", DbType="NVarChar(500)")]
+ public string AttachUrl
+ {
+ get
+ {
+ return this._AttachUrl;
+ }
+ set
+ {
+ if ((this._AttachUrl != value))
+ {
+ this.OnAttachUrlChanging(value);
+ this.SendPropertyChanging();
+ this._AttachUrl = value;
+ this.SendPropertyChanged("AttachUrl");
+ this.OnAttachUrlChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_SupportDocument_GuideManual_Sys_User", Storage="_Sys_User", ThisKey="UploadBy", OtherKey="UserId", IsForeignKey=true)]
+ public Sys_User Sys_User
+ {
+ get
+ {
+ return this._Sys_User.Entity;
+ }
+ set
+ {
+ Sys_User previousValue = this._Sys_User.Entity;
+ if (((previousValue != value)
+ || (this._Sys_User.HasLoadedOrAssignedValue == false)))
+ {
+ this.SendPropertyChanging();
+ if ((previousValue != null))
+ {
+ this._Sys_User.Entity = null;
+ previousValue.SupportDocument_GuideManual.Remove(this);
+ }
+ this._Sys_User.Entity = value;
+ if ((value != null))
+ {
+ value.SupportDocument_GuideManual.Add(this);
+ this._UploadBy = value.UserId;
+ }
+ else
+ {
+ this._UploadBy = default(string);
+ }
+ this.SendPropertyChanged("Sys_User");
+ }
+ }
+ }
+
+ 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.SupportDocument_Template")]
+ public partial class SupportDocument_Template : INotifyPropertyChanging, INotifyPropertyChanged
+ {
+
+ private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
+
+ private string _TemplateId;
+
+ private string _Template;
+
+ private string _UploadBy;
+
+ private System.Nullable _UploadDate;
+
+ private string _AttachUrl;
+
+ private EntityRef _Sys_User;
+
+ #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 OnTemplateChanging(string value);
+ partial void OnTemplateChanged();
+ partial void OnUploadByChanging(string value);
+ partial void OnUploadByChanged();
+ partial void OnUploadDateChanging(System.Nullable value);
+ partial void OnUploadDateChanged();
+ partial void OnAttachUrlChanging(string value);
+ partial void OnAttachUrlChanged();
+ #endregion
+
+ public SupportDocument_Template()
+ {
+ this._Sys_User = default(EntityRef);
+ OnCreated();
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TemplateId", DbType="NVarChar(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="_Template", DbType="NVarChar(200)")]
+ public string Template
+ {
+ get
+ {
+ return this._Template;
+ }
+ set
+ {
+ if ((this._Template != value))
+ {
+ this.OnTemplateChanging(value);
+ this.SendPropertyChanging();
+ this._Template = value;
+ this.SendPropertyChanged("Template");
+ this.OnTemplateChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UploadBy", DbType="NVarChar(50)")]
+ public string UploadBy
+ {
+ get
+ {
+ return this._UploadBy;
+ }
+ set
+ {
+ if ((this._UploadBy != value))
+ {
+ if (this._Sys_User.HasLoadedOrAssignedValue)
+ {
+ throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
+ }
+ this.OnUploadByChanging(value);
+ this.SendPropertyChanging();
+ this._UploadBy = value;
+ this.SendPropertyChanged("UploadBy");
+ this.OnUploadByChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UploadDate", DbType="DateTime")]
+ public System.Nullable UploadDate
+ {
+ get
+ {
+ return this._UploadDate;
+ }
+ set
+ {
+ if ((this._UploadDate != value))
+ {
+ this.OnUploadDateChanging(value);
+ this.SendPropertyChanging();
+ this._UploadDate = value;
+ this.SendPropertyChanged("UploadDate");
+ this.OnUploadDateChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttachUrl", DbType="NVarChar(500)")]
+ public string AttachUrl
+ {
+ get
+ {
+ return this._AttachUrl;
+ }
+ set
+ {
+ if ((this._AttachUrl != value))
+ {
+ this.OnAttachUrlChanging(value);
+ this.SendPropertyChanging();
+ this._AttachUrl = value;
+ this.SendPropertyChanged("AttachUrl");
+ this.OnAttachUrlChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_SupportDocument_Template_Sys_User", Storage="_Sys_User", ThisKey="UploadBy", OtherKey="UserId", IsForeignKey=true)]
+ public Sys_User Sys_User
+ {
+ get
+ {
+ return this._Sys_User.Entity;
+ }
+ set
+ {
+ Sys_User previousValue = this._Sys_User.Entity;
+ if (((previousValue != value)
+ || (this._Sys_User.HasLoadedOrAssignedValue == false)))
+ {
+ this.SendPropertyChanging();
+ if ((previousValue != null))
+ {
+ this._Sys_User.Entity = null;
+ previousValue.SupportDocument_Template.Remove(this);
+ }
+ this._Sys_User.Entity = value;
+ if ((value != null))
+ {
+ value.SupportDocument_Template.Add(this);
+ this._UploadBy = value.UserId;
+ }
+ else
+ {
+ this._UploadBy = default(string);
+ }
+ this.SendPropertyChanged("Sys_User");
+ }
+ }
+ }
+
+ 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.SyncDataUserLogs")]
public partial class SyncDataUserLogs : INotifyPropertyChanging, INotifyPropertyChanged
{
@@ -25873,6 +26293,10 @@ namespace Model
private EntitySet _StandardTemplate;
+ private EntitySet _SupportDocument_GuideManual;
+
+ private EntitySet _SupportDocument_Template;
+
private EntityRef _Base_Depart;
private EntityRef _Sys_Role;
@@ -25940,6 +26364,8 @@ namespace Model
this._SSR = new EntitySet(new Action(this.attach_SSR), new Action(this.detach_SSR));
this._SSR_Sys_User1 = new EntitySet(new Action(this.attach_SSR_Sys_User1), new Action(this.detach_SSR_Sys_User1));
this._StandardTemplate = new EntitySet(new Action(this.attach_StandardTemplate), new Action(this.detach_StandardTemplate));
+ this._SupportDocument_GuideManual = new EntitySet(new Action(this.attach_SupportDocument_GuideManual), new Action(this.detach_SupportDocument_GuideManual));
+ this._SupportDocument_Template = new EntitySet(new Action(this.attach_SupportDocument_Template), new Action(this.detach_SupportDocument_Template));
this._Base_Depart = default(EntityRef);
this._Sys_Role = default(EntityRef);
this._Sys_UserToEMial = new EntitySet(new Action(this.attach_Sys_UserToEMial), new Action(this.detach_Sys_UserToEMial));
@@ -26541,6 +26967,32 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_SupportDocument_GuideManual_Sys_User", Storage="_SupportDocument_GuideManual", ThisKey="UserId", OtherKey="UploadBy", DeleteRule="NO ACTION")]
+ public EntitySet SupportDocument_GuideManual
+ {
+ get
+ {
+ return this._SupportDocument_GuideManual;
+ }
+ set
+ {
+ this._SupportDocument_GuideManual.Assign(value);
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_SupportDocument_Template_Sys_User", Storage="_SupportDocument_Template", ThisKey="UserId", OtherKey="UploadBy", DeleteRule="NO ACTION")]
+ public EntitySet SupportDocument_Template
+ {
+ get
+ {
+ return this._SupportDocument_Template;
+ }
+ set
+ {
+ this._SupportDocument_Template.Assign(value);
+ }
+ }
+
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Sys_User_Base_Depart", Storage="_Base_Depart", ThisKey="DepartId", OtherKey="DepartId", IsForeignKey=true)]
public Base_Depart Base_Depart
{
@@ -26870,6 +27322,30 @@ namespace Model
entity.Sys_User = null;
}
+ private void attach_SupportDocument_GuideManual(SupportDocument_GuideManual entity)
+ {
+ this.SendPropertyChanging();
+ entity.Sys_User = this;
+ }
+
+ private void detach_SupportDocument_GuideManual(SupportDocument_GuideManual entity)
+ {
+ this.SendPropertyChanging();
+ entity.Sys_User = null;
+ }
+
+ private void attach_SupportDocument_Template(SupportDocument_Template entity)
+ {
+ this.SendPropertyChanging();
+ entity.Sys_User = this;
+ }
+
+ private void detach_SupportDocument_Template(SupportDocument_Template entity)
+ {
+ this.SendPropertyChanging();
+ entity.Sys_User = null;
+ }
+
private void attach_Sys_UserToEMial(Sys_UserToEMial entity)
{
this.SendPropertyChanging();
@@ -31628,8 +32104,6 @@ namespace Model
private string _Remark;
- private string _FileType;
-
private string _Contract_Admin;
private string _Main_Coordinator;
@@ -31640,10 +32114,10 @@ namespace Model
private string _BycDept;
- private System.Nullable _IsExport;
-
private string _ContractorShortName;
+ private string _FileType;
+
public View_FC_ContractManagement()
{
}
@@ -31792,22 +32266,6 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FileType", DbType="NVarChar(50)")]
- public string FileType
- {
- get
- {
- return this._FileType;
- }
- set
- {
- if ((this._FileType != value))
- {
- this._FileType = value;
- }
- }
- }
-
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Contract_Admin", DbType="NVarChar(50)")]
public string Contract_Admin
{
@@ -31888,22 +32346,6 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsExport", DbType="Bit")]
- public System.Nullable IsExport
- {
- get
- {
- return this._IsExport;
- }
- set
- {
- if ((this._IsExport != value))
- {
- this._IsExport = value;
- }
- }
- }
-
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractorShortName", DbType="NVarChar(50)")]
public string ContractorShortName
{
@@ -31919,6 +32361,22 @@ namespace Model
}
}
}
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FileType", DbType="VarChar(18)")]
+ public string FileType
+ {
+ get
+ {
+ return this._FileType;
+ }
+ set
+ {
+ if ((this._FileType != value))
+ {
+ this._FileType = value;
+ }
+ }
+ }
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_FC_ContractManagementLists")]