安全不符合项清单
This commit is contained in:
+4
-1
@@ -301,6 +301,7 @@
|
||||
<Compile Include="BaseInfo\UnitTypeService.cs" />
|
||||
<Compile Include="BaseInfo\WorkPostService.cs" />
|
||||
<Compile Include="BaseInfo\WorkStageService.cs" />
|
||||
<Compile Include="Check\HSE\CheckProblemSafetyService.cs" />
|
||||
<Compile Include="Common\AttachFileService.cs" />
|
||||
<Compile Include="Common\Captcha.cs" />
|
||||
<Compile Include="Common\CodeRecordsService.cs" />
|
||||
@@ -1206,7 +1207,9 @@
|
||||
<ItemGroup>
|
||||
<WCFMetadataStorage Include="Service References\CNCECHSSEService\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<Folder Include="Check\QMS\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="..\packages\Microsoft.Extensions.Logging.Abstractions.6.0.0\build\Microsoft.Extensions.Logging.Abstractions.targets" Condition="Exists('..\packages\Microsoft.Extensions.Logging.Abstractions.6.0.0\build\Microsoft.Extensions.Logging.Abstractions.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
|
||||
@@ -91,16 +91,16 @@ namespace BLL
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 教材库下拉框
|
||||
/// 问题分类明细项下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName">下拉框名字</param>
|
||||
/// <param name="workPostId">职务Id</param>
|
||||
/// <param name="classifyId">分类Id</param>
|
||||
/// <param name="isShowPlease">是否显示请选择</param>
|
||||
public static void InitClassifyItemDownList(FineUIPro.DropDownList dropName, string workPostId, bool isShowPlease)
|
||||
public static void InitClassifyItemDownList(FineUIPro.DropDownList dropName, string classifyId, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "ClassifyItemId";
|
||||
dropName.DataTextField = "ClassifyItemName";
|
||||
dropName.DataSource = GetClassifyItemList(workPostId);
|
||||
dropName.DataSource = GetClassifyItemList(classifyId);
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
|
||||
@@ -85,12 +85,12 @@ namespace BLL
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 类型下拉框(末级)
|
||||
/// 类型下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName"></param>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="isShowPlease"></param>
|
||||
public static void InitClassifyIsEndDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
|
||||
public static void InitClassifyDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "ClassifyId";
|
||||
dropName.DataTextField = "ClassifyName";
|
||||
|
||||
@@ -95,16 +95,16 @@ namespace BLL
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 教材库下拉框
|
||||
/// 问题性质明细下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName">下拉框名字</param>
|
||||
/// <param name="workPostId">职务Id</param>
|
||||
/// <param name="natureId">性质Id</param>
|
||||
/// <param name="isShowPlease">是否显示请选择</param>
|
||||
public static void InitNatureItemDownList(FineUIPro.DropDownList dropName, string workPostId, bool isShowPlease)
|
||||
public static void InitNatureItemDownList(FineUIPro.DropDownList dropName, string natureId, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "NatureItemId";
|
||||
dropName.DataTextField = "NatureItemName";
|
||||
dropName.DataSource = GetNatureItemList(workPostId);
|
||||
dropName.DataTextField = "NatureItemContent";
|
||||
dropName.DataSource = GetNatureItemList(natureId);
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
@@ -115,14 +115,14 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 获取下拉项
|
||||
/// </summary>
|
||||
/// <param name="classifyId"></param>
|
||||
/// <param name="natureId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Base_SafetyProblemNatureItem> GetNatureItemList(string classifyId)
|
||||
public static List<Model.Base_SafetyProblemNatureItem> GetNatureItemList(string natureId)
|
||||
{
|
||||
var lst = (from x in Funs.DB.Base_SafetyProblemNatureItem orderby x.NatureItemCode select x).ToList();
|
||||
if (!string.IsNullOrWhiteSpace(classifyId))
|
||||
if (!string.IsNullOrWhiteSpace(natureId))
|
||||
{
|
||||
lst = lst.Where(x => x.NatureId == classifyId).ToList();
|
||||
lst = lst.Where(x => x.NatureId == natureId).ToList();
|
||||
}
|
||||
return lst;
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace BLL
|
||||
/// <param name="dropName"></param>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="isShowPlease"></param>
|
||||
public static void InitNatureIsEndDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
|
||||
public static void InitNatureDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "NatureId";
|
||||
dropName.DataTextField = "NatureName";
|
||||
|
||||
@@ -0,0 +1,213 @@
|
||||
using System;
|
||||
using Model;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 安全不符合项清单
|
||||
/// </summary>
|
||||
public static class CheckProblemSafetyService
|
||||
{
|
||||
#region Fields
|
||||
|
||||
public static Dictionary<string, int> StateMap = new Dictionary<string, int>
|
||||
{
|
||||
{ "整改中" ,(int)StateInt.整改中},
|
||||
{ "已闭环" ,(int)StateInt.已闭环},
|
||||
};
|
||||
|
||||
#endregion Fields
|
||||
|
||||
#region Enums
|
||||
|
||||
public enum StateInt : int
|
||||
{
|
||||
整改中 = 1,
|
||||
已闭环 = 0
|
||||
}
|
||||
|
||||
#endregion Enums
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// 根据ID获取检查记录
|
||||
/// </summary>
|
||||
/// <param name="checkId">检查记录ID</param>
|
||||
/// <returns>检查记录</returns>
|
||||
public static Model.CheckProblem_Safety GetCheckProblemById(string checkId)
|
||||
{
|
||||
return Funs.DB.CheckProblem_Safety.FirstOrDefault(e => e.CheckId == checkId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加检查记录
|
||||
/// </summary>
|
||||
/// <param name="model">检查记录</param>
|
||||
public static void AddCheckProblem(Model.CheckProblem_Safety model)
|
||||
{
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.CheckProblem_Safety newModel = new Model.CheckProblem_Safety
|
||||
{
|
||||
CheckId = model.CheckId,
|
||||
UnitId = model.UnitId,
|
||||
UnitName = model.UnitName,
|
||||
ProjectId = model.ProjectId,
|
||||
ProjectName = model.ProjectName,
|
||||
State = model.State,
|
||||
Address = model.Address,
|
||||
Description = model.Description,
|
||||
UnitType = model.UnitType,
|
||||
AssemblyName = model.AssemblyName,
|
||||
//CheckUserId = model.CheckUserId,
|
||||
//CheckUserName = model.CheckUserName,
|
||||
CheckTeamUser = model.CheckTeamUser,
|
||||
CheckDate = model.CheckDate,
|
||||
LimitDate = model.LimitDate,
|
||||
CloseTime = model.CloseTime,
|
||||
RectificationUserId = model.RectificationUserId,
|
||||
RectificationUserName = model.RectificationUserName,
|
||||
PMUserId = model.PMUserId,
|
||||
PMUserName = model.PMUserName,
|
||||
ClassifyId = model.ClassifyId,
|
||||
ClassifyItemId = model.ClassifyItemId,
|
||||
NatureId = model.NatureId,
|
||||
NatureItemId = model.NatureItemId,
|
||||
AttachUrl = model.AttachUrl,
|
||||
RectificationUrl = model.RectificationUrl,
|
||||
Remark = model.Remark,
|
||||
CompileMan = model.CompileMan,
|
||||
CompileManName = model.CompileManName,
|
||||
CompileDate = DateTime.Now
|
||||
};
|
||||
db.CheckProblem_Safety.InsertOnSubmit(newModel);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新检查记录
|
||||
/// </summary>
|
||||
/// <param name="model">检查记录</param>
|
||||
public static void UpdateCheckProblem(Model.CheckProblem_Safety model)
|
||||
{
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.CheckProblem_Safety newModel = db.CheckProblem_Safety.FirstOrDefault(e => e.CheckId == model.CheckId);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.CheckDate = model.CheckDate;
|
||||
newModel.UnitId = model.UnitId;
|
||||
newModel.UnitName = model.UnitName;
|
||||
newModel.ProjectId = model.ProjectId;
|
||||
newModel.ProjectName = model.ProjectName;
|
||||
newModel.State = model.State;
|
||||
newModel.Address = model.Address;
|
||||
newModel.Description = model.Description;
|
||||
newModel.UnitType = model.UnitType;
|
||||
newModel.AssemblyName = model.AssemblyName;
|
||||
//newModel.CheckUserId = model.CheckUserId;
|
||||
//newModel.CheckUserName = model.CheckUserName;
|
||||
newModel.CheckTeamUser = model.CheckTeamUser;
|
||||
newModel.CheckDate = model.CheckDate;
|
||||
newModel.LimitDate = model.LimitDate;
|
||||
newModel.CloseTime = model.CloseTime;
|
||||
newModel.RectificationUserId = model.RectificationUserId;
|
||||
newModel.RectificationUserName = model.RectificationUserName;
|
||||
newModel.PMUserId = model.PMUserId;
|
||||
newModel.PMUserName = model.PMUserName;
|
||||
newModel.ClassifyId = model.ClassifyId;
|
||||
newModel.ClassifyItemId = model.ClassifyItemId;
|
||||
newModel.NatureId = model.NatureId;
|
||||
newModel.NatureItemId = model.NatureItemId;
|
||||
newModel.AttachUrl = model.AttachUrl;
|
||||
newModel.RectificationUrl = model.RectificationUrl;
|
||||
newModel.Remark = model.Remark;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static string ConvertState(int state)
|
||||
{
|
||||
string result = string.Empty;
|
||||
result = StateMap.First(c => c.Value == state).Key;
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除检查记录
|
||||
/// </summary>
|
||||
/// <param name="checkId">检查记录ID</param>
|
||||
public static void DeleteCheckProblemById(string checkId)
|
||||
{
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var model = db.CheckProblem_Safety.FirstOrDefault(e => e.CheckId == checkId);
|
||||
if (model != null)
|
||||
{
|
||||
// 删除附件
|
||||
if (!string.IsNullOrEmpty(model.AttachUrl))
|
||||
{
|
||||
BLL.UploadFileService.DeleteFile(Funs.RootPath, model.AttachUrl);
|
||||
}
|
||||
// 删除附件
|
||||
if (!string.IsNullOrEmpty(model.RectificationUrl))
|
||||
{
|
||||
BLL.UploadFileService.DeleteFile(Funs.RootPath, model.RectificationUrl);
|
||||
}
|
||||
//// 删除编码记录
|
||||
//BLL.CodeRecordsService.DeleteCodeRecordsByDataId(checkId);
|
||||
// 删除附件
|
||||
BLL.CommonService.DeleteAttachFileById(checkId);
|
||||
|
||||
db.CheckProblem_Safety.DeleteOnSubmit(model);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据项目和时间段获取检查数量
|
||||
/// </summary>
|
||||
/// <param name="projectId">项目ID</param>
|
||||
/// <param name="startTime">开始时间</param>
|
||||
/// <param name="endTime">结束时间</param>
|
||||
/// <returns>检查数量</returns>
|
||||
public static int GetCount(string projectId, DateTime startTime, DateTime endTime)
|
||||
{
|
||||
return (from x in Funs.DB.CheckProblem_Safety
|
||||
where x.ProjectId == projectId && x.CheckDate >= startTime && x.CheckDate <= endTime
|
||||
select x).Count();
|
||||
}
|
||||
//public static int GetCount(string checkMainType)
|
||||
//{
|
||||
// return (from x in Funs.DB.CheckProblem_Safety
|
||||
// where x.CheckMainType == checkMainType
|
||||
// select x.CheckProblemId).Count();
|
||||
//}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 判断是否可以删除检查记录
|
||||
/// </summary>
|
||||
/// <param name="checkId">检查记录ID</param>
|
||||
/// <returns>true=可以删除,false=不能删除</returns>
|
||||
public static bool CanDeleteCheckProblem(string checkId)
|
||||
{
|
||||
var model = GetCheckProblemById(checkId);
|
||||
if (model == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// 只有"整改中"状态可以删除,其他状态不能删除
|
||||
return model.State == (int)StateInt.整改中;
|
||||
}
|
||||
|
||||
|
||||
#endregion Methods
|
||||
}
|
||||
}
|
||||
@@ -1806,8 +1806,29 @@ namespace BLL
|
||||
public const string ProjectProjectMapMenuId = "F266456A-991F-45A3-BCD6-CF2515D71E39";
|
||||
#endregion
|
||||
|
||||
|
||||
#region 不符合项
|
||||
|
||||
#region 不符合项导入模版
|
||||
|
||||
/// <summary>
|
||||
/// 安全危害因素数据导入模板
|
||||
/// </summary>
|
||||
public const string CheckProblemSafetyDataInTemplateUrl = "File\\Excel\\DataIn\\安全不符合项清单导入模板.xlsx";
|
||||
|
||||
#endregion
|
||||
|
||||
#region 不符合项菜单
|
||||
|
||||
/// <summary>
|
||||
/// HSE不符合清单
|
||||
/// </summary>
|
||||
public const string SafetyCheckProblemMenuId = "664ACF2F-6750-4389-AF11-F429010FC9A7";
|
||||
|
||||
#endregion
|
||||
|
||||
#region 不符合项基础字典
|
||||
|
||||
/// <summary>
|
||||
/// 安全问题分类
|
||||
/// </summary>
|
||||
@@ -1827,6 +1848,8 @@ namespace BLL
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region 岗位培训
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -10,8 +10,6 @@ namespace BLL
|
||||
|
||||
public static class LoginService
|
||||
{
|
||||
public static CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 用户登录成功方法
|
||||
/// </summary>
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
namespace BLL
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Model;
|
||||
using System;
|
||||
|
||||
public static class ProjectPageDataService
|
||||
{
|
||||
public static CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
///获取移动端首页
|
||||
/// </summary>
|
||||
|
||||
@@ -202,6 +202,7 @@
|
||||
select x).ToList();
|
||||
return list;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 项目属性下拉框
|
||||
/// </summary>
|
||||
@@ -458,6 +459,31 @@
|
||||
}
|
||||
|
||||
#region 项目表下拉框
|
||||
|
||||
/// <summary>
|
||||
/// 项目表下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName">下拉框名字</param>
|
||||
/// <param name="isShowPlease">是否显示请选择</param>
|
||||
public static void InitProjectDropDownList(FineUIPro.DropDownList dropName, string unitId, bool isShowPlease)
|
||||
{
|
||||
var IsThisUnit = CommonService.GetThisUnitId() == unitId ? true : false;
|
||||
dropName.DataValueField = "ProjectId";
|
||||
dropName.DataTextField = "ProjectName";
|
||||
if (IsThisUnit)
|
||||
{
|
||||
dropName.DataSource = GetProjectWorkList();
|
||||
}
|
||||
else
|
||||
{
|
||||
dropName.DataSource =GetProjectWorkList(unitId);
|
||||
}
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 项目表下拉框
|
||||
/// </summary>
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
|
||||
public static class ProjectUserService
|
||||
{
|
||||
public static CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
///获取项目用户信息
|
||||
/// </summary>
|
||||
@@ -59,8 +57,8 @@
|
||||
UnitId = projectUser.UnitId,
|
||||
RoleId = projectUser.RoleId,
|
||||
IsPost = projectUser.IsPost,
|
||||
MainCNProfessionalId=projectUser.MainCNProfessionalId,
|
||||
ViceCNProfessionalId=projectUser.ViceCNProfessionalId
|
||||
MainCNProfessionalId = projectUser.MainCNProfessionalId,
|
||||
ViceCNProfessionalId = projectUser.ViceCNProfessionalId
|
||||
};
|
||||
//newProjectUser.RoleName = projectUser.RoleName;
|
||||
db.Project_ProjectUser.InsertOnSubmit(newProjectUser);
|
||||
@@ -154,7 +152,7 @@
|
||||
|
||||
public static List<Sys_User> GetProjectUserByUnitidAndProjectId(string ProjectId, string UnitId, string RoleId)
|
||||
{
|
||||
var ids = Funs.DB.Project_ProjectUser.Where(e => e.ProjectId == ProjectId &&( UnitId==""|| e.UnitId == UnitId)&&(RoleId==""||e.RoleId.Contains(RoleId)) ).Select(u => u.UserId).ToList();
|
||||
var ids = Funs.DB.Project_ProjectUser.Where(e => e.ProjectId == ProjectId && (UnitId == "" || e.UnitId == UnitId) && (RoleId == "" || e.RoleId.Contains(RoleId))).Select(u => u.UserId).ToList();
|
||||
return Funs.DB.Sys_User.Where(u => ids.Contains(u.UserId)).ToList();
|
||||
}
|
||||
|
||||
@@ -170,5 +168,28 @@
|
||||
where x.ProjectId == ProjectId && y.IdentityCard == IdentityCard
|
||||
select x).FirstOrDefault();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据项目Id获取项目所有在岗用户
|
||||
/// </summary>
|
||||
/// <param name="ProjectId"></param>
|
||||
/// <param name="UnitId"></param>
|
||||
/// <param name="RoleId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Sys_User> GetProjectUserByProjectId(string ProjectId, string UnitId, string RoleId)
|
||||
{
|
||||
var pUsers = Funs.DB.Project_ProjectUser.Where(e => e.ProjectId == ProjectId && e.IsPost == true).ToList();
|
||||
if (!string.IsNullOrWhiteSpace(UnitId))
|
||||
{
|
||||
pUsers = pUsers.Where(x => x.UnitId == UnitId).ToList();
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(RoleId))
|
||||
{
|
||||
pUsers = pUsers.Where(x => x.RoleId == RoleId).ToList();
|
||||
}
|
||||
var ids = pUsers.Select(u => u.UserId).ToList();
|
||||
return Funs.DB.Sys_User.Where(u => ids.Contains(u.UserId)).ToList();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -124,13 +124,11 @@ namespace BLL
|
||||
#region 执行任务
|
||||
public static void ExecuteTasks(string InterFaceTaskId)
|
||||
{
|
||||
|
||||
var model = GetInterFaceTaskById(InterFaceTaskId);
|
||||
var InterFaceSetlIds = model.InterFaceSetLists.Split(',');
|
||||
foreach (var item in InterFaceSetlIds)
|
||||
{
|
||||
ExecuteTasksByInterFaceSetlId(item);
|
||||
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
@@ -149,7 +147,7 @@ namespace BLL
|
||||
if (InterfaceSetModel.IsSingleRequest == true)
|
||||
{
|
||||
var taskData = GetSingleRequestData(InterfaceSetModel.InterFaceUrl, InterfaceSetModel.RequestJsonBody, InterfaceSetModel.UrlReqMethod);
|
||||
bool taskSuccess = taskData.code == 1;
|
||||
bool taskSuccess = taskData != null && taskData.code == 1;
|
||||
InterFaceLogService.WriteInterFaceLog(InterFaceSetlId, InterfaceSetModel.RequestJsonBody, JsonConvert.SerializeObject(taskData), InterFaceLogService.Type1, taskSuccess);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using FineUIPro;
|
||||
using Model;
|
||||
using Newtonsoft.Json;
|
||||
using NPOI.POIFS.Crypt.Dsig;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
@@ -11,8 +10,6 @@ namespace BLL
|
||||
{
|
||||
public static class CQMSDataService
|
||||
{
|
||||
public static CNPCDB db = Funs.DB;
|
||||
|
||||
#region 获取列表
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -11,8 +11,6 @@ namespace BLL
|
||||
{
|
||||
public static class HJGLData_HJGLService
|
||||
{
|
||||
public static CNPCDB db = Funs.DB;
|
||||
|
||||
#region 获取列表
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -4,16 +4,12 @@ using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Model;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public static class Project_HJGLData_DefectService
|
||||
{
|
||||
public static CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
#region 获取列表
|
||||
|
||||
/// <summary>
|
||||
@@ -23,6 +19,7 @@ namespace BLL
|
||||
|
||||
public static List<Project_HJGLData_Defect> GetProject_HJGLData_DefectByModle(Project_HJGLData_Defect table)
|
||||
{
|
||||
var db = Funs.DB;
|
||||
var q = from x in db.Project_HJGLData_Defect
|
||||
where
|
||||
(string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) &&
|
||||
@@ -49,23 +46,24 @@ namespace BLL
|
||||
if (count == 0) return null;
|
||||
// q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
|
||||
return from x in q
|
||||
select new
|
||||
{
|
||||
x.Id,
|
||||
x.ProjectId,
|
||||
x.UnitId,
|
||||
x.CollCropCode,
|
||||
x.UnitName,
|
||||
x.ReportDate,
|
||||
x.DefectName,
|
||||
x.DefectNum
|
||||
};
|
||||
select new
|
||||
{
|
||||
x.Id,
|
||||
x.ProjectId,
|
||||
x.UnitId,
|
||||
x.CollCropCode,
|
||||
x.UnitName,
|
||||
x.ReportDate,
|
||||
x.DefectName,
|
||||
x.DefectNum
|
||||
};
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public static Project_HJGLData_Defect GetProject_HJGLData_DefectById(string Id)
|
||||
{
|
||||
var db = Funs.DB;
|
||||
return db.Project_HJGLData_Defect.FirstOrDefault(x => x.Id == Id);
|
||||
}
|
||||
|
||||
@@ -75,17 +73,18 @@ namespace BLL
|
||||
/// <param name="reportDate"></param>
|
||||
/// <param name="projectid"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Project_HJGLData_Defect> GetProject_HJGLData_DefectByDate(DateTime? reportDate,
|
||||
string projectid)
|
||||
public static List<Project_HJGLData_Defect> GetProject_HJGLData_DefectByDate(DateTime? reportDate, string projectid)
|
||||
{
|
||||
var db = Funs.DB;
|
||||
var q = from x in db.Project_HJGLData_Defect
|
||||
where x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0 && x.ProjectId == projectid
|
||||
select x;
|
||||
where x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0 && x.ProjectId == projectid
|
||||
select x;
|
||||
return q.ToList();
|
||||
}
|
||||
|
||||
public static void AddProject_HJGLData_Defect(Project_HJGLData_Defect newtable)
|
||||
{
|
||||
var db = Funs.DB;
|
||||
var table = new Project_HJGLData_Defect
|
||||
{
|
||||
Id = newtable.Id,
|
||||
@@ -103,12 +102,14 @@ namespace BLL
|
||||
|
||||
public static void AddBulkProject_HJGLData_Defect(List<Project_HJGLData_Defect> newtables)
|
||||
{
|
||||
var db = Funs.DB;
|
||||
db.Project_HJGLData_Defect.InsertAllOnSubmit(newtables);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
public static void UpdateProject_HJGLData_Defect(Project_HJGLData_Defect newtable)
|
||||
{
|
||||
var db = Funs.DB;
|
||||
var table = db.Project_HJGLData_Defect.FirstOrDefault(x => x.Id == newtable.Id);
|
||||
if (table != null)
|
||||
{
|
||||
@@ -126,6 +127,7 @@ namespace BLL
|
||||
|
||||
public static void DeleteProject_HJGLData_DefectById(string Id)
|
||||
{
|
||||
var db = Funs.DB;
|
||||
var table = db.Project_HJGLData_Defect.FirstOrDefault(x => x.Id == Id);
|
||||
if (table != null)
|
||||
{
|
||||
@@ -136,8 +138,8 @@ namespace BLL
|
||||
|
||||
public static void DeleteProject_HJGLData_DefectByDate(DateTime? reportDate)
|
||||
{
|
||||
var table = db.Project_HJGLData_Defect.Where(x =>
|
||||
x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0);
|
||||
var db = Funs.DB;
|
||||
var table = db.Project_HJGLData_Defect.Where(x => x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0);
|
||||
if (table != null)
|
||||
{
|
||||
db.Project_HJGLData_Defect.DeleteAllOnSubmit(table);
|
||||
@@ -147,8 +149,8 @@ namespace BLL
|
||||
|
||||
public static void DeleteProject_HJGLData_DefectByDate(DateTime? reportDate, string projectid)
|
||||
{
|
||||
var table = db.Project_HJGLData_Defect.Where(x =>
|
||||
x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0 && x.ProjectId == projectid);
|
||||
var db = Funs.DB;
|
||||
var table = db.Project_HJGLData_Defect.Where(x => x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0 && x.ProjectId == projectid);
|
||||
if (table != null)
|
||||
{
|
||||
db.Project_HJGLData_Defect.DeleteAllOnSubmit(table);
|
||||
@@ -162,11 +164,12 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static bool IsReportByToday(string projectid, string type)
|
||||
{
|
||||
var db = Funs.DB;
|
||||
var result = false;
|
||||
var q = (from x in Funs.DB.Project_HJGLData_Defect
|
||||
where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date &&
|
||||
x.ProjectId == projectid && x.DefectName == type
|
||||
select x).ToList();
|
||||
where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date &&
|
||||
x.ProjectId == projectid && x.DefectName == type
|
||||
select x).ToList();
|
||||
if (q != null && q.Count > 0) result = true;
|
||||
return result;
|
||||
}
|
||||
@@ -178,25 +181,27 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Project_HJGLData_Defect getTodayProject_HJGLData_Defect(string projectid, string type)
|
||||
{
|
||||
var db = Funs.DB;
|
||||
var q = (from x in Funs.DB.Project_HJGLData_Defect
|
||||
where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date &&
|
||||
x.ProjectId == projectid && x.DefectName == type
|
||||
select x).FirstOrDefault();
|
||||
where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date &&
|
||||
x.ProjectId == projectid && x.DefectName == type
|
||||
select x).FirstOrDefault();
|
||||
return q;
|
||||
}
|
||||
|
||||
public static List<HJGLDataDefectItems> getTodayProject_HJGLData_Defect()
|
||||
{
|
||||
var db = Funs.DB;
|
||||
var q = (from x in Funs.DB.Project_HJGLData_Defect
|
||||
where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date
|
||||
group x by x.DefectName
|
||||
where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date
|
||||
group x by x.DefectName
|
||||
into g
|
||||
select new HJGLDataDefectItems
|
||||
{
|
||||
Id = SQLHelper.GetNewID(),
|
||||
DefectName = g.Key,
|
||||
DefectNum = g.Sum(p => p.DefectNum)
|
||||
}).ToList();
|
||||
select new HJGLDataDefectItems
|
||||
{
|
||||
Id = SQLHelper.GetNewID(),
|
||||
DefectName = g.Key,
|
||||
DefectNum = g.Sum(p => p.DefectNum)
|
||||
}).ToList();
|
||||
return q;
|
||||
}
|
||||
|
||||
@@ -214,19 +219,19 @@ namespace BLL
|
||||
var baseUnit = UnitService.GetUnitByUnitId(thisUnitId);
|
||||
var data = (from x in db.CH_CheckItem
|
||||
join y in db.CH_Check on x.CHT_CheckID equals y.CHT_CheckID
|
||||
where projectids.Contains(y.ProjectId)
|
||||
group x by new { x.Defects_Definition, y.ProjectId }
|
||||
where projectids.Contains(y.ProjectId)
|
||||
group x by new { x.Defects_Definition, y.ProjectId }
|
||||
into g
|
||||
select new
|
||||
{
|
||||
UnitId = thisUnitId,
|
||||
CollCropCode = baseUnit.CollCropCode,
|
||||
UnitName = baseUnit.UnitName,
|
||||
ProjectId = g.Key.ProjectId,
|
||||
ReportDate = DateTime.Now.Date,
|
||||
DefectName = g.Key.Defects_Definition,
|
||||
DefectNum = g.Count(x => x.Defects_Definition == g.Key.Defects_Definition)
|
||||
}).ToList();
|
||||
select new
|
||||
{
|
||||
UnitId = thisUnitId,
|
||||
CollCropCode = baseUnit.CollCropCode,
|
||||
UnitName = baseUnit.UnitName,
|
||||
ProjectId = g.Key.ProjectId,
|
||||
ReportDate = DateTime.Now.Date,
|
||||
DefectName = g.Key.Defects_Definition,
|
||||
DefectNum = g.Count(x => x.Defects_Definition == g.Key.Defects_Definition)
|
||||
}).ToList();
|
||||
DeleteProject_HJGLData_DefectByDate(DateTime.Now.Date); //删除当前所有
|
||||
var projectHjglDataDefect = new List<Project_HJGLData_Defect>();
|
||||
foreach (var item in data
|
||||
@@ -255,14 +260,15 @@ namespace BLL
|
||||
/// <param name="projectid"></param>
|
||||
public static void StatisticalData(string projectid)
|
||||
{
|
||||
var db = Funs.DB;
|
||||
var thisUnitId = string.Empty;
|
||||
var thisUnit = CommonService.GetIsThisUnit();
|
||||
if (thisUnit != null) thisUnitId = thisUnit.UnitId;
|
||||
var base_Unit = UnitService.GetUnitByUnitId(thisUnitId);
|
||||
var list = from x in db.CH_CheckItem
|
||||
join y in db.CH_Check on x.CHT_CheckID equals y.CHT_CheckID
|
||||
where y.ProjectId == projectid
|
||||
select x;
|
||||
join y in db.CH_Check on x.CHT_CheckID equals y.CHT_CheckID
|
||||
where y.ProjectId == projectid
|
||||
select x;
|
||||
var types = (from x in list select x.Defects_Definition).Distinct().ToList();
|
||||
foreach (var t in types)
|
||||
if (!string.IsNullOrEmpty(t))
|
||||
|
||||
@@ -0,0 +1,223 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CheckProblem.aspx.cs" Inherits="FineUIPro.Web.Check.HSE.CheckProblem" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<script src="../../Controls/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
|
||||
<title>安全不符合项清单</title>
|
||||
<style type="text/css">
|
||||
.labcenter {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* .f-grid-row .f-grid-cell-inner {
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.f-grid-colheader-text {
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}*/
|
||||
|
||||
.f-grid-row .f-grid-cell-text {
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
overflow: hidden;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
display: -webkit-box;
|
||||
}
|
||||
|
||||
.LabelColor {
|
||||
color: Red;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
.Green {
|
||||
background-color: Green;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.Yellow {
|
||||
background-color: #FFFF93;
|
||||
}
|
||||
|
||||
.Red {
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
.LightGreen {
|
||||
background-color: LightGreen
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false" ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="安全不符合项清单" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="CheckId" AllowCellEditing="true" EnableColumnLines="true"
|
||||
ClicksToEdit="2" DataIDField="CheckId" AllowSorting="true" SortField="CheckDate DESC,UnitName"
|
||||
SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="true">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:TextBox runat="server" ID="txtSearch" Label="查询" EmptyText="问题描述、检查人、受检单位、项目"
|
||||
Width="300px" AutoPostBack="true" OnTextChanged="TextBox_TextChanged" LabelWidth="50px" LabelAlign="right">
|
||||
</f:TextBox>
|
||||
<%--<f:DropDownList ID="drpUnit" runat="server" Label="受检单位" EnableEdit="true" EmptyText="请选择受检单位" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged"
|
||||
LabelAlign="right">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpProject" runat="server" Label="受检项目" EnableEdit="true" EmptyText="请选择受检项目" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged"
|
||||
LabelAlign="right">
|
||||
</f:DropDownList>--%>
|
||||
<f:RadioButtonList runat="server" ID="rblUnitType" Label="单位类型" LabelWidth="80px" Width="290px" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged">
|
||||
<f:RadioItem Value="" Text="全部" Selected="true" />
|
||||
<f:RadioItem Value="承包商" Text="承包商" />
|
||||
<f:RadioItem Value="项目部" Text="项目部" />
|
||||
</f:RadioButtonList>
|
||||
<f:DropDownList ID="drpClassify" runat="server" Label="问题分类" EnableEdit="true" EmptyText="请选择问题分类" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged" LabelAlign="right" LabelWidth="80px">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpNature" runat="server" Label="问题性质" EnableEdit="true" EmptyText="请选择问题性质" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged" LabelAlign="right" LabelWidth="80px" Width="180px">
|
||||
</f:DropDownList>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnRset" OnClick="btnRset_Click" ToolTip="重置查询条件" Icon="ArrowUndo" EnablePostBack="true" runat="server">
|
||||
</f:Button>
|
||||
<f:Button ID="btnQuery" OnClick="btnQuery_Click" ToolTip="查询" Icon="SystemSearch" EnablePostBack="true" runat="server">
|
||||
</f:Button>
|
||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp" EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:DatePicker runat="server" Label="检查日期" ID="txtStartTime" EmptyText="开始日期" LabelAlign="Right" LabelWidth="80px" Width="190px">
|
||||
</f:DatePicker>
|
||||
<f:Label ID="Label5" runat="server" Text="至">
|
||||
</f:Label>
|
||||
<f:DatePicker runat="server" ID="txtEndTime" LabelAlign="Right" EmptyText="结束日期" Width="110px" AutoPostBack="true" OnTextChanged="TextBox_TextChanged">
|
||||
</f:DatePicker>
|
||||
<f:RadioButtonList runat="server" ID="rblState" Label="整改状态" LabelWidth="80px" Width="290px" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged">
|
||||
<f:RadioItem Value="" Text="全部" Selected="true" />
|
||||
<f:RadioItem Value="1" Text="整改中" />
|
||||
<f:RadioItem Value="0" Text="已闭环" />
|
||||
</f:RadioButtonList>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnNew" ToolTip="新增" Icon="Add" EnablePostBack="false" runat="server" Hidden="true">
|
||||
</f:Button>
|
||||
<f:Button ID="btnImport" ToolTip="导入" Icon="ApplicationGet" runat="server" OnClick="btnImport_Click" Hidden="true">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:TemplateField ColumnID="tfNumber" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
|
||||
EnableLock="true" Locked="False">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="160px" HeaderText="受检单位" ColumnID="UnitName" DataField="UnitName" SortField="UnitName" FieldType="String" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="220px" HeaderText="受检项目" ColumnID="ProjectName" DataField="ProjectName" SortField="ProjectName" FieldType="String" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="160px" HeaderText="项目所在地址" ColumnID="Address" DataField="Address" SortField="Address" FieldType="String" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="220px" HeaderText="问题描述" ColumnID="Description" DataField="Description" SortField="Description" FieldType="String" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="90px" HeaderText="单位类型" ColumnID="UnitType" DataField="UnitType" SortField="UnitType" FieldType="String" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="160px" HeaderText="机组名称" ColumnID="AssemblyName" DataField="AssemblyName" SortField="AssemblyName" FieldType="String" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:TemplateField ColumnID="tfState" Width="80px" HeaderText="状态" HeaderTextAlign="Center" TextAlign="Center"
|
||||
EnableLock="true" Locked="False">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbState" runat="server" Text='<%# ConvertStates(Eval("State")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="140px" HeaderText="检查人" ColumnID="CheckTeamUser" DataField="CheckTeamUser" SortField="CheckTeamUser" FieldType="String" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="110px" HeaderText="检查日期" ColumnID="CheckDate" DataField="CheckDate" SortField="CheckDate" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="110px" HeaderText="截止日期" ColumnID="LimitDate" DataField="LimitDate" SortField="LimitDate" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="140px" HeaderText="整改人" ColumnID="RectificationUserName" DataField="RectificationUserName" SortField="RectificationUserName" FieldType="String" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="110px" HeaderText="闭环时间" ColumnID="CloseTime" DataField="CloseTime" SortField="CloseTime" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="140px" HeaderText="项目经理" ColumnID="PMUserName" DataField="PMUserName" SortField="PMUserName" FieldType="String" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="140px" HeaderText="问题分类" ColumnID="ClassifyName" DataField="ClassifyName" SortField="ClassifyName" FieldType="String" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="200px" HeaderText="分类明细" ColumnID="ClassifyItemName" DataField="ClassifyItemName" SortField="ClassifyItemName" FieldType="String" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="140px" HeaderText="问题性质" ColumnID="NatureName" DataField="NatureName" SortField="NatureName" FieldType="String" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="260px" HeaderText="性质明细" ColumnID="NatureItemContent" DataField="NatureItemContent" SortField="NatureItemContent" FieldType="String" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
|
||||
<%--<f:TemplateField ColumnID="tfImageUrl1" Width="120px" HeaderText="整改前" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbImageUrl" runat="server" Text='<%# ConvertImageUrlByImage(Eval("CheckControlCode")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:TemplateField ColumnID="tfImageUrl2" Width="120px" HeaderText="整改后" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbImageUrl2" runat="server" Text='<%# ConvertImgUrlByImage(Eval("CheckControlCode")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>--%>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
</Listeners>
|
||||
<PageItems>
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||
</f:ToolbarSeparator>
|
||||
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
|
||||
</f:ToolbarText>
|
||||
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
|
||||
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
<f:ToolbarFill runat="server">
|
||||
</f:ToolbarFill>
|
||||
</PageItems>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="安全不符合项" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
|
||||
Width="1300px" Height="720px">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<Items>
|
||||
<f:MenuButton ID="btnMenuModify" EnablePostBack="true" runat="server" Hidden="true" Text="修改" Icon="Pencil"
|
||||
OnClick="btnMenuModify_Click">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuView" EnablePostBack="true" runat="server" Text="查看" Icon="ApplicationViewIcons"
|
||||
OnClick="btnMenuView_Click">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuDel" EnablePostBack="true" runat="server" Hidden="true" Icon="Delete" Text="删除" ConfirmText="确定删除当前数据?"
|
||||
OnClick="btnMenuDel_Click">
|
||||
</f:MenuButton>
|
||||
</Items>
|
||||
</f:Menu>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
var menuID = '<%= Menu1.ClientID %>';
|
||||
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onRowContextMenu(event, rowId) {
|
||||
F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,491 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
namespace FineUIPro.Web.Check.HSE
|
||||
{
|
||||
public partial class CheckProblem : PageBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 项目id
|
||||
/// </summary>
|
||||
public string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ProjectId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
#region 加载页面
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
|
||||
{
|
||||
this.ProjectId = Request.Params["projectId"];
|
||||
}
|
||||
//权限按钮方法
|
||||
GetButtonPower();
|
||||
InitDropDownList();
|
||||
|
||||
//Funs.FineUIPleaseSelect(this.dpState);
|
||||
btnNew.OnClientClick = Window1.GetShowReference("CheckProblemEdit.aspx") + "return false;";
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
|
||||
// 绑定表格
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 初始化下拉框
|
||||
/// </summary>
|
||||
private void InitDropDownList()
|
||||
{
|
||||
////受检单位
|
||||
//UnitService.InitBranchUnitDropDownList(this.drpUnit, true);
|
||||
////受检项目
|
||||
//ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
//问题分类
|
||||
SafetyProblemClassifyService.InitClassifyDropDownList(this.drpClassify, true);
|
||||
//问题性质
|
||||
SafetyProblemNatureService.InitNatureDropDownList(this.drpNature, true);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 查询
|
||||
|
||||
/// <summary>
|
||||
/// 查询
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void TextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
|
||||
public void BindGrid()
|
||||
{
|
||||
DataTable tb = ChecklistData();
|
||||
|
||||
// 2.获取当前分页数据
|
||||
//var table = this.GetPagedDataTable(Grid1, tb1);
|
||||
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
|
||||
for (int i = 0; i < Grid1.Rows.Count; i++)
|
||||
{
|
||||
var state = table.Rows[i]["State"].ToString().Trim();
|
||||
var limitDate = table.Rows[i]["LimitDate"].ToString();
|
||||
DateTime dtLimitDate = Convert.ToDateTime(limitDate);
|
||||
if (Grid1.Rows[i].DataKeys[0] != null && !string.IsNullOrWhiteSpace(state) && state == "1")
|
||||
{
|
||||
if (dtLimitDate.AddDays(1) < DateTime.Now) //延期未整改
|
||||
{
|
||||
Grid1.Rows[i].CellCssClasses[7] = "Red";
|
||||
}
|
||||
else//期内未整改
|
||||
{
|
||||
Grid1.Rows[i].CellCssClasses[7] = " Yellow ";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 数据加载
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected DataTable ChecklistData()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("SELECT spc.ClassifyName,spcItem.ClassifyItemName,spn.NatureName,spnItem.NatureItemContent,tba.* ");
|
||||
sb.Append("FROM CheckProblem_Safety AS tba WITH(NOLOCK) ");
|
||||
sb.Append("LEFT JOIN Base_SafetyProblemClassify AS spc ON spc.ClassifyId=tba.ClassifyId ");
|
||||
sb.Append("LEFT JOIN Base_SafetyProblemClassifyItem AS spcItem ON spcItem.ClassifyItemId=tba.ClassifyItemId ");
|
||||
sb.Append("LEFT JOIN Base_SafetyProblemNature AS spn ON spn.NatureId=tba.NatureId ");
|
||||
sb.Append("LEFT JOIN Base_SafetyProblemNatureItem AS spnItem ON spnItem.NatureItemId=tba.NatureItemId ");
|
||||
sb.Append("WHERE 1=1 ");
|
||||
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
//listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(this.txtSearch.Text.Trim()))
|
||||
{
|
||||
sb.Append("AND (tba.UnitName LIKE @SearchTxt OR tba.ProjectName LIKE @SearchTxt OR tba.Description LIKE @SearchTxt OR tba.CheckTeamUser LIKE @SearchTxt) ");
|
||||
listStr.Add(new SqlParameter("@SearchTxt", "%" + this.txtSearch.Text.Trim() + "%"));
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(this.drpClassify.SelectedValue) && this.drpClassify.SelectedValue != Const._Null)
|
||||
{
|
||||
sb.Append("AND tba.ClassifyId=@ClassifyId ");
|
||||
listStr.Add(new SqlParameter("@ClassifyId", this.drpClassify.SelectedValue));
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(this.drpNature.SelectedValue) && this.drpNature.SelectedValue != Const._Null)
|
||||
{
|
||||
sb.Append("AND tba.NatureId=@NatureId ");
|
||||
listStr.Add(new SqlParameter("@NatureId", this.drpNature.SelectedValue));
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(this.rblState.SelectedValue))
|
||||
{
|
||||
sb.Append("AND tba.State=@State ");
|
||||
listStr.Add(new SqlParameter("@State", this.rblState.SelectedValue));
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(this.rblUnitType.SelectedValue))
|
||||
{
|
||||
sb.Append("AND tba.UnitType=@UnitType ");
|
||||
listStr.Add(new SqlParameter("@UnitType", this.rblUnitType.SelectedValue));
|
||||
}
|
||||
string startDate = this.txtStartTime.Text.Trim();
|
||||
string endDate = this.txtEndTime.Text.Trim();
|
||||
if (!string.IsNullOrWhiteSpace(startDate))
|
||||
{
|
||||
sb.Append("AND tba.CheckDate >= @StartDate ");
|
||||
listStr.Add(new SqlParameter("@StartDate", startDate));
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(endDate))
|
||||
{
|
||||
sb.Append("AND tba.CheckDate <= @EndDate ");
|
||||
listStr.Add(new SqlParameter("@EndDate", $"{endDate} 23:59:59"));
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(sb.ToString(), parameter);
|
||||
return tb;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/***整改前、后照片***
|
||||
|
||||
protected string ConvertImageUrlByImage(object registrationId)
|
||||
{
|
||||
string url = string.Empty;
|
||||
if (registrationId != null)
|
||||
{
|
||||
IList<Model.AttachFile> sourlist = AttachFileService.GetBeforeFileList(registrationId.ToString(), BLL.Const.SafetyCheckProblemMenuId);
|
||||
|
||||
if (sourlist != null&& sourlist.Count>0)
|
||||
{
|
||||
string AttachUrl = "";
|
||||
foreach(var item in sourlist)
|
||||
{ if(!string.IsNullOrEmpty(item.AttachUrl)&& item.AttachUrl.ToLower().EndsWith(".jpg")|| item.AttachUrl.ToLower().EndsWith(".jpeg")|| item.AttachUrl.ToLower().EndsWith(".png"))
|
||||
AttachUrl += item.AttachUrl.TrimEnd(',')+",";
|
||||
}
|
||||
url = BLL.UploadAttachmentService.ShowImage(ConfigurationManager.AppSettings["CEMS_IMG_URL"], AttachUrl.TrimEnd(','));
|
||||
}
|
||||
}
|
||||
return url;
|
||||
}
|
||||
protected string ConvertImgUrlByImage(object registrationId)
|
||||
{
|
||||
string url = string.Empty;
|
||||
if (registrationId != null)
|
||||
{
|
||||
IList<Model.AttachFile> sourlist = AttachFileService.Getfilelist(registrationId.ToString()+"r", BLL.Const.SafetyCheckProblemMenuId);
|
||||
|
||||
if (sourlist != null && sourlist.Count > 0)
|
||||
{
|
||||
string AttachUrl = "";
|
||||
foreach (var item in sourlist)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(item.AttachUrl) && item.AttachUrl.ToLower().EndsWith(".jpg") || item.AttachUrl.ToLower().EndsWith(".jpeg") || item.AttachUrl.ToLower().EndsWith(".png"))
|
||||
AttachUrl += item.AttachUrl.TrimEnd(',') + ",";
|
||||
}
|
||||
url = BLL.UploadAttachmentService.ShowImage(ConfigurationManager.AppSettings["CEMS_IMG_URL"], AttachUrl.TrimEnd(','));
|
||||
}
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
******/
|
||||
|
||||
/// <summary>
|
||||
/// 检查问题状态
|
||||
/// </summary>
|
||||
/// <param name="obj"></param>
|
||||
/// <returns></returns>
|
||||
public string ConvertStates(Object obj)
|
||||
{
|
||||
string result = "整改中";
|
||||
string state = obj.ToString();
|
||||
if (state == "0")
|
||||
{
|
||||
result = "已闭环";
|
||||
}
|
||||
else
|
||||
{ //闭环
|
||||
result = "整改中";
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
#region 过滤表头、排序、分页、关闭窗口
|
||||
/// <summary>
|
||||
/// 过滤表头
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_FilterChange(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
Grid1.PageIndex = e.NewPageIndex;
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_Sort(object sender, GridSortEventArgs e)
|
||||
{
|
||||
//Grid1.SortDirection = e.SortDirection;
|
||||
//Grid1.SortField = e.SortField;
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页显示条数下拉框
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 关闭弹出窗
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 鼠标操作事件
|
||||
|
||||
/// <summary>
|
||||
/// Grid行双击事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
btnMenuModify_Click(null, null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 编辑按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuModify_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string checkId = Grid1.SelectedRowID;
|
||||
var model = CheckProblemSafetyService.GetCheckProblemById(checkId);
|
||||
if (model != null)
|
||||
{
|
||||
if (model.State == (int)CheckProblemSafetyService.StateInt.已闭环) //双击事件 已闭环
|
||||
{
|
||||
Alert.ShowInTop("当前隐患已闭环,无法编辑,请右键查看!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CheckProblemEdit.aspx?CheckId={0}", checkId), "编辑安全不符合项"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 右键删除
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuDel_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string checkId = Grid1.SelectedRowID;
|
||||
var model = CheckProblemSafetyService.GetCheckProblemById(checkId);
|
||||
if (model != null)
|
||||
{
|
||||
if (model.State == (int)CheckProblemSafetyService.StateInt.已闭环)//双击事件 已闭环
|
||||
{
|
||||
Alert.ShowInTop("当前隐患已闭环,无法删除!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
BLL.CheckProblemSafetyService.DeleteCheckProblemById(checkId);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, model.CheckId, model.CheckId, BLL.Const.SafetyCheckProblemMenuId, "删除HSE不符合记录");
|
||||
Grid1.DataBind();
|
||||
BindGrid();
|
||||
Alert.ShowInTop("删除数据成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 右击查看明细
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuView_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string checkId = Grid1.SelectedRowID;
|
||||
var model = CheckProblemSafetyService.GetCheckProblemById(checkId);
|
||||
if (model != null)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CheckProblemView.aspx?CheckId={0}", checkId), "查看安全不符合项"));
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 查询按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnQuery_Click(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
/// <summary>
|
||||
/// 条件重置
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnRset_Click(object sender, EventArgs e)
|
||||
{
|
||||
rblUnitType.SelectedIndex = 0;
|
||||
drpClassify.SelectedIndex = 0;
|
||||
drpNature.SelectedIndex = 0;
|
||||
rblState.SelectedIndex = 0;
|
||||
txtSearch.Text = "";
|
||||
txtStartTime.Text = "";
|
||||
txtEndTime.Text = "";
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取按钮权限
|
||||
/// <summary>
|
||||
/// 获取按钮权限
|
||||
/// </summary>
|
||||
/// <param name="button"></param>
|
||||
/// <returns></returns>
|
||||
private void GetButtonPower()
|
||||
{
|
||||
if (Request.Params["value"] == "0")
|
||||
{
|
||||
return;
|
||||
}
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.SafetyCheckProblemMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
{
|
||||
this.btnNew.Hidden = false;
|
||||
this.btnImport.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||
{
|
||||
this.btnMenuModify.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnDelete))
|
||||
{
|
||||
this.btnMenuDel.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 导入
|
||||
|
||||
/// <summary>
|
||||
/// 导入按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CheckProblemIn.aspx"), "导入安全不符合项"));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 导出
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 导出
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
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 = 100000;
|
||||
this.BindGrid();
|
||||
Response.Write(GetGridTableHtml(Grid1));
|
||||
Response.End();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,278 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.Check.HSE
|
||||
{
|
||||
|
||||
|
||||
public partial class CheckProblem
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// txtSearch 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtSearch;
|
||||
|
||||
/// <summary>
|
||||
/// rblUnitType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.RadioButtonList rblUnitType;
|
||||
|
||||
/// <summary>
|
||||
/// drpClassify 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpClassify;
|
||||
|
||||
/// <summary>
|
||||
/// drpNature 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpNature;
|
||||
|
||||
/// <summary>
|
||||
/// btnRset 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnRset;
|
||||
|
||||
/// <summary>
|
||||
/// btnQuery 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnQuery;
|
||||
|
||||
/// <summary>
|
||||
/// btnOut 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnOut;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// txtStartTime 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtStartTime;
|
||||
|
||||
/// <summary>
|
||||
/// Label5 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label Label5;
|
||||
|
||||
/// <summary>
|
||||
/// txtEndTime 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtEndTime;
|
||||
|
||||
/// <summary>
|
||||
/// rblState 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.RadioButtonList rblState;
|
||||
|
||||
/// <summary>
|
||||
/// btnNew 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
/// <summary>
|
||||
/// btnImport 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnImport;
|
||||
|
||||
/// <summary>
|
||||
/// lblNumber 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblNumber;
|
||||
|
||||
/// <summary>
|
||||
/// lbState 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lbState;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuModify 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuModify;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuView 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuView;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDel 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuDel;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,193 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CheckProblemEdit.aspx.cs" Inherits="FineUIPro.Web.Check.HSE.CheckProblemEdit" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>安全不符合项清单</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
<style type="text/css">
|
||||
.labcenter {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.f-grid-row .f-grid-cell-inner {
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.f-grid-row.red {
|
||||
background-color: #FF7575;
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.fontred {
|
||||
color: #FF7575;
|
||||
background-image: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true" BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpUnit" runat="server" Label="受检单位" EmptyText="请选择受检单位" OnSelectedIndexChanged="drpUnit_SelectedIndexChanged"
|
||||
AutoSelectFirstItem="false" EnableEdit="true" AutoPostBack="true" ShowRedStar="true" Required="true">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpProject" runat="server" Label="受检项目" EmptyText="请选择受检项目" OnSelectedIndexChanged="drpProject_SelectedIndexChanged"
|
||||
AutoSelectFirstItem="false" EnableEdit="true" AutoPostBack="true" ForceSelection="false">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:RadioButtonList runat="server" ID="rblUnitType" Label="单位类型" ShowRedStar="true" Required="true">
|
||||
<f:RadioItem Value="承包商" Text="承包商" Selected="true" />
|
||||
<f:RadioItem Value="项目部" Text="项目部" />
|
||||
</f:RadioButtonList>
|
||||
<f:TextBox ID="txtAddress" runat="server" Label="项目地址" EmptyText="请填写项目地址" LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtAssemblyName" runat="server" Label="机组名称" EmptyText="请填写机组名称" LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpClassify" runat="server" Label="问题分类" EmptyText="请选择问题分类" LabelAlign="Right" OnSelectedIndexChanged="drpClassify_SelectedIndexChanged"
|
||||
AutoSelectFirstItem="false" EnableEdit="true" AutoPostBack="true" ShowRedStar="true" Required="true">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpClassifyItem" Label="分类明细" runat="server" LabelAlign="Right" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpNature" runat="server" Label="问题性质" EmptyText="请选择问题性质" LabelAlign="Right" OnSelectedIndexChanged="drpNature_SelectedIndexChanged"
|
||||
AutoSelectFirstItem="false" EnableEdit="true" AutoPostBack="true" ShowRedStar="true" Required="true">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpNatureItem" Label="性质明细" runat="server" LabelAlign="Right" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtDescription" runat="server" Label="问题描述" EmptyText="请填写问题描述" MinLength="10" MaxLength="1000" ShowRedStar="true" Required="true">
|
||||
</f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<%--<f:DropDownList ID="drpCheckUser" Label="检查人" runat="server" LabelAlign="Right" EnableEdit="true" ShowRedStar="true" Required="true">
|
||||
</f:DropDownList>--%>
|
||||
<f:TextBox ID="txtCheckTeamUser" runat="server" Label="检查人" EmptyText="请填写检查组/检查人" LabelAlign="Right" ShowRedStar="true" Required="true" MaxLength="200">
|
||||
</f:TextBox>
|
||||
<f:DatePicker ID="txtCheckDate" Label="检查日期" runat="server" DateFormatString="yyyy-MM-dd" ShowRedStar="true" Required="true" LabelAlign="Right"
|
||||
EnableEdit="true">
|
||||
</f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpRectificationUser" Label="整改人" runat="server" LabelAlign="Right" EnableEdit="true" ShowRedStar="true" Required="true">
|
||||
</f:DropDownList>
|
||||
<f:DatePicker ID="txtLimitDate" Label="整改期限" runat="server" DateFormatString="yyyy-MM-dd" ShowRedStar="true" Required="true" LabelAlign="Right"
|
||||
EnableEdit="true">
|
||||
</f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpPMUser" Label="项目经理" runat="server" LabelAlign="Right" EnableEdit="true" ShowRedStar="true" Required="true">
|
||||
</f:DropDownList>
|
||||
<f:DatePicker ID="txtCloseTime" Label="闭环日期" runat="server" DateFormatString="yyyy-MM-dd" LabelAlign="Right"
|
||||
EnableEdit="true">
|
||||
</f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtCompileManName" runat="server" Label="创建人" LabelAlign="Right" Readonly="true">
|
||||
</f:TextBox>
|
||||
<f:DatePicker ID="txtCompileDate" Label="编制日期" runat="server" DateFormatString="yyyy-MM-dd" LabelAlign="Right" Readonly="true">
|
||||
</f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<%--<f:FormRow>
|
||||
<Items>
|
||||
<f:Panel ID="Panel1" ShowHeader="false" ShowBorder="false" Layout="Column" runat="server">
|
||||
<Items>
|
||||
<f:Label runat="server" Text="问题图片:" CssStyle="padding-left:25px" Width="110px" CssClass="marginr" ShowLabel="false"></f:Label>
|
||||
<f:Button ID="imgBtnFile" Text="问题图片" ToolTip="上传及查看" Icon="TableCell" runat="server"
|
||||
OnClick="imgBtnFile_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</Items>
|
||||
</f:FormRow>--%>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtRemark" runat="server" Label="备注" EmptyText="备注说明" MaxLength="500">
|
||||
</f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:Button ID="btnAttach" Text="附件" ToolTip="附件上传及查看" Icon="TableCell" runat="server" OnClick="btnAttach_Click" ValidateForms="SimpleForm1" MarginLeft="5px">
|
||||
</f:Button>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnSave" runat="server" OnClick="btnSave_Click" Icon="SystemSave" ValidateForms="SimpleForm1" ToolTip="保存" Text="保存">
|
||||
</f:Button>
|
||||
<%--<f:Button ID="btnSubmit" OnClick="btnSubmit_Click" Icon="SystemSaveNew" runat="server" ToolTip="提交" Text="提交" ValidateForms="SimpleForm1">
|
||||
</f:Button>--%>
|
||||
<%-- <f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" OnClick="btnClose_Click" runat="server" Icon="SystemClose">
|
||||
</f:Button>--%>
|
||||
<f:HiddenField ID="hdId" runat="server">
|
||||
</f:HiddenField>
|
||||
<f:HiddenField ID="hdAttachUrl" runat="server">
|
||||
</f:HiddenField>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
<f:Window ID="Window1" Title="编辑检查项明细" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true"
|
||||
Width="1100px" Height="520px">
|
||||
</f:Window>
|
||||
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" OnClose="WindowAtt_Close" runat="server" IsModal="true" Width="700px"
|
||||
Height="500px">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<f:MenuButton ID="btnMenuEdit" EnablePostBack="true"
|
||||
Icon="Pencil" runat="server" Text="">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuDelete" EnablePostBack="true"
|
||||
Icon="Delete" ConfirmText="确定删除当前数据?" ConfirmTarget="Parent" runat="server" Text="删除">
|
||||
</f:MenuButton>
|
||||
</f:Menu>
|
||||
</form>
|
||||
<%--<script>
|
||||
var menuID = '<%= Menu1.ClientID %>';
|
||||
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onRowContextMenu(event, rowId) {
|
||||
F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||
return false;
|
||||
}
|
||||
|
||||
function onGridDataLoad(event) {
|
||||
this.mergeColumns(['CheckItemType']);
|
||||
}
|
||||
</script>--%>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,387 @@
|
||||
using BLL;
|
||||
using Model;
|
||||
using System;
|
||||
|
||||
namespace FineUIPro.Web.Check.HSE
|
||||
{
|
||||
public partial class CheckProblemEdit : PageBase
|
||||
{
|
||||
#region 公共字段
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
public string CheckId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["CheckId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["CheckId"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 图片是否可以编辑 -1查看 0编辑
|
||||
/// </summary>
|
||||
public int QuestionImg
|
||||
{
|
||||
get
|
||||
{
|
||||
return Convert.ToInt32(ViewState["QuestionImg"]);
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["QuestionImg"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 页面初始化加载
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
CheckId = Request.Params["CheckId"];
|
||||
this.InitDropDownList();
|
||||
|
||||
var model = CheckProblemSafetyService.GetCheckProblemById(this.CheckId);
|
||||
if (model != null)
|
||||
{
|
||||
this.drpUnit.SelectedValue = model.UnitId;
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, model.UnitId, true);
|
||||
if (!string.IsNullOrWhiteSpace(model.ProjectId))
|
||||
{
|
||||
this.drpProject.SelectedValue = model.ProjectId;
|
||||
}
|
||||
else if (!string.IsNullOrWhiteSpace(model.ProjectName))
|
||||
{
|
||||
this.drpProject.Text = model.ProjectName;
|
||||
}
|
||||
this.drpClassify.SelectedValue = model.ClassifyId;
|
||||
BLL.SafetyProblemClassifyItemService.InitClassifyItemDownList(this.drpClassifyItem, model.ClassifyId, true);
|
||||
if (!string.IsNullOrWhiteSpace(model.ClassifyItemId))
|
||||
{
|
||||
this.drpClassifyItem.SelectedValue = model.ClassifyItemId;
|
||||
}
|
||||
this.drpNature.SelectedValue = model.NatureId;
|
||||
BLL.SafetyProblemNatureItemService.InitNatureItemDownList(this.drpNatureItem, model.NatureId, true);
|
||||
if (!string.IsNullOrWhiteSpace(model.NatureItemId))
|
||||
{
|
||||
this.drpNatureItem.SelectedValue = model.NatureItemId;
|
||||
}
|
||||
this.txtAddress.Text = model.Address;
|
||||
this.rblUnitType.SelectedValue = model.UnitType;
|
||||
this.txtAssemblyName.Text = model.AssemblyName;
|
||||
this.txtDescription.Text = model.Description;
|
||||
this.txtRemark.Text = model.Remark;
|
||||
this.txtCheckTeamUser.Text = model.CheckTeamUser;
|
||||
//if (!string.IsNullOrWhiteSpace(model.CheckUserId))
|
||||
//{
|
||||
// this.drpCheckUser.SelectedValue = model.CheckUserId;
|
||||
//}
|
||||
if (!string.IsNullOrWhiteSpace(model.RectificationUserId))
|
||||
{
|
||||
this.drpRectificationUser.SelectedValue = model.RectificationUserId;
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(model.PMUserId))
|
||||
{
|
||||
this.drpPMUser.SelectedValue = model.PMUserId;
|
||||
}
|
||||
this.txtCompileManName.Text = model.CompileManName;
|
||||
if (model.CheckDate != null)
|
||||
{
|
||||
this.txtCheckDate.Text = string.Format("{0:yyyy-MM-dd}", model.CheckDate);
|
||||
}
|
||||
if (model.LimitDate != null)
|
||||
{
|
||||
this.txtLimitDate.Text = string.Format("{0:yyyy-MM-dd}", model.LimitDate);
|
||||
}
|
||||
if (model.CloseTime != null)
|
||||
{
|
||||
this.txtCloseTime.Text = string.Format("{0:yyyy-MM-dd}", model.CloseTime);
|
||||
}
|
||||
if (model.CompileDate != null)
|
||||
{
|
||||
this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", model.CompileDate);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.txtCompileManName.Text = this.CurrUser.UserName;
|
||||
this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region 下拉数据加载
|
||||
|
||||
/// <summary>
|
||||
/// 初始化下拉框
|
||||
/// </summary>
|
||||
private void InitDropDownList()
|
||||
{
|
||||
//受检单位
|
||||
UnitService.InitBranchUnitDropDownList(this.drpUnit, false);
|
||||
//受检项目
|
||||
ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
//问题分类
|
||||
SafetyProblemClassifyService.InitClassifyDropDownList(this.drpClassify, false);
|
||||
//问题性质
|
||||
SafetyProblemNatureService.InitNatureDropDownList(this.drpNature, false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 受检单位下拉触发事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpUnit_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
//this.drpProject.Items.Clear();
|
||||
////受检项目
|
||||
//BLL.ProjectService.InitProjectDropDownList(this.drpProject, this.drpUnit.SelectedValue, true);
|
||||
|
||||
this.drpRectificationUser.Items.Clear();
|
||||
BLL.UserService.InitUserUnitIdDropDownList(this.drpRectificationUser, this.drpUnit.SelectedValue, true);
|
||||
this.drpPMUser.Items.Clear();
|
||||
BLL.UserService.InitUserUnitIdDropDownList(this.drpPMUser, this.drpUnit.SelectedValue, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 受检项目下拉触发事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpProject_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
string proId = this.drpProject.SelectedValue;
|
||||
if (!string.IsNullOrWhiteSpace(proId) && proId != Const._Null)
|
||||
{
|
||||
var pro = BLL.ProjectService.GetProjectByProjectId(proId);
|
||||
if (pro != null)
|
||||
{
|
||||
this.txtAddress.Text = pro.ProjectAddress;
|
||||
this.drpPMUser.Items.Clear();
|
||||
BLL.UserService.InitUserDropDownList(this.drpPMUser, proId, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 问题分类下拉触发事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpClassify_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(this.drpClassify.SelectedValue))
|
||||
{
|
||||
this.drpClassifyItem.Items.Clear();
|
||||
BLL.SafetyProblemClassifyItemService.InitClassifyItemDownList(this.drpClassifyItem, this.drpClassify.SelectedValue, true);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 问题性质下拉触发事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpNature_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(this.drpNature.SelectedValue))
|
||||
{
|
||||
this.drpNatureItem.Items.Clear();
|
||||
BLL.SafetyProblemNatureItemService.InitNatureItemDownList(this.drpNatureItem, this.drpNature.SelectedValue, true);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 附件上传
|
||||
/// <summary>
|
||||
/// 上传附件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAttach_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/CheckProblemSafety&menuId={1}", this.CheckId, BLL.Const.SafetyCheckProblemMenuId)));
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
//protected void imgBtnFile_Click(object sender, EventArgs e)
|
||||
//{
|
||||
// PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type={0}&toKeyId={1}&path=FileUpload/CheckProblemSafety&menuId={2}", QuestionImg, this.hdCheckControlCode.Text, BLL.Const.SafetyCheckProblemMenuId)));
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 保存
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
//if (this.drpUnit.SelectedValue == BLL.Const._Null)
|
||||
//{
|
||||
// Alert.ShowInTop("请选择受检单位!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
//if (string.IsNullOrWhiteSpace(this.drpClassify.SelectedValue) || this.drpClassify.SelectedValue == BLL.Const._Null)
|
||||
//{
|
||||
// Alert.ShowInTop("请选择问题分类!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
//if (string.IsNullOrWhiteSpace(this.drpNature.SelectedValue) || this.drpNature.SelectedValue == BLL.Const._Null)
|
||||
//{
|
||||
// Alert.ShowInTop("请选择问题性质!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
//if (string.IsNullOrWhiteSpace(this.txtDescription.Text.Trim()))
|
||||
//{
|
||||
// Alert.ShowInTop("请填写问题描述!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
//if (string.IsNullOrWhiteSpace(this.txtCheckTeamUser.Text.Trim()))
|
||||
//{
|
||||
// Alert.ShowInTop("请填写检查组/检查人!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
//if (string.IsNullOrWhiteSpace(this.drpRectificationUser.SelectedValue) || this.drpRectificationUser.SelectedValue == BLL.Const._Null)
|
||||
//{
|
||||
// Alert.ShowInTop("请选择整改人!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
//if (string.IsNullOrWhiteSpace(this.drpPMUser.SelectedValue) || this.drpPMUser.SelectedValue == BLL.Const._Null)
|
||||
//{
|
||||
// Alert.ShowInTop("请选择项目经理!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
//if (string.IsNullOrWhiteSpace(this.txtCheckDate.Text.Trim()))
|
||||
//{
|
||||
// Alert.ShowInTop("请选择检查日期!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
//if (string.IsNullOrWhiteSpace(this.txtLimitDate.Text.Trim()))
|
||||
//{
|
||||
// Alert.ShowInTop("请选择整改期限!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
SaveData();
|
||||
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
|
||||
///// <summary>
|
||||
///// 提交
|
||||
///// </summary>
|
||||
///// <param name="sender"></param>
|
||||
///// <param name="e"></param>
|
||||
//protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
//{
|
||||
// if (BLL.CommonService.GetAllButtonPowerList(CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.SafetyCheckProblemMenuId, BLL.Const.BtnSubmit))
|
||||
// {
|
||||
|
||||
// if (string.IsNullOrEmpty(Request.Params["Main"]))
|
||||
// {
|
||||
// PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// PageContext.RegisterStartupScript(String.Format("window.close();"));
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
// }
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 保存数据
|
||||
/// </summary>
|
||||
protected void SaveData()
|
||||
{
|
||||
CheckProblem_Safety model = new CheckProblem_Safety();
|
||||
model.UnitId = this.drpUnit.SelectedValue;
|
||||
model.UnitName = this.drpUnit.SelectedText;
|
||||
string proId = this.drpProject.SelectedValue;
|
||||
if (!string.IsNullOrWhiteSpace(proId) && proId != Const._Null)
|
||||
{
|
||||
model.ProjectId = this.drpProject.SelectedValue;
|
||||
model.ProjectName = this.drpProject.SelectedText;
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// model.ProjectName = this.drpUnit.SelectedText;
|
||||
//}
|
||||
model.Address = this.txtAddress.Text.Trim();
|
||||
model.Description = this.txtDescription.Text.Trim();
|
||||
model.UnitType = this.rblUnitType.SelectedValue;
|
||||
model.AssemblyName = this.txtAssemblyName.Text.Trim();
|
||||
model.CheckTeamUser = this.txtCheckTeamUser.Text.Trim();
|
||||
model.CheckDate = Funs.GetNewDateTimeOrNow(this.txtCheckDate.Text.Trim());
|
||||
model.LimitDate = Funs.GetNewDateTime(this.txtLimitDate.Text.Trim());
|
||||
if (!string.IsNullOrWhiteSpace(this.txtCloseTime.Text.Trim()))
|
||||
{
|
||||
model.CloseTime = Funs.GetNewDateTime(this.txtCloseTime.Text.Trim());
|
||||
model.State = (int)CheckProblemSafetyService.StateInt.已闭环;
|
||||
}
|
||||
else
|
||||
{
|
||||
model.State = (int)CheckProblemSafetyService.StateInt.整改中;
|
||||
}
|
||||
model.RectificationUserId = this.drpRectificationUser.SelectedValue;
|
||||
model.RectificationUserName = this.drpRectificationUser.SelectedText;
|
||||
model.PMUserId = this.drpPMUser.SelectedValue;
|
||||
model.PMUserName = this.drpPMUser.SelectedText;
|
||||
model.ClassifyId = this.drpClassify.SelectedValue;
|
||||
string classifyItemId = this.drpClassifyItem.SelectedValue;
|
||||
if (!string.IsNullOrWhiteSpace(classifyItemId) && classifyItemId != Const._Null)
|
||||
{
|
||||
model.ClassifyItemId = classifyItemId;
|
||||
}
|
||||
model.NatureId = this.drpNature.SelectedValue;
|
||||
string natureItemId = this.drpNatureItem.SelectedValue;
|
||||
if (!string.IsNullOrWhiteSpace(natureItemId) && natureItemId != Const._Null)
|
||||
{
|
||||
model.NatureItemId = natureItemId;
|
||||
}
|
||||
model.Remark = this.txtRemark.Text.Trim();
|
||||
if (string.IsNullOrWhiteSpace(this.CheckId))
|
||||
{
|
||||
//新增
|
||||
model.CheckId = SQLHelper.GetNewID(typeof(CheckProblem_Safety));
|
||||
this.CheckId = model.CheckId;
|
||||
model.CompileMan = this.CurrUser.UserId;
|
||||
model.CompileManName = this.CurrUser.UserName;
|
||||
model.CompileDate = DateTime.Now;
|
||||
BLL.CheckProblemSafetyService.AddCheckProblem(model);
|
||||
|
||||
////增加一条编码记录
|
||||
//BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(BLL.Const.SafetyCheckProblemMenuId, model.ProjectId, null, model.CheckId, model.CheckDate);
|
||||
}
|
||||
else
|
||||
{
|
||||
//更新
|
||||
model.CheckId = this.CheckId;
|
||||
BLL.CheckProblemSafetyService.UpdateCheckProblem(model);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void WindowAtt_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,314 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.Check.HSE
|
||||
{
|
||||
|
||||
|
||||
public partial class CheckProblemEdit
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// drpUnit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUnit;
|
||||
|
||||
/// <summary>
|
||||
/// drpProject 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpProject;
|
||||
|
||||
/// <summary>
|
||||
/// rblUnitType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.RadioButtonList rblUnitType;
|
||||
|
||||
/// <summary>
|
||||
/// txtAddress 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtAddress;
|
||||
|
||||
/// <summary>
|
||||
/// txtAssemblyName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtAssemblyName;
|
||||
|
||||
/// <summary>
|
||||
/// drpClassify 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpClassify;
|
||||
|
||||
/// <summary>
|
||||
/// drpClassifyItem 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpClassifyItem;
|
||||
|
||||
/// <summary>
|
||||
/// drpNature 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpNature;
|
||||
|
||||
/// <summary>
|
||||
/// drpNatureItem 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpNatureItem;
|
||||
|
||||
/// <summary>
|
||||
/// txtDescription 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtDescription;
|
||||
|
||||
/// <summary>
|
||||
/// txtCheckTeamUser 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCheckTeamUser;
|
||||
|
||||
/// <summary>
|
||||
/// txtCheckDate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtCheckDate;
|
||||
|
||||
/// <summary>
|
||||
/// drpRectificationUser 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpRectificationUser;
|
||||
|
||||
/// <summary>
|
||||
/// txtLimitDate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtLimitDate;
|
||||
|
||||
/// <summary>
|
||||
/// drpPMUser 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpPMUser;
|
||||
|
||||
/// <summary>
|
||||
/// txtCloseTime 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtCloseTime;
|
||||
|
||||
/// <summary>
|
||||
/// txtCompileManName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCompileManName;
|
||||
|
||||
/// <summary>
|
||||
/// txtCompileDate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtCompileDate;
|
||||
|
||||
/// <summary>
|
||||
/// txtRemark 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtRemark;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// btnAttach 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAttach;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// hdId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdId;
|
||||
|
||||
/// <summary>
|
||||
/// hdAttachUrl 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdAttachUrl;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window WindowAtt;
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuEdit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuEdit;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDelete 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuDelete;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
<%@ Page Language="C#" CodeBehind="CheckProblemIn.aspx.cs" Inherits="FineUIPro.Web.Check.HSE.CheckProblemIn" %>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<script runat="server">
|
||||
|
||||
</script>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>导入</title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" OnCustomEvent="PageManager1_CustomEvent" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:HiddenField ID="hdFileName" runat="server">
|
||||
</f:HiddenField>
|
||||
<f:Button ID="btnAudit" Icon="ApplicationEdit" runat="server" ToolTip="审核" ValidateForms="SimpleForm1" Text="审核"
|
||||
OnClick="btnAudit_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnImport" Icon="ApplicationGet" runat="server" ToolTip="导入" ValidateForms="SimpleForm1" Text="导入"
|
||||
OnClick="btnImport_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnDownLoad" runat="server" Icon="ApplicationGo" ToolTip="下载模板" OnClick="btnDownLoad_Click" Text="下载模板">
|
||||
</f:Button>
|
||||
<f:HiddenField ID="hdCheckResult" runat="server">
|
||||
</f:HiddenField>
|
||||
<%-- <f:HiddenField ID="hdCheckResult" runat="server" Text="1">
|
||||
</f:HiddenField>--%>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:FileUpload runat="server" ID="fuAttachUrl" EmptyText="选择要导入的文件" Label="选择要导入的文件"
|
||||
LabelWidth="150px">
|
||||
</f:FileUpload>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Grid ID="gvErrorInfo" ShowBorder="true" EnableAjax="false" ShowHeader="false" Title="危害因素清单" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" AllowCellEditing="true" ClicksToEdit="2" AllowSorting="true"
|
||||
SortDirection="DESC" EnableColumnLines="true" ForceFit="true" AllowPaging="true" IsDatabasePaging="true" PageSize="10"
|
||||
EnableRowDoubleClickEvent="true" AllowFilters="true" EnableTextSelection="True">
|
||||
<Columns>
|
||||
<f:TemplateField ColumnID="tfPageIndex" Width="40px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
|
||||
EnableLock="true" Locked="False">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblPageIndex" runat="server" Text='<%# gvErrorInfo.PageIndex * gvErrorInfo.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:BoundField DataField="Row" HeaderText="错误行号" Width="50px">
|
||||
</f:BoundField>
|
||||
<f:BoundField DataField="Column" HeaderText="错误列" Width="100px">
|
||||
</f:BoundField>
|
||||
<f:BoundField DataField="Reason" HeaderText="错误类型" MinWidth="220px">
|
||||
</f:BoundField>
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,716 @@
|
||||
using BLL;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.Check.HSE
|
||||
{
|
||||
public partial class CheckProblemIn : PageBase
|
||||
{
|
||||
#region 定义变量
|
||||
|
||||
/// <summary>
|
||||
/// 上传预设的虚拟路径
|
||||
/// </summary>
|
||||
private string initPath = Const.ExcelUrl;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 错误集合
|
||||
/// </summary>
|
||||
public static List<Model.ErrorInfo> errorInfos = new List<Model.ErrorInfo>();
|
||||
/// <summary>
|
||||
/// 问题分类
|
||||
/// </summary>
|
||||
public static List<Model.Base_SafetyProblemClassify> classifys = new List<Model.Base_SafetyProblemClassify>();
|
||||
/// <summary>
|
||||
/// 问题分类明细
|
||||
/// </summary>
|
||||
public static List<Model.Base_SafetyProblemClassifyItem> classifyItems = new List<Model.Base_SafetyProblemClassifyItem>();
|
||||
/// <summary>
|
||||
/// 问题性质
|
||||
/// </summary>
|
||||
public static List<Model.Base_SafetyProblemNature> natures = new List<Model.Base_SafetyProblemNature>();
|
||||
/// <summary>
|
||||
/// 问题性质明细
|
||||
/// </summary>
|
||||
public static List<Model.Base_SafetyProblemNatureItem> natureItems = new List<Model.Base_SafetyProblemNatureItem>();
|
||||
|
||||
///// <summary>
|
||||
///// 项目id
|
||||
///// </summary>
|
||||
//public string ProjectId
|
||||
//{
|
||||
// get
|
||||
// {
|
||||
// return (string)ViewState["ProjectId"];
|
||||
// }
|
||||
// set
|
||||
// {
|
||||
// ViewState["ProjectId"] = value;
|
||||
// }
|
||||
//}
|
||||
///// <summary>
|
||||
///// 单位id
|
||||
///// </summary>
|
||||
//public string UnitId
|
||||
//{
|
||||
// get
|
||||
// {
|
||||
// return (string)ViewState["UnitId"];
|
||||
// }
|
||||
// set
|
||||
// {
|
||||
// ViewState["UnitId"] = value;
|
||||
// }
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 操作人
|
||||
/// </summary>
|
||||
public string CompileMan
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["CompileMan"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["CompileMan"] = value;
|
||||
}
|
||||
}
|
||||
public string CompileManName
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["CompileManName"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["CompileManName"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 导入表格列数
|
||||
/// </summary>
|
||||
public static int Cols = 17;
|
||||
|
||||
/// <summary>
|
||||
/// 单位类型
|
||||
/// </summary>
|
||||
public static List<string> validUnitTypeStrings = new List<string> { "承包商", "项目部" };
|
||||
/// <summary>
|
||||
/// 在岗用户
|
||||
/// </summary>
|
||||
public static List<Sys_User> users = new List<Sys_User>();
|
||||
|
||||
#endregion
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
//users = BLL.ProjectUserService.GetProjectUserByProjectId(this.ProjectId,null,null);
|
||||
//获取所有在岗用户
|
||||
users = BLL.UserService.GetProjectUserListByProjectId(null);
|
||||
|
||||
classifys = SafetyProblemClassifyService.GetClassify();
|
||||
classifyItems = SafetyProblemClassifyItemService.GetClassifyItemList("");
|
||||
natures = SafetyProblemNatureService.GetNature();
|
||||
natureItems = SafetyProblemNatureItemService.GetNatureItemList("");
|
||||
|
||||
this.CompileMan = this.CurrUser.UserId;
|
||||
this.CompileManName = this.CurrUser.UserName;
|
||||
this.hdFileName.Text = string.Empty;
|
||||
if (errorInfos != null)
|
||||
{
|
||||
errorInfos.Clear();
|
||||
}
|
||||
|
||||
//if (this.CurrUser.UserId == Const.AdminId)
|
||||
//{
|
||||
// this.btnFastImport.Hidden = false;
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
#region 下载模板
|
||||
|
||||
/// <summary>
|
||||
/// 下载模板按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnDownLoad_Click(object sender, EventArgs e)
|
||||
{
|
||||
//这里要注意了,如果传过来的没有记录
|
||||
PageContext.RegisterStartupScript(Confirm.GetShowReference("确定下载导入模板吗?", String.Empty,
|
||||
MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"),
|
||||
PageManager1.GetCustomEventReference("Confirm_Cancel")));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 下载导入模板
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void PageManager1_CustomEvent(object sender, CustomEventArgs e)
|
||||
{
|
||||
if (e.EventArgument == "Confirm_OK")
|
||||
{
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string uploadfilepath = rootPath + Const.CheckProblemSafetyDataInTemplateUrl;
|
||||
string filePath = Const.CheckProblemSafetyDataInTemplateUrl;
|
||||
string fileName = Path.GetFileName(filePath);
|
||||
FileInfo info = new FileInfo(uploadfilepath);
|
||||
long fileSize = info.Length;
|
||||
Response.ClearContent();
|
||||
Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
|
||||
Response.ContentType = "excel/plain";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
Response.AddHeader("Content-Length", fileSize.ToString().Trim());
|
||||
Response.TransmitFile(uploadfilepath, 0, fileSize);
|
||||
Response.End();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 审核
|
||||
/// <summary>
|
||||
/// 审核
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAudit_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (this.fuAttachUrl.HasFile == false)
|
||||
{
|
||||
ShowNotify("请您选择Excel文件!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower();
|
||||
if (IsXls != ".xls" && IsXls != ".xlsx")
|
||||
{
|
||||
ShowNotify("只可以选择Excel文件!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (errorInfos != null)
|
||||
{
|
||||
errorInfos.Clear();
|
||||
}
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string initFullPath = rootPath + initPath;
|
||||
if (!Directory.Exists(initFullPath))
|
||||
{
|
||||
Directory.CreateDirectory(initFullPath);
|
||||
}
|
||||
|
||||
this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls;
|
||||
string filePath = initFullPath + this.hdFileName.Text;
|
||||
this.fuAttachUrl.PostedFile.SaveAs(filePath);
|
||||
AuditExcelAndShowResult(filePath);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowNotify("'" + ex.Message + "'", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 审核Excel并展示校验结果
|
||||
/// </summary>
|
||||
private void AuditExcelAndShowResult(string fileName)
|
||||
{
|
||||
try
|
||||
{
|
||||
string msg = string.Empty;
|
||||
var dt = BLL.Common.NPOIHelper.ExcelToDataSet(fileName, out msg, true);
|
||||
if (dt != null)
|
||||
{
|
||||
//string rootPath = Server.MapPath("~/");
|
||||
//var localPath = ConfigurationManager.AppSettings["localRoot"];
|
||||
//imgDic = NPOIHelper.ExtractDispimgImagesFromXml(rootPath + initPath + this.hdFileName.Text, localPath + "FileUpload/CheckSpecial");
|
||||
ValidateExcelData(dt.Tables[0], false);
|
||||
hdCheckResult.Text = "1";
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
BLL.ErrLogInfo.WriteLog("", exc);
|
||||
Response.Write(exc);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 校验Excel数据(仅校验)
|
||||
/// </summary>
|
||||
/// <param name="pds"></param>
|
||||
/// <param name="import">true:导入;false:审核</param>
|
||||
/// <returns></returns>
|
||||
private bool ValidateExcelData(DataTable pds, bool import)
|
||||
{
|
||||
int ic = pds.Columns.Count;
|
||||
if (ic < Cols)
|
||||
{
|
||||
ShowNotify($"导入Excel格式错误!Excel只有{ic}列", MessageBoxIcon.Warning);
|
||||
return false;
|
||||
}
|
||||
int ir = pds.Rows.Count;
|
||||
if (pds == null || ir <= 0)
|
||||
{
|
||||
ShowNotify("导入数据为空!", MessageBoxIcon.Warning);
|
||||
return false;
|
||||
}
|
||||
var errors = new List<ErrorInfo>();
|
||||
for (int i = 0; i < ir; i++)
|
||||
{
|
||||
var (error, _) = ValidateRowAndBuildEntity(pds.Rows[i], (i + 2).ToString(), import);
|
||||
if (error.Any()) { errors.AddRange(error); }
|
||||
}
|
||||
errorInfos.Clear();
|
||||
errorInfos.AddRange(errors);
|
||||
this.gvErrorInfo.DataSource = errorInfos;
|
||||
this.gvErrorInfo.DataBind();
|
||||
if (errors.Count > 0)
|
||||
{
|
||||
ShowNotify("存在校验错误,请查看错误列表并修正后再次导入。", MessageBoxIcon.Warning);
|
||||
return false;
|
||||
}
|
||||
ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 校验单行并生成实体(字段顺序与新模板一致)
|
||||
/// </summary>
|
||||
private (List<ErrorInfo> lstError, Model.CheckProblem_Safety entity) ValidateRowAndBuildEntity(DataRow row, string displayRow, bool import)
|
||||
{
|
||||
List<ErrorInfo> lstError = new List<ErrorInfo>();
|
||||
// 新模板字段顺序
|
||||
string rData0 = row[0]?.ToString().Trim(); // 受检单位
|
||||
string rData1 = row[1]?.ToString().Trim(); // 受检项目
|
||||
string rData2 = row[2]?.ToString().Trim(); // 项目所在地(省市)
|
||||
string rData3 = row[3]?.ToString().Trim(); // 不符合项描述
|
||||
string rData4 = row[4]?.ToString().Trim(); // 单位类型
|
||||
string rData5 = row[5]?.ToString().Trim(); // 机组名称
|
||||
string rData6 = row[6]?.ToString().Trim(); // 提出人
|
||||
string rData7 = row[7]?.ToString().Trim(); // 提出日期
|
||||
string rData8 = row[8]?.ToString().Trim(); // 截止日期
|
||||
string rData9 = row[9]?.ToString().Trim(); // 整改人
|
||||
string rData10 = row[10]?.ToString().Trim(); // 闭合日期
|
||||
string rData11 = row[11]?.ToString().Trim(); // 项目经理
|
||||
string rData12 = row[12]?.ToString().Trim(); // 问题分类
|
||||
string rData13 = row[13]?.ToString().Trim(); // 分类明细
|
||||
string rData14 = row[14]?.ToString().Trim(); // 问题性质
|
||||
string rData15 = row[15]?.ToString().Trim(); // 性质明细
|
||||
string rData16 = row[16]?.ToString().Trim(); // 备注
|
||||
|
||||
|
||||
string UnitId = string.Empty;
|
||||
string UnitName = string.Empty;
|
||||
string ProjectId = null;
|
||||
string ProjectName = null;
|
||||
int State = 1;
|
||||
string Address = string.Empty;
|
||||
string Description = string.Empty;
|
||||
string UnitType = string.Empty;
|
||||
string AssemblyName = string.Empty;
|
||||
//string CheckUserId = string.Empty;
|
||||
//string CheckUserName = string.Empty;
|
||||
string CheckTeamUser = string.Empty;
|
||||
DateTime CheckDate = DateTime.Now;
|
||||
DateTime LimitDate = DateTime.Now;
|
||||
DateTime? CloseTime = null;
|
||||
string RectificationUserId = string.Empty;
|
||||
string RectificationUserName = string.Empty;
|
||||
string PMUserId = string.Empty;
|
||||
string PMUserName = string.Empty;
|
||||
string ClassifyId = string.Empty;
|
||||
string ClassifyItemId = string.Empty;
|
||||
string NatureId = string.Empty;
|
||||
string NatureItemId = string.Empty;
|
||||
string Remark = string.Empty;
|
||||
|
||||
// 校验并转换
|
||||
if (!string.IsNullOrWhiteSpace(rData0))
|
||||
{
|
||||
var unit = BLL.UnitService.getUnitByUnitName(rData0);
|
||||
if (unit != null)
|
||||
{
|
||||
UnitId = unit.UnitId;
|
||||
UnitName = unit.UnitName;
|
||||
}
|
||||
else
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "受检单位", Reason = $"未找到单位:{rData0};请确认单位名称是否有误!" });
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "受检单位", Reason = "受检单位必填" });
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(rData1))
|
||||
{
|
||||
var project = BLL.ProjectService.GetProjectByProjectName(rData1);
|
||||
if (project != null)
|
||||
{
|
||||
ProjectId = project.ProjectId;
|
||||
ProjectName = project.ProjectName;
|
||||
}
|
||||
else
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "受检项目", Reason = $"未找到项目:{rData1};请确认项目名称是否有误!" });
|
||||
}
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// lstError.Add(new ErrorInfo { Row = displayRow, Column = "受检项目", Reason = "受检项目必填" });
|
||||
//}
|
||||
|
||||
if (!string.IsNullOrEmpty(rData2))
|
||||
{
|
||||
Address = rData2;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(rData3))
|
||||
{
|
||||
Description = rData3;
|
||||
}
|
||||
else
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "不符合描述", Reason = "不符合描述必填!" });
|
||||
}
|
||||
if (!string.IsNullOrEmpty(rData4))
|
||||
{
|
||||
if (!validUnitTypeStrings.Any(x => x == rData4))
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "单位类型", Reason = "只能是[承包商/项目部]!" });
|
||||
}
|
||||
else
|
||||
{
|
||||
UnitType = rData4;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "单位类型", Reason = "单位类型必选!" });
|
||||
}
|
||||
if (!string.IsNullOrEmpty(rData5))
|
||||
{
|
||||
AssemblyName = rData5;
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// lstError.Add(new ErrorInfo { Row = displayRow, Column = "机组名称", Reason = "机组名称必填!" });
|
||||
//}
|
||||
|
||||
if (!string.IsNullOrEmpty(rData6))
|
||||
{
|
||||
CheckTeamUser = rData6;
|
||||
//var user = users.Where(x => x.UserName == rData6).FirstOrDefault();
|
||||
//if (user != null)
|
||||
//{
|
||||
// CheckUserId = user.UserId;
|
||||
// CheckUserName = rData6;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// lstError.Add(new ErrorInfo { Row = displayRow, Column = "提出人", Reason = $"系统不存在人员[{rData6}]!" });
|
||||
//}
|
||||
}
|
||||
else
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "提出人", Reason = "提出人必填!" });
|
||||
}
|
||||
if (!string.IsNullOrEmpty(rData7))
|
||||
{
|
||||
if (!DateTime.TryParse(rData7, out DateTime ct))
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "提出日期", Reason = "提出日期格式错误[正确格式:yyyy-MM-dd,2026-06-01]" });
|
||||
}
|
||||
else
|
||||
{
|
||||
CheckDate = ct;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "提出日期", Reason = "不能为空" });
|
||||
}
|
||||
if (!string.IsNullOrEmpty(rData8))
|
||||
{
|
||||
if (!DateTime.TryParse(rData8, out DateTime ct))
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "截止日期", Reason = "截止日期格式错误[正确格式:yyyy-MM-dd,2026-06-01]" });
|
||||
}
|
||||
else
|
||||
{
|
||||
LimitDate = ct;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "截止日期", Reason = "不能为空" });
|
||||
}
|
||||
if (!string.IsNullOrEmpty(rData9))
|
||||
{
|
||||
var user = users.Where(x => x.UserName == rData9).FirstOrDefault();
|
||||
if (user != null)
|
||||
{
|
||||
RectificationUserId = user.UserId;
|
||||
RectificationUserName = rData9;
|
||||
}
|
||||
else
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "整改人", Reason = $"系统不存在人员[{rData9}]!" });
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "整改人", Reason = "整改人必填!" });
|
||||
}
|
||||
if (!string.IsNullOrEmpty(rData10))
|
||||
{
|
||||
if (!DateTime.TryParse(rData10, out DateTime ct))
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "闭合日期", Reason = "闭合日期格式错误[正确格式:yyyy-MM-dd,2026-06-01]" });
|
||||
}
|
||||
else
|
||||
{
|
||||
CloseTime = ct;
|
||||
State = (int)CheckProblemSafetyService.StateInt.已闭环;
|
||||
}
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// lstError.Add(new ErrorInfo { Row = displayRow, Column = "闭合日期", Reason = "不能为空" });
|
||||
//}
|
||||
if (!string.IsNullOrEmpty(rData11))
|
||||
{
|
||||
var user = users.Where(x => x.UserName == rData11).FirstOrDefault();
|
||||
if (user != null)
|
||||
{
|
||||
PMUserId = user.UserId;
|
||||
PMUserName = rData11;
|
||||
}
|
||||
else
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "项目经理", Reason = $"系统不存在人员[{rData11}]!" });
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "项目经理", Reason = "项目经理必填!" });
|
||||
}
|
||||
if (!string.IsNullOrEmpty(rData12))
|
||||
{//问题分类
|
||||
var classify = classifys.Where(x => x.ClassifyName == rData12).FirstOrDefault();
|
||||
if (classify != null)
|
||||
{
|
||||
ClassifyId = classify.ClassifyId;
|
||||
if (!string.IsNullOrEmpty(rData13))
|
||||
{//问题分类明细
|
||||
var classifyItem = classifyItems.Where(x => x.ClassifyItemName == rData13).FirstOrDefault();
|
||||
if (classifyItem != null)
|
||||
{
|
||||
ClassifyItemId = classifyItem.ClassifyItemId;
|
||||
}
|
||||
else
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "问题分类明细", Reason = $"系统不存在问题分类明细[{rData13}],请检查名称是否正确!" });
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "问题分类", Reason = $"系统不存在问题分类[{rData12}],请检查名称是否正确!" });
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "问题分类", Reason = "问题分类必填!" });
|
||||
}
|
||||
if (!string.IsNullOrEmpty(rData14))
|
||||
{//问题性质
|
||||
var nature = natures.Where(x => x.NatureName == rData14).FirstOrDefault();
|
||||
if (nature != null)
|
||||
{
|
||||
NatureId = nature.NatureId;
|
||||
if (!string.IsNullOrEmpty(rData15))
|
||||
{//问题性质明细
|
||||
var natureItem = natureItems.Where(x => x.NatureItemContent == rData15).FirstOrDefault();
|
||||
if (natureItem != null)
|
||||
{
|
||||
NatureItemId = natureItem.NatureItemId;
|
||||
}
|
||||
else
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "问题性质明细", Reason = $"系统不存在问题性质明细[{rData15}],请检查名称是否正确!" });
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "问题性质", Reason = $"系统不存在问题性质[{rData14}],请检查名称是否正确!" });
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "问题性质", Reason = "问题性质必填!" });
|
||||
}
|
||||
if (!string.IsNullOrEmpty(rData16))
|
||||
{
|
||||
Remark = rData16;
|
||||
}
|
||||
// 其余字段可根据实际业务映射到实体
|
||||
var entity = new Model.CheckProblem_Safety
|
||||
{
|
||||
CheckId = SQLHelper.GetNewID(typeof(Model.CheckProblem_Safety)),
|
||||
CompileDate = DateTime.Now,
|
||||
CompileMan = this.CompileMan,
|
||||
CompileManName = this.CompileManName,
|
||||
UnitId = UnitId,
|
||||
UnitName = UnitName,
|
||||
ProjectId = ProjectId,
|
||||
ProjectName = ProjectName,
|
||||
State = State,//状态(0:已闭环,1:整改中)
|
||||
Address = Address,
|
||||
Description = Description,
|
||||
UnitType = UnitType,
|
||||
AssemblyName = AssemblyName,
|
||||
CheckTeamUser = CheckTeamUser,
|
||||
CheckDate = CheckDate,
|
||||
LimitDate = LimitDate,
|
||||
CloseTime = CloseTime,
|
||||
RectificationUserId = RectificationUserId,
|
||||
RectificationUserName = RectificationUserName,
|
||||
PMUserId = PMUserId,
|
||||
PMUserName = PMUserName,
|
||||
ClassifyId = ClassifyId,
|
||||
ClassifyItemId = ClassifyItemId,
|
||||
NatureId = NatureId,
|
||||
NatureItemId = NatureItemId,
|
||||
Remark = Remark
|
||||
};
|
||||
return (lstError, entity);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 导入
|
||||
|
||||
/// <summary>
|
||||
/// 导入
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (hdCheckResult.Text == "1")
|
||||
{
|
||||
if (errorInfos.Count <= 0)
|
||||
{
|
||||
string rootPath = Server.MapPath("~/");
|
||||
var localPath = ConfigurationManager.AppSettings["localRoot"];
|
||||
//imgDic = NPOIHelper.ExtractDispimgImagesFromXml(rootPath + initPath + this.hdFileName.Text, localPath + "FileUpload/CheckSpecial");
|
||||
ImportExcelToDatabase(rootPath + initPath + this.hdFileName.Text, true);
|
||||
|
||||
hdCheckResult.Text = string.Empty;
|
||||
ShowNotify("导入成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("请先将错误数据修正,再重新导入提交!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("请先审核要导入的文件!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 导入Excel到数据库
|
||||
/// </summary>
|
||||
private void ImportExcelToDatabase(string fileName, bool import)
|
||||
{
|
||||
try
|
||||
{
|
||||
string msg = string.Empty;
|
||||
var dt = BLL.Common.NPOIHelper.ExcelToDataSet(fileName, out msg, true);
|
||||
BLL.ErrLogInfo.WriteLog(msg);
|
||||
SaveExcelDataToDatabase(fileName, dt.Tables[0], import);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog("", ex);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 校验并保存数据到数据库
|
||||
/// </summary>
|
||||
private bool SaveExcelDataToDatabase(string fileName, DataTable pds, bool import)
|
||||
{
|
||||
int ic = pds.Columns.Count;
|
||||
if (ic < Cols)
|
||||
{
|
||||
ShowNotify($"导入Excel格式错误!Excel只有{ic}列", MessageBoxIcon.Warning);
|
||||
return false;
|
||||
}
|
||||
int ir = pds.Rows.Count;
|
||||
if (pds == null || ir <= 0)
|
||||
{
|
||||
ShowNotify("导入数据为空!", MessageBoxIcon.Warning);
|
||||
return false;
|
||||
}
|
||||
var errors = new List<ErrorInfo>();
|
||||
var toInsert = new List<Model.CheckProblem_Safety>();
|
||||
|
||||
for (int i = 0; i < ir; i++)
|
||||
{
|
||||
var (error, entity) = ValidateRowAndBuildEntity(pds.Rows[i], (i + 2).ToString(), import);
|
||||
if (error.Any())
|
||||
errors.AddRange(error);
|
||||
else
|
||||
toInsert.Add(entity);
|
||||
}
|
||||
if (errors.Count > 0)
|
||||
{
|
||||
errorInfos.Clear();
|
||||
errorInfos.AddRange(errors);
|
||||
this.gvErrorInfo.DataSource = errorInfos;
|
||||
this.gvErrorInfo.DataBind();
|
||||
ShowNotify("存在校验错误,请先审核并修正后再导入。", MessageBoxIcon.Warning);
|
||||
return false;
|
||||
}
|
||||
try
|
||||
{
|
||||
if (toInsert.Any())
|
||||
{
|
||||
Funs.DB.CheckProblem_Safety.InsertAllOnSubmit(toInsert);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
ShowNotify($"成功导入 {toInsert.Count} 条记录。", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog("导入 安全不符合项(CheckProblem_Safety) 失败", ex);
|
||||
ShowNotify("导入失败:" + ex.Message, MessageBoxIcon.Error);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion // 导入
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.Check.HSE
|
||||
{
|
||||
|
||||
|
||||
public partial class CheckProblemIn
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// hdFileName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdFileName;
|
||||
|
||||
/// <summary>
|
||||
/// btnAudit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAudit;
|
||||
|
||||
/// <summary>
|
||||
/// btnImport 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnImport;
|
||||
|
||||
/// <summary>
|
||||
/// btnDownLoad 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnDownLoad;
|
||||
|
||||
/// <summary>
|
||||
/// hdCheckResult 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdCheckResult;
|
||||
|
||||
/// <summary>
|
||||
/// fuAttachUrl 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.FileUpload fuAttachUrl;
|
||||
|
||||
/// <summary>
|
||||
/// gvErrorInfo 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid gvErrorInfo;
|
||||
|
||||
/// <summary>
|
||||
/// lblPageIndex 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblPageIndex;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,170 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CheckProblemView.aspx.cs" Inherits="FineUIPro.Web.Check.HSE.CheckProblemView" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>安全不符合项清单</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
<style type="text/css">
|
||||
.labcenter {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.f-grid-row .f-grid-cell-inner {
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.f-grid-row.red {
|
||||
background-color: #FF7575;
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.fontred {
|
||||
color: #FF7575;
|
||||
background-image: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true" BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtUnitName" runat="server" Label="受检单位" LabelAlign="Right" Readonly="true">
|
||||
</f:TextBox>
|
||||
<f:RadioButtonList runat="server" ID="rblUnitType" Label="单位类型" Readonly="true">
|
||||
<f:RadioItem Value="承包商" Text="承包商" />
|
||||
<f:RadioItem Value="项目部" Text="项目部" />
|
||||
</f:RadioButtonList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtProjectName" runat="server" Label="受检项目" LabelAlign="Right" Readonly="true">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtAddress" runat="server" Label="项目地址" LabelAlign="Right" Readonly="true">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtAssemblyName" runat="server" Label="机组名称" LabelAlign="Right" Readonly="true">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtClassifyName" runat="server" Label="问题分类" LabelAlign="Right" Readonly="true">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtNatureName" runat="server" Label="问题性质" LabelAlign="Right" Readonly="true">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtClassifyItemName" runat="server" Label="分类明细" LabelAlign="Right" Readonly="true">
|
||||
</f:TextArea>
|
||||
<f:TextArea ID="txtNatureItemContent" runat="server" Label="性质明细" LabelAlign="Right" Readonly="true">
|
||||
</f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtDescription" runat="server" Label="问题描述" Readonly="true">
|
||||
</f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtCheckTeamUser" runat="server" Label="检查人" LabelAlign="Right" Readonly="true">
|
||||
</f:TextBox>
|
||||
<f:DatePicker ID="txtCheckDate" Label="检查日期" runat="server" DateFormatString="yyyy-MM-dd" Readonly="true" LabelAlign="Right">
|
||||
</f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtRectificationUserName" runat="server" Label="整改人" LabelAlign="Right" Readonly="true">
|
||||
</f:TextBox>
|
||||
<f:DatePicker ID="txtLimitDate" Label="整改期限" runat="server" DateFormatString="yyyy-MM-dd" Readonly="true" LabelAlign="Right">
|
||||
</f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtPMUserName" runat="server" Label="项目经理" LabelAlign="Right" Readonly="true">
|
||||
</f:TextBox>
|
||||
<f:DatePicker ID="txtCloseTime" Label="闭环日期" runat="server" DateFormatString="yyyy-MM-dd" LabelAlign="Right" Readonly="true">
|
||||
</f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtCompileManName" runat="server" Label="创建人" LabelAlign="Right" Readonly="true">
|
||||
</f:TextBox>
|
||||
<f:DatePicker ID="txtCompileDate" Label="编制日期" runat="server" DateFormatString="yyyy-MM-dd" LabelAlign="Right" Readonly="true">
|
||||
</f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<%--<f:FormRow>
|
||||
<Items>
|
||||
<f:Panel ID="Panel1" ShowHeader="false" ShowBorder="false" Layout="Column" runat="server">
|
||||
<Items>
|
||||
<f:Label runat="server" Text="问题图片:" CssStyle="padding-left:25px" Width="110px" CssClass="marginr" ShowLabel="false"></f:Label>
|
||||
<f:Button ID="imgBtnFile" Text="问题图片" ToolTip="上传及查看" Icon="TableCell" runat="server"
|
||||
OnClick="imgBtnFile_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</Items>
|
||||
</f:FormRow>--%>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtRemark" runat="server" Label="备注" Readonly="true">
|
||||
</f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:Button ID="btnAttach" Text="附件" ToolTip="附件上传及查看" Icon="TableCell" runat="server" OnClick="btnAttach_Click" ValidateForms="SimpleForm1" MarginLeft="5px">
|
||||
</f:Button>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:HiddenField ID="hdId" runat="server">
|
||||
</f:HiddenField>
|
||||
<f:HiddenField ID="hdAttachUrl" runat="server">
|
||||
</f:HiddenField>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
<f:Window ID="Window1" Title="编辑检查项明细" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true"
|
||||
Width="1100px" Height="520px">
|
||||
</f:Window>
|
||||
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" OnClose="WindowAtt_Close" runat="server" IsModal="true" Width="700px"
|
||||
Height="500px">
|
||||
</f:Window>
|
||||
</form>
|
||||
<%--<script>
|
||||
var menuID = '<%= Menu1.ClientID %>';
|
||||
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onRowContextMenu(event, rowId) {
|
||||
F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||
return false;
|
||||
}
|
||||
|
||||
function onGridDataLoad(event) {
|
||||
this.mergeColumns(['CheckItemType']);
|
||||
}
|
||||
</script>--%>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,134 @@
|
||||
using BLL;
|
||||
using Model;
|
||||
using System;
|
||||
|
||||
namespace FineUIPro.Web.Check.HSE
|
||||
{
|
||||
public partial class CheckProblemView : PageBase
|
||||
{
|
||||
#region 公共字段
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
public string CheckId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["CheckId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["CheckId"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 图片是否可以编辑 -1查看 0编辑
|
||||
/// </summary>
|
||||
public int QuestionImg
|
||||
{
|
||||
get
|
||||
{
|
||||
return Convert.ToInt32(ViewState["QuestionImg"]);
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["QuestionImg"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 页面初始化加载
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
CheckId = Request.Params["CheckId"];
|
||||
|
||||
var model = CheckProblemSafetyService.GetCheckProblemById(this.CheckId);
|
||||
if (model != null)
|
||||
{
|
||||
this.txtUnitName.Text = model.UnitName;
|
||||
this.txtProjectName.Text = model.ProjectName;
|
||||
var classify = SafetyProblemClassifyService.GetClassifyById(model.ClassifyId);
|
||||
if (classify != null)
|
||||
{
|
||||
this.txtClassifyName.Text = classify.ClassifyName;
|
||||
}
|
||||
var classifyItem = SafetyProblemClassifyItemService.GetClassifyItemById(model.ClassifyItemId);
|
||||
if (classifyItem != null)
|
||||
{
|
||||
this.txtClassifyItemName.Text = classifyItem.ClassifyItemName;
|
||||
}
|
||||
var nature = SafetyProblemNatureService.GetNatureById(model.NatureId);
|
||||
if (nature != null)
|
||||
{
|
||||
this.txtNatureName.Text = nature.NatureName;
|
||||
}
|
||||
var natureItem = SafetyProblemNatureItemService.GetNatureItemById(model.NatureItemId);
|
||||
if (natureItem != null)
|
||||
{
|
||||
this.txtNatureItemContent.Text = natureItem.NatureItemContent;
|
||||
}
|
||||
this.txtAddress.Text = model.Address;
|
||||
this.rblUnitType.SelectedValue = model.UnitType;
|
||||
this.txtAssemblyName.Text = model.AssemblyName;
|
||||
this.txtDescription.Text = model.Description;
|
||||
this.txtRemark.Text = model.Remark;
|
||||
this.txtCheckTeamUser.Text = model.CheckTeamUser;
|
||||
this.txtRectificationUserName.Text = model.RectificationUserName;
|
||||
this.txtPMUserName.Text = model.PMUserName;
|
||||
this.txtCompileManName.Text = model.CompileManName;
|
||||
if (model.CheckDate != null)
|
||||
{
|
||||
this.txtCheckDate.Text = string.Format("{0:yyyy-MM-dd}", model.CheckDate);
|
||||
}
|
||||
if (model.LimitDate != null)
|
||||
{
|
||||
this.txtLimitDate.Text = string.Format("{0:yyyy-MM-dd}", model.LimitDate);
|
||||
}
|
||||
if (model.CloseTime != null)
|
||||
{
|
||||
this.txtCloseTime.Text = string.Format("{0:yyyy-MM-dd}", model.CloseTime);
|
||||
}
|
||||
if (model.CompileDate != null)
|
||||
{
|
||||
this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", model.CompileDate);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#region 附件上传
|
||||
/// <summary>
|
||||
/// 上传附件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAttach_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CheckProblemSafety&menuId={1}", this.CheckId, BLL.Const.SafetyCheckProblemMenuId)));
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
//protected void imgBtnFile_Click(object sender, EventArgs e)
|
||||
//{
|
||||
// PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={1}&path=FileUpload/CheckProblemSafety&menuId={2}", QuestionImg, this.hdCheckControlCode.Text, BLL.Const.SafetyCheckProblemMenuId)));
|
||||
//}
|
||||
|
||||
|
||||
|
||||
protected void WindowAtt_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,278 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.Check.HSE
|
||||
{
|
||||
|
||||
|
||||
public partial class CheckProblemView
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// txtUnitName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtUnitName;
|
||||
|
||||
/// <summary>
|
||||
/// rblUnitType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.RadioButtonList rblUnitType;
|
||||
|
||||
/// <summary>
|
||||
/// txtProjectName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtProjectName;
|
||||
|
||||
/// <summary>
|
||||
/// txtAddress 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtAddress;
|
||||
|
||||
/// <summary>
|
||||
/// txtAssemblyName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtAssemblyName;
|
||||
|
||||
/// <summary>
|
||||
/// txtClassifyName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtClassifyName;
|
||||
|
||||
/// <summary>
|
||||
/// txtNatureName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtNatureName;
|
||||
|
||||
/// <summary>
|
||||
/// txtClassifyItemName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtClassifyItemName;
|
||||
|
||||
/// <summary>
|
||||
/// txtNatureItemContent 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtNatureItemContent;
|
||||
|
||||
/// <summary>
|
||||
/// txtDescription 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtDescription;
|
||||
|
||||
/// <summary>
|
||||
/// txtCheckTeamUser 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCheckTeamUser;
|
||||
|
||||
/// <summary>
|
||||
/// txtCheckDate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtCheckDate;
|
||||
|
||||
/// <summary>
|
||||
/// txtRectificationUserName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtRectificationUserName;
|
||||
|
||||
/// <summary>
|
||||
/// txtLimitDate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtLimitDate;
|
||||
|
||||
/// <summary>
|
||||
/// txtPMUserName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtPMUserName;
|
||||
|
||||
/// <summary>
|
||||
/// txtCloseTime 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtCloseTime;
|
||||
|
||||
/// <summary>
|
||||
/// txtCompileManName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCompileManName;
|
||||
|
||||
/// <summary>
|
||||
/// txtCompileDate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtCompileDate;
|
||||
|
||||
/// <summary>
|
||||
/// txtRemark 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtRemark;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// btnAttach 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAttach;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// hdId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdId;
|
||||
|
||||
/// <summary>
|
||||
/// hdAttachUrl 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdAttachUrl;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window WindowAtt;
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -299,6 +299,10 @@
|
||||
<Content Include="BaseInfo\UnitType.aspx" />
|
||||
<Content Include="BaseInfo\WorkPost.aspx" />
|
||||
<Content Include="BaseInfo\WorkStage.aspx" />
|
||||
<Content Include="Check\HSE\CheckProblemView.aspx" />
|
||||
<Content Include="Check\HSE\CheckProblemEdit.aspx" />
|
||||
<Content Include="Check\HSE\CheckProblem.aspx" />
|
||||
<Content Include="Check\HSE\CheckProblemIn.aspx" />
|
||||
<Content Include="common\css\base.css" />
|
||||
<Content Include="common\css\projectIndex.css" />
|
||||
<Content Include="common\image\bj 1.jpg" />
|
||||
@@ -8158,6 +8162,34 @@
|
||||
<Compile Include="BaseInfo\WorkStage.aspx.designer.cs">
|
||||
<DependentUpon>WorkStage.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Check\HSE\CheckProblemView.aspx.cs">
|
||||
<DependentUpon>CheckProblemView.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Check\HSE\CheckProblemView.aspx.designer.cs">
|
||||
<DependentUpon>CheckProblemView.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Check\HSE\CheckProblemEdit.aspx.cs">
|
||||
<DependentUpon>CheckProblemEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Check\HSE\CheckProblemEdit.aspx.designer.cs">
|
||||
<DependentUpon>CheckProblemEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Check\HSE\CheckProblem.aspx.cs">
|
||||
<DependentUpon>CheckProblem.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Check\HSE\CheckProblem.aspx.designer.cs">
|
||||
<DependentUpon>CheckProblem.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Check\HSE\CheckProblemIn.aspx.cs">
|
||||
<DependentUpon>CheckProblemIn.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Check\HSE\CheckProblemIn.aspx.designer.cs">
|
||||
<DependentUpon>CheckProblemIn.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="common\mainMenu_FiveStarts.aspx.cs">
|
||||
<DependentUpon>mainMenu_FiveStarts.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -20201,6 +20233,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="App_Themes\Default\Images\" />
|
||||
<Folder Include="Check\QMS\" />
|
||||
<Folder Include="FileUpload\" />
|
||||
<Folder Include="Images\charts_0\" />
|
||||
<Folder Include="Images\charts_1\" />
|
||||
|
||||
@@ -974,22 +974,14 @@ namespace FineUIPro.Web
|
||||
{
|
||||
html = (row.FindControl("lblNumber") as AspNet.Label).Text;
|
||||
}
|
||||
if (column.ColumnID == "tfTeamType" && (row.FindControl("lbTeamType") as AspNet.Label) != null)
|
||||
if (column.ColumnID == "tfState")
|
||||
{
|
||||
html = (row.FindControl("lbTeamType") as AspNet.Label).Text;
|
||||
}
|
||||
if (column.ColumnID == "tfI" && (row.FindControl("tfI") as AspNet.Label) != null)
|
||||
{
|
||||
html = (row.FindControl("lbI") as AspNet.Label).Text;
|
||||
html = (row.FindControl("lbState") as AspNet.Label).Text;
|
||||
}
|
||||
if (column.ColumnID == "tfCompileMan" && (row.FindControl("lblCompileMan") as AspNet.Label) != null)
|
||||
{
|
||||
html = (row.FindControl("lblCompileMan") as AspNet.Label).Text;
|
||||
}
|
||||
if (column.ColumnID == "tfSpecialEquipmentId")
|
||||
{
|
||||
html = (row.FindControl("lblSpecialEquipmentId") as AspNet.Label).Text;
|
||||
}
|
||||
// 处理CheckBox
|
||||
if (html.Contains("f-grid-static-checkbox"))
|
||||
{
|
||||
|
||||
@@ -536,6 +536,9 @@ namespace Model
|
||||
partial void InsertCheck_ViolationPerson(Check_ViolationPerson instance);
|
||||
partial void UpdateCheck_ViolationPerson(Check_ViolationPerson instance);
|
||||
partial void DeleteCheck_ViolationPerson(Check_ViolationPerson instance);
|
||||
partial void InsertCheckProblem_Safety(CheckProblem_Safety instance);
|
||||
partial void UpdateCheckProblem_Safety(CheckProblem_Safety instance);
|
||||
partial void DeleteCheckProblem_Safety(CheckProblem_Safety instance);
|
||||
partial void InsertCL_MatchingM(CL_MatchingM instance);
|
||||
partial void UpdateCL_MatchingM(CL_MatchingM instance);
|
||||
partial void DeleteCL_MatchingM(CL_MatchingM instance);
|
||||
@@ -4122,6 +4125,14 @@ namespace Model
|
||||
}
|
||||
}
|
||||
|
||||
public System.Data.Linq.Table<CheckProblem_Safety> CheckProblem_Safety
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.GetTable<CheckProblem_Safety>();
|
||||
}
|
||||
}
|
||||
|
||||
public System.Data.Linq.Table<CL_MatchingM> CL_MatchingM
|
||||
{
|
||||
get
|
||||
@@ -88019,6 +88030,716 @@ namespace Model
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.CheckProblem_Safety")]
|
||||
public partial class CheckProblem_Safety : INotifyPropertyChanging, INotifyPropertyChanged
|
||||
{
|
||||
|
||||
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
|
||||
|
||||
private string _CheckId;
|
||||
|
||||
private string _UnitId;
|
||||
|
||||
private string _UnitName;
|
||||
|
||||
private string _ProjectId;
|
||||
|
||||
private string _ProjectName;
|
||||
|
||||
private int _State;
|
||||
|
||||
private string _Address;
|
||||
|
||||
private string _Description;
|
||||
|
||||
private string _UnitType;
|
||||
|
||||
private string _AssemblyName;
|
||||
|
||||
private string _CheckTeamUser;
|
||||
|
||||
private System.DateTime _CheckDate;
|
||||
|
||||
private System.Nullable<System.DateTime> _LimitDate;
|
||||
|
||||
private System.Nullable<System.DateTime> _CloseTime;
|
||||
|
||||
private string _RectificationUserId;
|
||||
|
||||
private string _RectificationUserName;
|
||||
|
||||
private string _PMUserId;
|
||||
|
||||
private string _PMUserName;
|
||||
|
||||
private string _ClassifyId;
|
||||
|
||||
private string _ClassifyItemId;
|
||||
|
||||
private string _NatureId;
|
||||
|
||||
private string _NatureItemId;
|
||||
|
||||
private string _AttachUrl;
|
||||
|
||||
private string _RectificationUrl;
|
||||
|
||||
private string _Remark;
|
||||
|
||||
private string _CompileMan;
|
||||
|
||||
private string _CompileManName;
|
||||
|
||||
private System.DateTime _CompileDate;
|
||||
|
||||
#region 可扩展性方法定义
|
||||
partial void OnLoaded();
|
||||
partial void OnValidate(System.Data.Linq.ChangeAction action);
|
||||
partial void OnCreated();
|
||||
partial void OnCheckIdChanging(string value);
|
||||
partial void OnCheckIdChanged();
|
||||
partial void OnUnitIdChanging(string value);
|
||||
partial void OnUnitIdChanged();
|
||||
partial void OnUnitNameChanging(string value);
|
||||
partial void OnUnitNameChanged();
|
||||
partial void OnProjectIdChanging(string value);
|
||||
partial void OnProjectIdChanged();
|
||||
partial void OnProjectNameChanging(string value);
|
||||
partial void OnProjectNameChanged();
|
||||
partial void OnStateChanging(int value);
|
||||
partial void OnStateChanged();
|
||||
partial void OnAddressChanging(string value);
|
||||
partial void OnAddressChanged();
|
||||
partial void OnDescriptionChanging(string value);
|
||||
partial void OnDescriptionChanged();
|
||||
partial void OnUnitTypeChanging(string value);
|
||||
partial void OnUnitTypeChanged();
|
||||
partial void OnAssemblyNameChanging(string value);
|
||||
partial void OnAssemblyNameChanged();
|
||||
partial void OnCheckTeamUserChanging(string value);
|
||||
partial void OnCheckTeamUserChanged();
|
||||
partial void OnCheckDateChanging(System.DateTime value);
|
||||
partial void OnCheckDateChanged();
|
||||
partial void OnLimitDateChanging(System.Nullable<System.DateTime> value);
|
||||
partial void OnLimitDateChanged();
|
||||
partial void OnCloseTimeChanging(System.Nullable<System.DateTime> value);
|
||||
partial void OnCloseTimeChanged();
|
||||
partial void OnRectificationUserIdChanging(string value);
|
||||
partial void OnRectificationUserIdChanged();
|
||||
partial void OnRectificationUserNameChanging(string value);
|
||||
partial void OnRectificationUserNameChanged();
|
||||
partial void OnPMUserIdChanging(string value);
|
||||
partial void OnPMUserIdChanged();
|
||||
partial void OnPMUserNameChanging(string value);
|
||||
partial void OnPMUserNameChanged();
|
||||
partial void OnClassifyIdChanging(string value);
|
||||
partial void OnClassifyIdChanged();
|
||||
partial void OnClassifyItemIdChanging(string value);
|
||||
partial void OnClassifyItemIdChanged();
|
||||
partial void OnNatureIdChanging(string value);
|
||||
partial void OnNatureIdChanged();
|
||||
partial void OnNatureItemIdChanging(string value);
|
||||
partial void OnNatureItemIdChanged();
|
||||
partial void OnAttachUrlChanging(string value);
|
||||
partial void OnAttachUrlChanged();
|
||||
partial void OnRectificationUrlChanging(string value);
|
||||
partial void OnRectificationUrlChanged();
|
||||
partial void OnRemarkChanging(string value);
|
||||
partial void OnRemarkChanged();
|
||||
partial void OnCompileManChanging(string value);
|
||||
partial void OnCompileManChanged();
|
||||
partial void OnCompileManNameChanging(string value);
|
||||
partial void OnCompileManNameChanged();
|
||||
partial void OnCompileDateChanging(System.DateTime value);
|
||||
partial void OnCompileDateChanged();
|
||||
#endregion
|
||||
|
||||
public CheckProblem_Safety()
|
||||
{
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
|
||||
public string CheckId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._CheckId;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._CheckId != value))
|
||||
{
|
||||
this.OnCheckIdChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._CheckId = value;
|
||||
this.SendPropertyChanged("CheckId");
|
||||
this.OnCheckIdChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")]
|
||||
public string UnitId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._UnitId;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._UnitId != value))
|
||||
{
|
||||
this.OnUnitIdChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._UnitId = value;
|
||||
this.SendPropertyChanged("UnitId");
|
||||
this.OnUnitIdChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitName", DbType="NVarChar(50)")]
|
||||
public string UnitName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._UnitName;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._UnitName != value))
|
||||
{
|
||||
this.OnUnitNameChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._UnitName = value;
|
||||
this.SendPropertyChanged("UnitName");
|
||||
this.OnUnitNameChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")]
|
||||
public string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._ProjectId;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._ProjectId != value))
|
||||
{
|
||||
this.OnProjectIdChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._ProjectId = value;
|
||||
this.SendPropertyChanged("ProjectId");
|
||||
this.OnProjectIdChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectName", DbType="NVarChar(50)")]
|
||||
public string ProjectName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._ProjectName;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._ProjectName != value))
|
||||
{
|
||||
this.OnProjectNameChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._ProjectName = value;
|
||||
this.SendPropertyChanged("ProjectName");
|
||||
this.OnProjectNameChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_State", DbType="Int NOT NULL")]
|
||||
public int State
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._State;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._State != value))
|
||||
{
|
||||
this.OnStateChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._State = value;
|
||||
this.SendPropertyChanged("State");
|
||||
this.OnStateChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Address", DbType="NVarChar(200)")]
|
||||
public string Address
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Address;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._Address != value))
|
||||
{
|
||||
this.OnAddressChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._Address = value;
|
||||
this.SendPropertyChanged("Address");
|
||||
this.OnAddressChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)]
|
||||
public string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Description;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._Description != value))
|
||||
{
|
||||
this.OnDescriptionChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._Description = value;
|
||||
this.SendPropertyChanged("Description");
|
||||
this.OnDescriptionChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitType", DbType="NVarChar(20)")]
|
||||
public string UnitType
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._UnitType;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._UnitType != value))
|
||||
{
|
||||
this.OnUnitTypeChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._UnitType = value;
|
||||
this.SendPropertyChanged("UnitType");
|
||||
this.OnUnitTypeChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AssemblyName", DbType="NVarChar(100)")]
|
||||
public string AssemblyName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._AssemblyName;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._AssemblyName != value))
|
||||
{
|
||||
this.OnAssemblyNameChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._AssemblyName = value;
|
||||
this.SendPropertyChanged("AssemblyName");
|
||||
this.OnAssemblyNameChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckTeamUser", DbType="NVarChar(500)")]
|
||||
public string CheckTeamUser
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._CheckTeamUser;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._CheckTeamUser != value))
|
||||
{
|
||||
this.OnCheckTeamUserChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._CheckTeamUser = value;
|
||||
this.SendPropertyChanged("CheckTeamUser");
|
||||
this.OnCheckTeamUserChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckDate", DbType="DateTime NOT NULL")]
|
||||
public System.DateTime CheckDate
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._CheckDate;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._CheckDate != value))
|
||||
{
|
||||
this.OnCheckDateChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._CheckDate = value;
|
||||
this.SendPropertyChanged("CheckDate");
|
||||
this.OnCheckDateChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LimitDate", DbType="DateTime")]
|
||||
public System.Nullable<System.DateTime> LimitDate
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._LimitDate;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._LimitDate != value))
|
||||
{
|
||||
this.OnLimitDateChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._LimitDate = value;
|
||||
this.SendPropertyChanged("LimitDate");
|
||||
this.OnLimitDateChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CloseTime", DbType="DateTime")]
|
||||
public System.Nullable<System.DateTime> CloseTime
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._CloseTime;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._CloseTime != value))
|
||||
{
|
||||
this.OnCloseTimeChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._CloseTime = value;
|
||||
this.SendPropertyChanged("CloseTime");
|
||||
this.OnCloseTimeChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RectificationUserId", DbType="NVarChar(50)")]
|
||||
public string RectificationUserId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._RectificationUserId;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._RectificationUserId != value))
|
||||
{
|
||||
this.OnRectificationUserIdChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._RectificationUserId = value;
|
||||
this.SendPropertyChanged("RectificationUserId");
|
||||
this.OnRectificationUserIdChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RectificationUserName", DbType="NVarChar(100)")]
|
||||
public string RectificationUserName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._RectificationUserName;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._RectificationUserName != value))
|
||||
{
|
||||
this.OnRectificationUserNameChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._RectificationUserName = value;
|
||||
this.SendPropertyChanged("RectificationUserName");
|
||||
this.OnRectificationUserNameChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PMUserId", DbType="NVarChar(50)")]
|
||||
public string PMUserId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._PMUserId;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._PMUserId != value))
|
||||
{
|
||||
this.OnPMUserIdChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._PMUserId = value;
|
||||
this.SendPropertyChanged("PMUserId");
|
||||
this.OnPMUserIdChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PMUserName", DbType="NVarChar(100)")]
|
||||
public string PMUserName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._PMUserName;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._PMUserName != value))
|
||||
{
|
||||
this.OnPMUserNameChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._PMUserName = value;
|
||||
this.SendPropertyChanged("PMUserName");
|
||||
this.OnPMUserNameChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ClassifyId", DbType="NVarChar(50)")]
|
||||
public string ClassifyId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._ClassifyId;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._ClassifyId != value))
|
||||
{
|
||||
this.OnClassifyIdChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._ClassifyId = value;
|
||||
this.SendPropertyChanged("ClassifyId");
|
||||
this.OnClassifyIdChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ClassifyItemId", DbType="NVarChar(50)")]
|
||||
public string ClassifyItemId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._ClassifyItemId;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._ClassifyItemId != value))
|
||||
{
|
||||
this.OnClassifyItemIdChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._ClassifyItemId = value;
|
||||
this.SendPropertyChanged("ClassifyItemId");
|
||||
this.OnClassifyItemIdChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NatureId", DbType="NVarChar(50)")]
|
||||
public string NatureId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._NatureId;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._NatureId != value))
|
||||
{
|
||||
this.OnNatureIdChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._NatureId = value;
|
||||
this.SendPropertyChanged("NatureId");
|
||||
this.OnNatureIdChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NatureItemId", DbType="NVarChar(50)")]
|
||||
public string NatureItemId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._NatureItemId;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._NatureItemId != value))
|
||||
{
|
||||
this.OnNatureItemIdChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._NatureItemId = value;
|
||||
this.SendPropertyChanged("NatureItemId");
|
||||
this.OnNatureItemIdChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttachUrl", DbType="NVarChar(1000)")]
|
||||
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.ColumnAttribute(Storage="_RectificationUrl", DbType="NVarChar(1000)")]
|
||||
public string RectificationUrl
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._RectificationUrl;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._RectificationUrl != value))
|
||||
{
|
||||
this.OnRectificationUrlChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._RectificationUrl = value;
|
||||
this.SendPropertyChanged("RectificationUrl");
|
||||
this.OnRectificationUrlChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(50)")]
|
||||
public string Remark
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Remark;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._Remark != value))
|
||||
{
|
||||
this.OnRemarkChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._Remark = value;
|
||||
this.SendPropertyChanged("Remark");
|
||||
this.OnRemarkChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")]
|
||||
public string CompileMan
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._CompileMan;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._CompileMan != value))
|
||||
{
|
||||
this.OnCompileManChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._CompileMan = value;
|
||||
this.SendPropertyChanged("CompileMan");
|
||||
this.OnCompileManChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileManName", DbType="NVarChar(100)")]
|
||||
public string CompileManName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._CompileManName;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._CompileManName != value))
|
||||
{
|
||||
this.OnCompileManNameChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._CompileManName = value;
|
||||
this.SendPropertyChanged("CompileManName");
|
||||
this.OnCompileManNameChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime NOT NULL")]
|
||||
public System.DateTime CompileDate
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._CompileDate;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._CompileDate != value))
|
||||
{
|
||||
this.OnCompileDateChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._CompileDate = value;
|
||||
this.SendPropertyChanged("CompileDate");
|
||||
this.OnCompileDateChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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.CL_MatchingM")]
|
||||
public partial class CL_MatchingM : INotifyPropertyChanging, INotifyPropertyChanged
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user