数据穿透
This commit is contained in:
@@ -83,6 +83,8 @@
|
||||
</f:DatePicker>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnPull" runat="server" OnClick="btnPull_Click" ToolTip="获取" Text="获取">
|
||||
</f:Button>
|
||||
<f:Button ID="btnNew" ToolTip="新增" Icon="Add" EnablePostBack="false" runat="server" Text="新增"
|
||||
Hidden="true">
|
||||
</f:Button>
|
||||
|
||||
@@ -654,5 +654,18 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 拉取总包检查
|
||||
/// <summary>
|
||||
/// 拉取总包检查
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnPull_Click(object sender, EventArgs e)
|
||||
{
|
||||
APICheckSpecialSyncService.getCheckSpecialLists(this.ProjectId);
|
||||
this.BindGrid();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -149,6 +149,15 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// btnPull 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnPull;
|
||||
|
||||
/// <summary>
|
||||
/// btnNew 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
<%@ Page Language="C#" CodeBehind="CheckSpecialDetailIn.aspx.cs" Inherits="FineUIPro.Web.HSSE.Check.CheckSpecialDetailIn" %>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>导入明细</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
</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:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
|
||||
<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="下载模板" Text="下载模板" OnClick="btnDownLoad_Click">
|
||||
</f:Button>
|
||||
</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>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:HiddenField ID="hdFileName" runat="server">
|
||||
</f:HiddenField>
|
||||
<f:HiddenField ID="hdCheckResult" runat="server">
|
||||
</f:HiddenField>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Label ID="lblBottom" runat="server" Text="说明:1 导入模板为.xls后缀的EXCEL文件,有背景色列为必填项。2 数据导入完成,成功后自动返回,如果有不成功数据页面弹出提示框,列表显示导入成功数据。">
|
||||
</f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,571 @@
|
||||
using BLL;
|
||||
using BLL.Common;
|
||||
using FineUIPro.Web.BaseInfo;
|
||||
using FineUIPro.Web.DataShow;
|
||||
using Model;
|
||||
using NPOI.SS.UserModel;
|
||||
using NPOI.XSSF.UserModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Web.Services.Description;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.Check
|
||||
{
|
||||
public partial class CheckSpecialDetailIn : PageBase
|
||||
{
|
||||
#region 定义变量
|
||||
|
||||
/// <summary>
|
||||
/// 上传预设的虚拟路径
|
||||
/// </summary>
|
||||
private string initPath = Const.ExcelUrl;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 错误集合
|
||||
/// </summary>
|
||||
public static List<Model.ErrorInfo> errorInfos = new List<Model.ErrorInfo>();
|
||||
|
||||
/// <summary>
|
||||
/// 项目id
|
||||
/// </summary>
|
||||
public string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ProjectId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 检查id
|
||||
/// </summary>
|
||||
public string CheckSpecialId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["CheckSpecialId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["CheckSpecialId"] = value;
|
||||
}
|
||||
}
|
||||
public static int Cols = 11;//列数
|
||||
|
||||
public static Dictionary<string, string> imgDic = new Dictionary<string, string>();
|
||||
//public static List<string> unitWorks = new List<string>();
|
||||
public static List<WBS_UnitWork> unitWorks = new List<WBS_UnitWork>();
|
||||
public static List<Base_Unit> units = new List<Base_Unit>();
|
||||
public static List<Sys_User> hseManagers = new List<Sys_User>();
|
||||
public static List<HSSE_Hazard_HazardRegisterTypes> types = new List<HSSE_Hazard_HazardRegisterTypes>();
|
||||
|
||||
//public static List<string> validLevelStrings = new List<string> { "低风险", "一般风险", "较大风险", "重大风险" };
|
||||
public static List<string> validLevelStrings = new List<string> { "一般风险", "较大风险", "重大风险" };
|
||||
public static List<string> validStateStrings = new List<string> { "待整改", "已整改" };
|
||||
public static List<string> validTypeStrings = new List<string> { "当场纠正", "口头警告" };
|
||||
|
||||
#endregion
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.ProjectId = Request.Params["ProjectId"];
|
||||
this.CheckSpecialId = Request.Params["CheckSpecialId"];
|
||||
|
||||
///单位工程
|
||||
var unitWorkList = (from x in Funs.DB.WBS_UnitWork
|
||||
where x.ProjectId == this.ProjectId && x.SuperUnitWork == null
|
||||
orderby x.UnitWorkCode
|
||||
select x).ToList();
|
||||
//var unitWorkList = (from x in Funs.DB.WBS_UnitWork
|
||||
// where x.ProjectId == this.ProjectId && x.SuperUnitWork == null
|
||||
// orderby x.UnitWorkCode
|
||||
// select new
|
||||
// {
|
||||
// x.UnitWorkId,
|
||||
// UnitWorkName = UnitWorkService.GetUnitWorkALLName(x.UnitWorkId)
|
||||
// }).ToList();
|
||||
if (unitWorkList.Any())
|
||||
{
|
||||
unitWorks.AddRange(unitWorkList);
|
||||
//unitWorks.AddRange(unitWorkList.Select(x => x.UnitWorkName));
|
||||
}
|
||||
//受检单位
|
||||
units = (from x in Funs.DB.Base_Unit
|
||||
join y in Funs.DB.Project_ProjectUnit on x.UnitId equals y.UnitId
|
||||
where y.ProjectId == this.ProjectId
|
||||
orderby x.UnitCode
|
||||
select x).ToList();
|
||||
//HSE经理
|
||||
hseManagers = BLL.ProjectUserService.GetProjectUserByUnitidAndProjectId(this.ProjectId, Const.HSSEManager);
|
||||
//安全巡检类型
|
||||
types = BLL.HSSE_Hazard_HazardRegisterTypesService.GetHazardRegisterTypesList("1");
|
||||
|
||||
|
||||
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.CheckSpecialDetailTemplateUrl;
|
||||
string filePath = Const.CheckSpecialDetailTemplateUrl;
|
||||
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.Check_CheckSpecialDetail entity) ValidateRowAndBuildEntity(DataRow row, string displayRow, bool import)
|
||||
{
|
||||
List<ErrorInfo> lstError = new List<ErrorInfo>();
|
||||
// 新模板字段顺序
|
||||
string checkAreaName = row[0]?.ToString().Trim(); // 单位工程
|
||||
string checkUnitName = row[1]?.ToString().Trim(); // 受检单位
|
||||
string hseManageName = row[2]?.ToString().Trim(); // HSE经理
|
||||
string description = row[3]?.ToString().Trim(); // 问题描述
|
||||
string urls = row[4]?.ToString().Trim(); // 问题图片地址
|
||||
string checkItemName = row[5]?.ToString().Trim(); // 问题类型
|
||||
string levelName = row[6]?.ToString().Trim(); // 风险级别
|
||||
string completeStatusName = row[7]?.ToString().Trim(); // 现场处理结果
|
||||
string handMethod = row[8]?.ToString().Trim(); // 处理方式
|
||||
string limitedDateStr = row[9]?.ToString().Trim(); // 限时日期
|
||||
string suggestions = row[10]?.ToString().Trim(); // 整改要求
|
||||
|
||||
string CheckArea = string.Empty;
|
||||
string UnitId = string.Empty;
|
||||
string HSEManageId = string.Empty;
|
||||
string CheckContent = string.Empty;
|
||||
string CheckItem = string.Empty;
|
||||
string RiskLevel = string.Empty;
|
||||
bool CompleteStatus = false;
|
||||
DateTime? CompletedDate = null;
|
||||
string RectifyOpinion = string.Empty;
|
||||
DateTime? LimitedDate = null;
|
||||
string Suggestions = string.Empty;
|
||||
|
||||
// 校验并转换
|
||||
if (!string.IsNullOrEmpty(checkAreaName))
|
||||
{
|
||||
if (unitWorks.Any(x => x.UnitWorkName == checkAreaName))
|
||||
{
|
||||
//CheckArea = checkAreaName;
|
||||
CheckArea = unitWorks.Where(x => x.UnitWorkName == checkAreaName).FirstOrDefault().UnitWorkId;
|
||||
}
|
||||
else
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "单位工程", Reason = $"单位工程名称[{checkAreaName}]不存在" });
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "单位工程", Reason = "不能为空" });
|
||||
}
|
||||
if (!string.IsNullOrEmpty(checkUnitName))
|
||||
{
|
||||
if (units.Any(x => x.UnitName == checkUnitName))
|
||||
{
|
||||
UnitId = units.Where(x => x.UnitName == checkUnitName).FirstOrDefault().UnitId;
|
||||
}
|
||||
else
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "受检单位", Reason = $"受检单位名称[{checkUnitName}]不存在" });
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "受检单位", Reason = "不能为空" });
|
||||
}
|
||||
if (!string.IsNullOrEmpty(hseManageName))
|
||||
{
|
||||
if (hseManagers.Any(x => x.UserName == hseManageName))
|
||||
{
|
||||
HSEManageId = hseManagers.Where(x => x.UserName == hseManageName).FirstOrDefault().UserId;
|
||||
}
|
||||
else
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "HSE经理", Reason = $"项目不存在用户[{hseManageName}]" });
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(checkItemName))
|
||||
{
|
||||
if (types.Any(x => x.RegisterTypesName == checkItemName))
|
||||
{
|
||||
CheckContent = checkItemName;
|
||||
CheckItem = types.Where(x => x.RegisterTypesName == checkItemName).FirstOrDefault().RegisterTypesId;
|
||||
}
|
||||
else
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "问题类型", Reason = $"问题类型[{checkItemName}]不存在" });
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(levelName))
|
||||
{
|
||||
if (validLevelStrings.Any(x => x == levelName))
|
||||
{
|
||||
switch (levelName)
|
||||
{
|
||||
//case "低": RiskLevel = "0"; break;
|
||||
case "一般": RiskLevel = "1"; break;
|
||||
case "较高": RiskLevel = "2"; break;
|
||||
case "高": RiskLevel = "3"; break;
|
||||
default: RiskLevel = "1"; break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "风险级别", Reason = $"风险级别[{levelName}]不存在" });
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(completeStatusName))
|
||||
{
|
||||
if (validStateStrings.Any(x => x == completeStatusName))
|
||||
{
|
||||
if (completeStatusName == "已整改")
|
||||
{
|
||||
CompleteStatus = true;
|
||||
CompletedDate = DateTime.Now;
|
||||
}
|
||||
else
|
||||
{
|
||||
CompleteStatus = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "现场处理结果", Reason = $"现场处理结果[{completeStatusName}]不存在" });
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(handMethod))
|
||||
{
|
||||
if (validTypeStrings.Any(x => x == handMethod))
|
||||
{
|
||||
RectifyOpinion = handMethod;
|
||||
}
|
||||
else
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "处理方式", Reason = $"处理方式[{handMethod}]不存在" });
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(limitedDateStr))
|
||||
{
|
||||
if (!DateTime.TryParse(limitedDateStr, out DateTime ct))
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "限时日期", Reason = "日期格式错误" });
|
||||
LimitedDate = ct;
|
||||
}
|
||||
else
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "限时日期", Reason = "不能为空" });
|
||||
}
|
||||
if (!string.IsNullOrEmpty(suggestions))
|
||||
{
|
||||
Suggestions = suggestions;
|
||||
}
|
||||
//if (import)
|
||||
//{图片待处理
|
||||
// try
|
||||
// {
|
||||
// urls = urls.Substring(urls.IndexOf('"') + 1, urls.LastIndexOf('"') - urls.IndexOf('"') - 1);
|
||||
// var sss = imgDic.ContainsKey(urls) ? imgDic[urls].Replace(Funs.RootPath, "") : "";
|
||||
// }
|
||||
// catch (Exception e) { }
|
||||
//}
|
||||
|
||||
if (lstError.Any())
|
||||
{
|
||||
return (lstError, null);
|
||||
}
|
||||
|
||||
// 其余字段可根据实际业务映射到实体
|
||||
var entity = new Model.Check_CheckSpecialDetail
|
||||
{
|
||||
CheckSpecialDetailId = SQLHelper.GetNewID(),
|
||||
CheckSpecialId = this.CheckSpecialId,
|
||||
CheckArea = CheckArea,
|
||||
UnitId = UnitId,
|
||||
HSEManage = HSEManageId,
|
||||
Unqualified = description,
|
||||
CheckContent = CheckContent,
|
||||
CheckItem = CheckItem,
|
||||
RiskLevel = RiskLevel,
|
||||
CompleteStatus = CompleteStatus,
|
||||
CompletedDate = CompletedDate,
|
||||
RectifyOpinion = RectifyOpinion,
|
||||
LimitedDate = LimitedDate,
|
||||
Suggestions = Suggestions
|
||||
};
|
||||
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.Check_CheckSpecialDetail>();
|
||||
|
||||
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.Check_CheckSpecialDetail.InsertAllOnSubmit(toInsert);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
ShowNotify($"成功导入 {toInsert.Count} 条记录。", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog("导入 Hazard_HazardRegister_Unit 失败", ex);
|
||||
ShowNotify("导入失败:" + ex.Message, MessageBoxIcon.Error);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion // 导入
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HSSE.Check
|
||||
{
|
||||
|
||||
|
||||
public partial class CheckSpecialDetailIn
|
||||
{
|
||||
|
||||
/// <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>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <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>
|
||||
/// 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;
|
||||
|
||||
/// <summary>
|
||||
/// hdFileName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdFileName;
|
||||
|
||||
/// <summary>
|
||||
/// hdCheckResult 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdCheckResult;
|
||||
|
||||
/// <summary>
|
||||
/// lblBottom 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lblBottom;
|
||||
}
|
||||
}
|
||||
@@ -57,6 +57,10 @@
|
||||
</f:Button>
|
||||
<%-- <f:Button ID="btnDelete" Text="删除" Icon="Delete" EnablePostBack="false" runat="server">
|
||||
</f:Button>--%>
|
||||
<f:Button ID="btnImport" ToolTip="导入" Text="导入" Icon="ApplicationGet" runat="server"
|
||||
OnClick="btnImport_Click">
|
||||
</f:Button>
|
||||
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
@@ -187,6 +191,10 @@
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
<f:Window ID="Window2" Title="导入" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" OnClose="Window2_Close" IsModal="true"
|
||||
CloseAction="HidePostBack" Width="720px" Height="560px">
|
||||
</f:Window>
|
||||
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
|
||||
Height="500px">
|
||||
|
||||
@@ -119,20 +119,20 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
{
|
||||
this.drpPartInPersons.SelectedValueArray = checkSpecial.PartInPersonIds.Split(',');
|
||||
}
|
||||
|
||||
var checkSpecialDetails = (from x in Funs.DB.View_CheckSpecialDetail
|
||||
where x.CheckSpecialId == this.CheckSpecialId
|
||||
orderby x.UnitName, x.SortIndex
|
||||
select x).ToList();
|
||||
if (checkSpecialDetails.Count() > 0)
|
||||
{
|
||||
this.drpSupCheckItemSet.Readonly = true;
|
||||
this.drpType.Readonly = true;
|
||||
}
|
||||
|
||||
details = checkSpecialDetails;
|
||||
Grid1.DataSource = details;
|
||||
Grid1.DataBind();
|
||||
BindDetailGrid();
|
||||
// var checkSpecialDetails = (from x in Funs.DB.View_CheckSpecialDetail
|
||||
// where x.CheckSpecialId == this.CheckSpecialId
|
||||
// orderby x.UnitName, x.SortIndex
|
||||
// select x).ToList();
|
||||
// if (checkSpecialDetails.Count() > 0)
|
||||
// {
|
||||
// this.drpSupCheckItemSet.Readonly = true;
|
||||
// this.drpType.Readonly = true;
|
||||
// }
|
||||
//
|
||||
// details = checkSpecialDetails;
|
||||
// Grid1.DataSource = details;
|
||||
// Grid1.DataBind();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -156,6 +156,31 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
// 新增数据初始值
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindDetailGrid()
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.CheckSpecialId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
var checkSpecialDetails = (from x in Funs.DB.View_CheckSpecialDetail
|
||||
where x.CheckSpecialId == this.CheckSpecialId
|
||||
orderby x.UnitName, x.SortIndex
|
||||
select x).ToList();
|
||||
if (checkSpecialDetails.Count() > 0)
|
||||
{
|
||||
this.drpSupCheckItemSet.Readonly = true;
|
||||
this.drpType.Readonly = true;
|
||||
}
|
||||
|
||||
details = checkSpecialDetails;
|
||||
Grid1.DataSource = details;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
#endregion
|
||||
protected void btnAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -545,7 +570,7 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
}
|
||||
switch (values.Value<string>("RiskLevel"))
|
||||
{
|
||||
case "低": newDetail.RiskLevel = "0"; break;
|
||||
// case "低": newDetail.RiskLevel = "0"; break;
|
||||
case "一般": newDetail.RiskLevel = "1"; break;
|
||||
case "较高": newDetail.RiskLevel = "2"; break;
|
||||
case "高": newDetail.RiskLevel = "3"; break;
|
||||
@@ -695,12 +720,14 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
this.drpCheckItem.DataSource = BLL.HSSE_Hazard_HazardRegisterTypesService.GetHazardRegisterTypesList("1"); //安全巡检类型
|
||||
this.drpCheckItem.DataBind();
|
||||
//this.drpCheckItem.SelectedValue = null;
|
||||
ListItem[] item = new ListItem[4];
|
||||
|
||||
item[0] = new ListItem("低风险", "低");
|
||||
item[1] = new ListItem("一般风险", "一般");
|
||||
item[2] = new ListItem("较大风险", "较高");
|
||||
item[3] = new ListItem("重大风险", "高");
|
||||
ListItem[] item = new ListItem[3];
|
||||
item[0] = new ListItem("一般风险", "一般");
|
||||
item[1] = new ListItem("较大风险", "较高");
|
||||
item[2] = new ListItem("重大风险", "高");
|
||||
// item[0] = new ListItem("低风险", "低");
|
||||
// item[1] = new ListItem("一般风险", "一般");
|
||||
// item[2] = new ListItem("较大风险", "较高");
|
||||
// item[3] = new ListItem("重大风险", "高");
|
||||
this.drpRiskLevel.DataValueField = "Value";
|
||||
this.drpRiskLevel.DataTextField = "Text";
|
||||
this.drpRiskLevel.DataSource = item;
|
||||
@@ -727,5 +754,31 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
Grid1.DataSource = details;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
#region 导入
|
||||
/// <summary>
|
||||
/// 导入按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.CheckSpecialId))
|
||||
{
|
||||
SaveNew();
|
||||
}
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("CheckSpecialDetailIn.aspx?ProjectId={0}&CheckSpecialId={1}", this.ProjectId, this.CheckSpecialId, "导入 - ")));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 关闭导入弹出窗口
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Window2_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
BindDetailGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -104,6 +104,15 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
/// <summary>
|
||||
/// btnImport 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnImport;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
@@ -275,6 +284,15 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnClose;
|
||||
|
||||
/// <summary>
|
||||
/// Window2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window2;
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -113,10 +113,15 @@
|
||||
</f:Toolbar>
|
||||
<f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<%--<f:DropDownList ID="drpProblemTypes" Hidden="true" runat="server" Label="检查类型" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged"
|
||||
<f:DropDownList ID="drpProblemTypes" Hidden="true" runat="server" Label="检查类型" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged"
|
||||
LabelWidth="100px" LabelAlign="Right" Width="200px">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList runat="server" EnableSimulateTree="True" Hidden="true" LabelAlign="Right" Label="巡检周期" ID="drpckType" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged">
|
||||
<f:DropDownList runat="server" EnableSimulateTree="True" LabelWidth="80px" LabelAlign="Right" Label="来源" ID="drpDataSource" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged">
|
||||
<f:ListItem Text="-请选择-" Value="null"/>
|
||||
<f:ListItem Text="本单位" Value="0"/>
|
||||
<f:ListItem Text="总包" Value="1"/>
|
||||
</f:DropDownList>
|
||||
<%--<f:DropDownList runat="server" EnableSimulateTree="True" Hidden="true" LabelAlign="Right" Label="巡检周期" ID="drpckType" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged">
|
||||
<f:ListItem Text="-请选择-" Value="null"/>
|
||||
<f:ListItem Text="日检" Value="D"/>
|
||||
<f:ListItem Text="周检" Value="W"/>
|
||||
@@ -131,6 +136,8 @@
|
||||
<f:RadioItem Text="无图" Value="0" Selected="true" />
|
||||
<f:RadioItem Text="有图" Value="1" />
|
||||
</f:RadioButtonList>
|
||||
<f:Button ID="btnPull" runat="server" OnClick="btnPull_Click" ToolTip="获取" Text="获取">
|
||||
</f:Button>
|
||||
<f:Button ID="btnNew" Icon="Add" runat="server" OnClick="btnNew_Click" ToolTip="新增" Text="新增" Hidden="true">
|
||||
</f:Button>
|
||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp" Text="导出"
|
||||
@@ -148,7 +155,7 @@
|
||||
<asp:Label ID="lblPageIndex" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="120px" ColumnID="PUnitName" DataField="PUnitName"
|
||||
<%--<f:RenderField Width="120px" ColumnID="PUnitName" DataField="PUnitName"
|
||||
SortField="PUnitName" FieldType="String" HeaderText="所属单位" TextAlign="Left"
|
||||
HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
@@ -156,9 +163,14 @@
|
||||
<f:RenderField Width="120px" ColumnID="ProjectName" DataField="ProjectName"
|
||||
SortField="ProjectName" FieldType="String" HeaderText="项目名称" TextAlign="Left"
|
||||
HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
|
||||
</f:RenderField>--%>
|
||||
|
||||
<f:TemplateField ColumnID="DataSource" Width="120px" HeaderText="来源" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbDataSource" runat="server" Text='<%# ConvertDataSource(Eval("DataSource")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:TemplateField ColumnID="ProblemTypes" Width="120px" HeaderText="检查类型" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -95,14 +95,14 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
|
||||
HSSE_Hazard_HazardRegisterService.InitStatesDropDownList(this.drpStates, true);
|
||||
|
||||
/* ListItem[] ProblemTypes = new ListItem[2];
|
||||
ListItem[] ProblemTypes = new ListItem[2];
|
||||
ProblemTypes[0] = new ListItem("日常巡检", "1");
|
||||
ProblemTypes[1] = new ListItem("专项巡检", "2");
|
||||
this.drpProblemTypes.DataValueField = "Value";
|
||||
this.drpProblemTypes.DataTextField = "Text";
|
||||
this.drpProblemTypes.DataSource = ProblemTypes;
|
||||
this.drpProblemTypes.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpProblemTypes);*/
|
||||
Funs.FineUIPleaseSelect(this.drpProblemTypes);
|
||||
// 绑定表格
|
||||
BindGrid();
|
||||
}
|
||||
@@ -132,7 +132,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
|
||||
if (!string.IsNullOrEmpty(this.ProjectId) || !string.IsNullOrEmpty(this.UnintId))
|
||||
{
|
||||
string strSql = "SELECT * FROM View_Hazard_HazardRegister WHERE ProblemTypes ='1' ";
|
||||
string strSql = "SELECT * FROM View_Hazard_HazardRegister WHERE 1=1 ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (!string.IsNullOrEmpty(ProjectId))
|
||||
{
|
||||
@@ -156,8 +156,8 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.dpRiskLevel.SelectedValue.Trim()))
|
||||
{
|
||||
strSql += " AND Risk_Level = @Risk_Level";
|
||||
listStr.Add(new SqlParameter("@Risk_Level", this.dpRiskLevel.SelectedText));
|
||||
strSql += " AND Risk_Level LIKE @Risk_Level";
|
||||
listStr.Add(new SqlParameter("@Risk_Level", "%" + this.dpRiskLevel.SelectedText + "%"));
|
||||
}
|
||||
//if (this.ckType.SelectedValue != "0")
|
||||
//{
|
||||
@@ -202,6 +202,26 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
strSql += " AND States LIKE @States";
|
||||
listStr.Add(new SqlParameter("@States", "%" + this.drpStates.SelectedValue + "%"));
|
||||
}
|
||||
|
||||
if (this.drpProblemTypes.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND ProblemTypes = @ProblemTypes";
|
||||
listStr.Add(new SqlParameter("@ProblemTypes", this.drpProblemTypes.SelectedValue));
|
||||
}
|
||||
if (this.drpDataSource.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
if (this.drpDataSource.SelectedValue == "0")
|
||||
{
|
||||
strSql += " AND DataSource != @DataSource";
|
||||
listStr.Add(new SqlParameter("@DataSource", "1"));
|
||||
}
|
||||
else
|
||||
{
|
||||
strSql += " AND DataSource = @DataSource";
|
||||
listStr.Add(new SqlParameter("@DataSource", this.drpDataSource.SelectedValue));
|
||||
}
|
||||
}
|
||||
|
||||
if (!CommonService.IsMainUnitOrAdmin(this.CurrUser.UserId))
|
||||
{
|
||||
strSql += " AND (ResponsibleUnit =@ResponsibleUnit OR SendUnitId=@SendUnitId)";
|
||||
@@ -381,14 +401,20 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
{
|
||||
if (registration.States == "1") //待整改
|
||||
{
|
||||
if (registration.ResponsibleMan == this.CurrUser.UserId) //当前人是责任人,可以进行整改操作
|
||||
if (registration.DataSource == "1")
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HiddenRectificationRectify.aspx?HazardRegisterId={0}", RegistrationId, "编辑 - ")));
|
||||
}
|
||||
else
|
||||
}else
|
||||
{
|
||||
Alert.ShowInTop("您不是记录责任人,无法整改!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
if (registration.ResponsibleMan == this.CurrUser.UserId) //当前人是责任人,可以进行整改操作
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HiddenRectificationRectify.aspx?HazardRegisterId={0}", RegistrationId, "编辑 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("您不是记录责任人,无法整改!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -904,5 +930,33 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected string ConvertDataSource(object dataSource)
|
||||
{
|
||||
string data = "本单位";
|
||||
if (dataSource != null)
|
||||
{
|
||||
if (dataSource.ToString() == "1")
|
||||
{
|
||||
data = "总包";
|
||||
}
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
#region 拉取总包检查
|
||||
/// <summary>
|
||||
/// 拉取总包检查
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnPull_Click(object sender, EventArgs e)
|
||||
{
|
||||
APIHazardRegisterSyncService.getHazardRegisterLists(this.ProjectId);
|
||||
this.BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
+36
@@ -221,6 +221,24 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar3;
|
||||
|
||||
/// <summary>
|
||||
/// drpProblemTypes 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpProblemTypes;
|
||||
|
||||
/// <summary>
|
||||
/// drpDataSource 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpDataSource;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
@@ -248,6 +266,15 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.RadioButtonList rbOutType;
|
||||
|
||||
/// <summary>
|
||||
/// btnPull 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnPull;
|
||||
|
||||
/// <summary>
|
||||
/// btnNew 控件。
|
||||
/// </summary>
|
||||
@@ -275,6 +302,15 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblPageIndex;
|
||||
|
||||
/// <summary>
|
||||
/// lbDataSource 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lbDataSource;
|
||||
|
||||
/// <summary>
|
||||
/// lbProblemTypes 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -125,6 +125,18 @@ namespace FineUIPro.Web.HiddenInspection
|
||||
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HSSE_HiddenRectificationListMenuId, BLL.Const.BtnSave))
|
||||
{
|
||||
SaveData(true);
|
||||
#region 推送到总包
|
||||
var register = BLL.HSSE_Hazard_HazardRegisterService.GetHazardRegisterByHazardRegisterId(this.HazardRegisterId);
|
||||
if (register != null)
|
||||
{
|
||||
if (register.DataSource == "1")
|
||||
{
|
||||
//推送到总包
|
||||
APIHazardRegisterSyncService.pushHazardRegisterLists(this.CurrUser.LoginProjectId, register.HazardRegisterId);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -52,6 +52,17 @@
|
||||
<f:DatePicker ID="txtEndDate" runat="server" AutoPostBack="true" OnTextChanged="TextBox_TextChanged"
|
||||
Width="150px" EmptyText="结束时间" LabelWidth="80px">
|
||||
</f:DatePicker>
|
||||
<f:DropDownList ID="drpStates" runat="server" Label="状态" LabelAlign="Right" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged">
|
||||
<f:ListItem Text="待开工" Value="1"/>
|
||||
<f:ListItem Text="作业中" Value="2"/>
|
||||
<f:ListItem Text="已关闭" Value="3"/>
|
||||
<f:ListItem Text="已取消" Value="-1"/>
|
||||
</f:DropDownList>
|
||||
<f:RadioButtonList runat="server" ID="rbSource" Width="220px" Label="来源" LabelWidth="50px"
|
||||
AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged" AutoColumnWidth="true">
|
||||
<f:RadioItem Text="全部" Value="0" Selected="true"/>
|
||||
<f:RadioItem Text="系统内单位" Value="1"/>
|
||||
</f:RadioButtonList>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnNew" ToolTip="新增" Icon="Add" EnablePostBack="false" Hidden="true" Text="新增"
|
||||
@@ -105,6 +116,10 @@
|
||||
<f:RenderField Width="100px" ColumnID="WorkStatesStr" DataField="WorkStatesStr" SortField="WorkStatesStr"
|
||||
FieldType="String" HeaderText="状态" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="SourceDes" DataField="SourceDes"
|
||||
FieldType="String" HeaderText="来源说明" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
|
||||
<%-- <f:WindowField TextAlign="Left" Width="60px" WindowID="WindowAtt" HeaderText="附件"
|
||||
Text="详细" ToolTip="附件上传查看" DataIFrameUrlFields="LicenseManagerId" DataIFrameUrlFormatString="~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/LicenseManagerAttachUrl&menuId=0E9B7084-D021-4CA3-B9D2-9CBAA27A571B"
|
||||
HeaderTextAlign="Center" />--%>
|
||||
|
||||
@@ -99,30 +99,48 @@ namespace FineUIPro.Web.HSSE.License
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
string strSql = "SELECT LicenseManager.LicenseManagerId,LicenseManager.ProjectId,LicenseManager.WorkStatesStr,LicenseManager.LicenseTypeId,CodeRecords.Code AS LicenseManagerCode,LicenseManager.IsHighRisk,LicenseManager.LicenseManageName,LicenseManager.UnitId,LicenseManager.LicenseManageContents,LicenseManager.CompileMan,LicenseManager.CompileDate,LicenseManager.States,LicenseManager.ProjectCode,LicenseManager.ProjectName,LicenseManager.LicenseTypeName,LicenseManager.UnitName,LicenseManager.UnitTypeName,LicenseManager.UserName,LicenseManager.WorkAreaName,LicenseManager.StartDate,LicenseManager.EndDate"
|
||||
+ @" ,(CASE WHEN LicenseManager.States = " + BLL.Const.State_0 + " OR LicenseManager.States IS NULL THEN '待['+OperateUser.UserName+']提交' WHEN LicenseManager.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.UserName+']办理' END) AS FlowOperateName"
|
||||
+ @" FROM View_License_LicenseManager AS LicenseManager "
|
||||
+ @" LEFT JOIN Sys_CodeRecords AS CodeRecords ON LicenseManager.LicenseManagerId=CodeRecords.DataId "
|
||||
+ @" LEFT JOIN Sys_FlowOperate AS FlowOperate ON LicenseManager.LicenseManagerId=FlowOperate.DataId AND FlowOperate.IsClosed <> 1"
|
||||
+ @" LEFT JOIN Sys_User AS OperateUser ON FlowOperate.OperaterId=OperateUser.UserId"
|
||||
+ @" WHERE 1=1 ";
|
||||
string strSql =
|
||||
"SELECT LicenseManager.LicenseManagerId,LicenseManager.ProjectId,LicenseManager.WorkStatesStr,LicenseManager.LicenseTypeId,LicenseManager.LicenseManagerCode,LicenseManager.IsHighRisk,LicenseManager.LicenseManageName,LicenseManager.UnitId,LicenseManager.LicenseManageContents,LicenseManager.CompileMan,LicenseManager.CompileDate,LicenseManager.States,LicenseManager.ProjectCode,LicenseManager.ProjectName,LicenseManager.LicenseTypeName,LicenseManager.UnitName,LicenseManager.UnitTypeName,LicenseManager.UserName,LicenseManager.WorkAreaName,LicenseManager.StartDate,LicenseManager.EndDate,LicenseManager.SourceDes"
|
||||
+ @" ,(CASE WHEN LicenseManager.States = " + BLL.Const.State_0 +
|
||||
" OR LicenseManager.States IS NULL THEN '待['+OperateUser.UserName+']提交' WHEN LicenseManager.States = " +
|
||||
BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.UserName+']办理' END) AS FlowOperateName"
|
||||
+ @" FROM View_License_LicenseManager AS LicenseManager "
|
||||
//+ @" LEFT JOIN Sys_CodeRecords AS CodeRecords ON LicenseManager.LicenseManagerId=CodeRecords.DataId "
|
||||
+ @" LEFT JOIN Sys_FlowOperate AS FlowOperate ON LicenseManager.LicenseManagerId=FlowOperate.DataId AND FlowOperate.IsClosed <> 1"
|
||||
+ @" LEFT JOIN Sys_User AS OperateUser ON FlowOperate.OperaterId=OperateUser.UserId"
|
||||
+ @" WHERE 1=1 ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
strSql += " AND LicenseManager.ProjectId = @ProjectId";
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"])) ///是否文件柜查看页面传项目值
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"])) ///是否文件柜查看页面传项目值
|
||||
{
|
||||
listStr.Add(new SqlParameter("@ProjectId", Request.Params["projectId"]));
|
||||
strSql += " AND LicenseManager.States = @States"; ///状态为已完成
|
||||
strSql += " AND LicenseManager.States = @States"; ///状态为已完成
|
||||
listStr.Add(new SqlParameter("@States", BLL.Const.State_2));
|
||||
}
|
||||
else
|
||||
{
|
||||
listStr.Add(new SqlParameter("@ProjectId", ProjectId));
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
}
|
||||
|
||||
if (this.rbSource.SelectedValue == "1")
|
||||
{
|
||||
strSql += " AND LicenseManager.SourceDes LIKE @SourceDes ";
|
||||
listStr.Add(new SqlParameter("@SourceDes", "%#%"));
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(this.drpStates.SelectedValue) &&
|
||||
this.drpStates.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND LicenseManager.WorkStates = @States";
|
||||
listStr.Add(new SqlParameter("@States", this.drpStates.SelectedValue));
|
||||
}
|
||||
|
||||
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
|
||||
{
|
||||
strSql += " AND LicenseManager.UnitId = @UnitId"; ///状态为已完成
|
||||
strSql += " AND LicenseManager.UnitId = @UnitId"; ///状态为已完成
|
||||
listStr.Add(new SqlParameter("@UnitId", this.CurrUser.UnitId));
|
||||
}
|
||||
|
||||
@@ -140,21 +158,25 @@ namespace FineUIPro.Web.HSSE.License
|
||||
listStr.Add(new SqlParameter("@EndDate", endDate));
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(this.drpLicenseType.SelectedValue) && this.drpLicenseType.SelectedValue != BLL.Const._Null)
|
||||
if (!string.IsNullOrEmpty(this.drpLicenseType.SelectedValue) &&
|
||||
this.drpLicenseType.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND LicenseManager.LicenseTypeId = @LicenseTypeId";
|
||||
listStr.Add(new SqlParameter("@LicenseTypeId", this.drpLicenseType.SelectedValue));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.drpUnit.SelectedValue) && this.drpUnit.SelectedValue != BLL.Const._Null)
|
||||
|
||||
if (this.drpUnit.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND LicenseManager.UnitId = @UnitId2";
|
||||
listStr.Add(new SqlParameter("@UnitId2", this.drpUnit.SelectedValue));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.drpUnitType.SelectedValue) && this.drpUnitType.SelectedValue != BLL.Const._Null)
|
||||
|
||||
if (this.drpUnitType.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND LicenseManager.UnitTypeId = @UnitTypeId";
|
||||
listStr.Add(new SqlParameter("@UnitTypeId", this.drpUnitType.SelectedValue));
|
||||
}
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
@@ -164,7 +186,6 @@ namespace FineUIPro.Web.HSSE.License
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -149,6 +149,24 @@ namespace FineUIPro.Web.HSSE.License
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtEndDate;
|
||||
|
||||
/// <summary>
|
||||
/// drpStates 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpStates;
|
||||
|
||||
/// <summary>
|
||||
/// rbSource 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.RadioButtonList rbSource;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -61,7 +61,8 @@ namespace FineUIPro.Web.HSSE.License
|
||||
{
|
||||
this.InitDropDownList();
|
||||
}
|
||||
this.txtLicenseManagerCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.LicenseManagerId);
|
||||
this.txtLicenseManagerCode.Text = licenseManager.LicenseManagerCode;
|
||||
//this.txtLicenseManagerCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.LicenseManagerId);
|
||||
//this.txtLicenseManageName.Text = licenseManager.LicenseManageName;
|
||||
if (!string.IsNullOrEmpty(licenseManager.UnitId))
|
||||
{
|
||||
@@ -126,6 +127,12 @@ namespace FineUIPro.Web.HSSE.License
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.SaveData(BLL.Const.BtnSave);
|
||||
var porject = BLL.ProjectService.GetProjectByProjectId(this.ProjectId);
|
||||
if (!string.IsNullOrWhiteSpace(porject.SubjectUnit) && !string.IsNullOrWhiteSpace(porject.SubjectProject))
|
||||
{//项目关联了总包单位项目,保存成功后自动推送至总包单位
|
||||
BLL.APILicenseSyncService.PushLicenseManagerLists(this.ProjectId, this.LicenseManagerId);
|
||||
}
|
||||
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,8 @@ namespace FineUIPro.Web.HSSE.License
|
||||
Model.License_LicenseManager licenseManager = BLL.LicenseManagerService.GetLicenseManagerById(this.LicenseManagerId);
|
||||
if (licenseManager != null)
|
||||
{
|
||||
this.txtLicenseManagerCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.LicenseManagerId);
|
||||
this.txtLicenseManagerCode.Text = licenseManager.LicenseManagerCode;
|
||||
//this.txtLicenseManagerCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.LicenseManagerId);
|
||||
if (!string.IsNullOrEmpty(licenseManager.UnitId))
|
||||
{
|
||||
var unit = BLL.UnitService.GetUnitByUnitId(licenseManager.UnitId);
|
||||
|
||||
@@ -43,6 +43,12 @@
|
||||
<f:TextBox runat="server" ID="txtClassMeetingName" EmptyText="按名称查询"
|
||||
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="150px" >
|
||||
</f:TextBox>
|
||||
<f:RadioButtonList runat="server" ID="rbSource" Width="220px" Label="来源" LabelWidth="50px"
|
||||
AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged" AutoColumnWidth="true">
|
||||
<f:RadioItem Text="全部" Value="0" Selected="true"/>
|
||||
<f:RadioItem Text="系统内单位" Value="1"/>
|
||||
</f:RadioButtonList>
|
||||
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnNew" ToolTip="新增" Icon="Add" EnablePostBack="false" Hidden="true" Text="新增"
|
||||
@@ -89,6 +95,9 @@
|
||||
<asp:Label ID="lblCompileMan" runat="server" Text='<%# ConvertCompileMan(Eval("CompileMan")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="140px" ColumnID="Remark" DataField="Remark" FieldType="String" HeaderText="备注" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<%--<f:RenderField Width="150px" ColumnID="FlowOperateName" DataField="FlowOperateName"
|
||||
SortField="FlowOperateName" FieldType="String" HeaderText="状态" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
|
||||
@@ -4,6 +4,8 @@ using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Model;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.Meeting
|
||||
{
|
||||
@@ -87,42 +89,57 @@ namespace FineUIPro.Web.HSSE.Meeting
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
string strSql = "SELECT ClassMeeting.ClassMeetingId,ClassMeeting.ProjectId,CodeRecords.Code AS ClassMeetingCode,Unit.UnitId,Unit.UnitName,TeamGroup.TeamGroupName,ClassMeeting.ClassMeetingName,ClassMeeting.ClassMeetingDate,ClassMeeting.CompileMan,ClassMeeting.ClassMeetingContents,ClassMeeting.CompileDate,ClassMeeting.States "
|
||||
+ @" ,(CASE WHEN ClassMeeting.States = " + BLL.Const.State_0 + " OR ClassMeeting.States IS NULL THEN '待['+ISNULL(OperateUser.UserName,Users.UserName)+']提交' WHEN ClassMeeting.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.UserName+']办理' END) AS FlowOperateName,Project.ProjectName"
|
||||
+ @" FROM Meeting_ClassMeeting AS ClassMeeting "
|
||||
+ @" LEFT JOIN Base_Project AS Project ON ClassMeeting.ProjectId = Project.ProjectId "
|
||||
+ @" LEFT JOIN Sys_CodeRecords AS CodeRecords ON ClassMeeting.ClassMeetingId = CodeRecords.DataId "
|
||||
+ @" LEFT JOIN Sys_FlowOperate AS FlowOperate ON ClassMeeting.ClassMeetingId = FlowOperate.DataId AND FlowOperate.IsClosed <> 1"
|
||||
+ @" LEFT JOIN Sys_User AS OperateUser ON FlowOperate.OperaterId=OperateUser.UserId"
|
||||
+ @" LEFT JOIN Sys_User AS Users ON ClassMeeting.CompileMan = Users.UserId"
|
||||
+ @" LEFT JOIN ProjectData_TeamGroup AS TeamGroup ON ClassMeeting.TeamGroupId = TeamGroup.TeamGroupId"
|
||||
+ @" LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=ClassMeeting.UnitId WHERE 1=1 ";
|
||||
StringBuilder sb = new StringBuilder(); //CodeRecords.Code AS ClassMeetingCode,
|
||||
sb.AppendFormat(
|
||||
"SELECT ClassMeeting.ClassMeetingId,ClassMeeting.ProjectId,ClassMeeting.ClassMeetingCode,Unit.UnitId,Unit.UnitName,ClassMeeting.ClassMeetingName,ClassMeeting.ClassMeetingDate,ClassMeeting.CompileMan,ClassMeeting.ClassMeetingContents,ClassMeeting.CompileDate,ClassMeeting.States,(CASE WHEN ClassMeeting.States ='{0}' OR ClassMeeting.States IS NULL THEN '待['+ISNULL(OperateUser.UserName,Users.UserName)+']提交' WHEN ClassMeeting.States = '{1}' THEN '审核/审批完成' ELSE '待['+OperateUser.UserName+']办理' END) AS FlowOperateName,ClassMeeting.Remark ",
|
||||
BLL.Const.State_0, BLL.Const.State_2);
|
||||
sb.Append("FROM Meeting_ClassMeeting AS ClassMeeting ");
|
||||
//sb.Append("LEFT JOIN Sys_CodeRecords AS CodeRecords ON ClassMeeting.ClassMeetingId = CodeRecords.DataId ");
|
||||
sb.Append(
|
||||
"LEFT JOIN Sys_FlowOperate AS FlowOperate ON ClassMeeting.ClassMeetingId = FlowOperate.DataId AND FlowOperate.IsClosed <> 1 ");
|
||||
sb.Append("LEFT JOIN Sys_User AS OperateUser ON FlowOperate.OperaterId=OperateUser.UserId ");
|
||||
sb.Append("LEFT JOIN Sys_User AS Users ON ClassMeeting.CompileMan = Users.UserId ");
|
||||
sb.Append("LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=ClassMeeting.UnitId "); //Users.UnitId
|
||||
sb.Append("WHERE 1=1 ");
|
||||
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
strSql += " AND ClassMeeting.ProjectId = @ProjectId";
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
|
||||
|
||||
if (this.drpUnitId.SelectedValue != null && this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
{
|
||||
strSql += " AND Unit.UnitId = @UnitId";
|
||||
sb.Append("AND ClassMeeting.ProjectId = @ProjectId ");
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
}
|
||||
|
||||
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
sb.Append("AND Unit.UnitId = @UnitId ");
|
||||
listStr.Add(new SqlParameter("@UnitId", this.drpUnitId.SelectedValue.Trim()));
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(this.txtClassMeetingCode.Text.Trim()))
|
||||
{
|
||||
strSql += " AND ClassMeetingCode LIKE @ClassMeetingCode";
|
||||
listStr.Add(new SqlParameter("@ClassMeetingCode", "%" + this.txtClassMeetingCode.Text.Trim() + "%"));
|
||||
sb.Append("AND ClassMeetingCode LIKE @ClassMeetingCode ");
|
||||
listStr.Add(new SqlParameter("@ClassMeetingCode",
|
||||
"%" + this.txtClassMeetingCode.Text.Trim() + "%"));
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(this.txtClassMeetingName.Text.Trim()))
|
||||
{
|
||||
strSql += " AND ClassMeetingName LIKE @ClassMeetingName";
|
||||
listStr.Add(new SqlParameter("@ClassMeetingName", "%" + this.txtClassMeetingName.Text.Trim() + "%"));
|
||||
sb.Append("AND ClassMeetingName LIKE @ClassMeetingName ");
|
||||
listStr.Add(new SqlParameter("@ClassMeetingName",
|
||||
"%" + this.txtClassMeetingName.Text.Trim() + "%"));
|
||||
}
|
||||
|
||||
if (this.rbSource.SelectedValue == "1")
|
||||
{
|
||||
sb.Append("AND ClassMeeting.Remark LIKE @Remark ");
|
||||
listStr.Add(new SqlParameter("@Remark", "%#%"));
|
||||
}
|
||||
strSql += " order by CodeRecords.SortIndex desc ";
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(sb.ToString(), parameter);
|
||||
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
@@ -344,5 +361,31 @@ namespace FineUIPro.Web.HSSE.Meeting
|
||||
string id = Grid1.SelectedRowID;
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ClassMeetingView.aspx?ClassMeetingId={0}", id, "查看 - ")));
|
||||
}
|
||||
|
||||
#region 分包会议数据推送至总包单位
|
||||
|
||||
/// <summary>
|
||||
/// 分包会议数据推送至总包单位
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnPush_Click(object sender, EventArgs e)
|
||||
{
|
||||
ReturnData responeData = APIMeetingSyncService.PushClassMeetingLists(this.ProjectId, string.Empty);
|
||||
//if (responeData.code == 0)
|
||||
//{
|
||||
// Alert.ShowInTop(responeData.message, MessageBoxIcon.Warning);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// ShowNotify(responeData.message, MessageBoxIcon.Success);
|
||||
//}
|
||||
//PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
ShowNotify(responeData.message, responeData.code == 0 ? MessageBoxIcon.Warning : MessageBoxIcon.Success);
|
||||
return;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -122,6 +122,15 @@ namespace FineUIPro.Web.HSSE.Meeting
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtClassMeetingName;
|
||||
|
||||
/// <summary>
|
||||
/// rbSource 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.RadioButtonList rbSource;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -65,7 +65,9 @@ namespace FineUIPro.Web.HSSE.Meeting
|
||||
{
|
||||
this.InitDropDownList();
|
||||
}
|
||||
this.txtClassMeetingCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.ClassMeetingId);
|
||||
this.txtClassMeetingCode.Text = classMeeting.ClassMeetingCode;
|
||||
//this.txtClassMeetingCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.ClassMeetingId);
|
||||
|
||||
this.txtClassMeetingName.Text = classMeeting.ClassMeetingName;
|
||||
this.txtClassMeetingDate.Text = string.Format("{0:yyyy-MM-dd}", classMeeting.ClassMeetingDate);
|
||||
if (!string.IsNullOrEmpty(classMeeting.CompileMan))
|
||||
@@ -123,6 +125,12 @@ namespace FineUIPro.Web.HSSE.Meeting
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.SaveData(BLL.Const.BtnSave);
|
||||
var porject = BLL.ProjectService.GetProjectByProjectId(this.ProjectId);
|
||||
if (!string.IsNullOrWhiteSpace(porject.SubjectUnit) && !string.IsNullOrWhiteSpace(porject.SubjectProject))
|
||||
{//项目关联了总包单位项目,保存成功后自动推送至总包单位
|
||||
APIMeetingSyncService.PushClassMeetingLists(this.ProjectId, this.ClassMeetingId);
|
||||
}
|
||||
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,9 @@ namespace FineUIPro.Web.HSSE.Meeting
|
||||
Model.Meeting_ClassMeeting classMeeting = BLL.ClassMeetingService.GetClassMeetingById(this.ClassMeetingId);
|
||||
if (classMeeting != null)
|
||||
{
|
||||
this.txtClassMeetingCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.ClassMeetingId);
|
||||
this.txtClassMeetingCode.Text = classMeeting.ClassMeetingCode;
|
||||
//this.txtClassMeetingCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.ClassMeetingId);
|
||||
|
||||
this.txtClassMeetingName.Text = classMeeting.ClassMeetingName;
|
||||
if (classMeeting.ClassMeetingDate != null)
|
||||
{
|
||||
|
||||
@@ -1053,6 +1053,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
this.Grid1.DataBind();
|
||||
}
|
||||
|
||||
var personList = new List<Model.SitePerson_Person>();
|
||||
|
||||
if (string.IsNullOrEmpty(errorInfos))
|
||||
{
|
||||
@@ -1147,6 +1148,8 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
getPerson.IsCardUsed = persons[i].IsCardUsedName == "是" ? true : false;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
personList.Add(getPerson);
|
||||
|
||||
}
|
||||
//Project_HSSEData_HSSEService.StatisticalData(this.CurrUser.LoginProjectId, Project_HSSEData_HSSEService.HSSEDateType.ProjectInformation);
|
||||
//Project_HSSEData_HSSEService.StatisticalData(this.CurrUser.LoginProjectId, Project_HSSEData_HSSEService.HSSEDateType.OfSafetySupervisors);
|
||||
@@ -1158,6 +1161,19 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
System.IO.File.Delete(filePath);//删除上传的XLS文件
|
||||
}
|
||||
ShowNotify("导入成功!", MessageBoxIcon.Success);
|
||||
var porject = BLL.ProjectService.GetProjectByProjectId(this.ProjectId);
|
||||
if (!string.IsNullOrWhiteSpace(porject.SubjectUnit) && !string.IsNullOrWhiteSpace(porject.SubjectProject))
|
||||
{
|
||||
if (personList.Count > 0)
|
||||
{
|
||||
foreach (var sitePersonPerson in personList)
|
||||
{
|
||||
//项目关联了总包单位项目,保存成功后自动推送至总包单位
|
||||
APIPersonSyncService.pushPersonLists(this.ProjectId, sitePersonPerson.PersonId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
else
|
||||
|
||||
@@ -83,8 +83,8 @@
|
||||
<f:TextBox ID="txtUnitName" runat="server" Label="所属单位" LabelAlign="Right"
|
||||
Readonly="true" LabelWidth="110px"></f:TextBox>
|
||||
|
||||
<f:DropDownBox runat="server" Label="单位工程" ShowRedStar="true" LabelAlign="Right" LabelWidth="110px"
|
||||
Required="true" ID="txtWorkArea" EmptyText="--请选择--" EnableMultiSelect="true" MatchFieldWidth="true">
|
||||
<f:DropDownBox runat="server" Label="单位工程" LabelAlign="Right" LabelWidth="110px"
|
||||
ID="txtWorkArea" EmptyText="--请选择--" EnableMultiSelect="true" MatchFieldWidth="true">
|
||||
<PopPanel>
|
||||
<f:Grid ID="gvWorkArea" DataIDField="UnitWorkId"
|
||||
EnableMultiSelect="true" KeepCurrentSelection="true" Height="300px" Hidden="true" SortField="UnitWorkId" DataTextField="UnitWorkName"
|
||||
|
||||
@@ -359,6 +359,14 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
return;
|
||||
}
|
||||
SaveData();
|
||||
#region 推送至总包单位
|
||||
var porject = BLL.ProjectService.GetProjectByProjectId(this.ProjectId);
|
||||
if (!string.IsNullOrWhiteSpace(porject.SubjectUnit) && !string.IsNullOrWhiteSpace(porject.SubjectProject))
|
||||
{
|
||||
//项目关联了总包单位项目,保存成功后自动推送至总包单位
|
||||
APIPersonSyncService.pushPersonLists(this.ProjectId, this.PersonId);
|
||||
}
|
||||
#endregion
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TemporaryElectricity.aspx.cs" Inherits="FineUIPro.Web.HSSE.Solution.TemporaryElectricity" %>
|
||||
|
||||
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title></title>
|
||||
<style type="text/css">
|
||||
.f-grid-colheader-text {
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||||
<Items>
|
||||
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
|
||||
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
|
||||
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
|
||||
<Items>
|
||||
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true" BodyPadding="0px">
|
||||
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
|
||||
</f:ContentPanel>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
|
||||
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" AutoScroll="true">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" EnableAjax="false" ShowHeader="false" Title="临时用电方案" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="TemporaryElectricityId" AllowCellEditing="true"
|
||||
ClicksToEdit="2" DataIDField="TemporaryElectricityId" AllowSorting="true" SortField="CompileDate"
|
||||
SortDirection="DESC" EnableColumnLines="true" ForceFit="true"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnRowCommand="Grid1_RowCommand"
|
||||
EnableRowDoubleClickEvent="true" AllowFilters="true" EnableTextSelection="True" OnRowDoubleClick="Grid1_RowDoubleClick" OnPageIndexChange="Grid1_PageIndexChange">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnNew" Icon="Add" EnablePostBack="true" Hidden="true" Text="新增"
|
||||
runat="server">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:TemplateField ColumnID="tfPageIndex" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
|
||||
EnableLock="true" Locked="False">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblPageIndex" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="140px" ColumnID="Code" DataField="Code" FieldType="String" HeaderText="编号" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="280px" ColumnID="Name" DataField="Name" FieldType="String" HeaderText="方案名称" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="380px" ColumnID="Content" DataField="Content" FieldType="String" HeaderText="内容" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="220px" ColumnID="Remark" DataField="Remark" FieldType="String" HeaderText="备注" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="UserName" DataField="UserName" FieldType="String" HeaderText="编制人" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="95px" ColumnID="CompileDate" DataField="CompileDate" SortField="CompileDate"
|
||||
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="编制日期" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:LinkButtonField HeaderText="附件" ColumnID="download" Width="60px" Icon="ArrowDown" CommandName="download" TextAlign="Center" HeaderTextAlign="Center" />
|
||||
</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:ListItem Text="10" Value="10" />
|
||||
<f:ListItem Text="15" Value="15" />
|
||||
<f:ListItem Text="20" Value="20" />
|
||||
<f:ListItem Text="25" Value="25" />
|
||||
<f:ListItem Text="所有行" Value="100000" />
|
||||
</f:DropDownList>
|
||||
<f:ToolbarFill runat="server">
|
||||
</f:ToolbarFill>
|
||||
</PageItems>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</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="900px" Height="600px">
|
||||
</f:Window>
|
||||
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
|
||||
Height="500px">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<Items>
|
||||
<f:MenuButton ID="btnMenuModify" EnablePostBack="true" runat="server" Text="修改" Icon="Pencil" OnClick="btnMenuModify_Click" Hidden="true">
|
||||
</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" Icon="Delete" Text="删除" ConfirmText="确定删除当前数据?"
|
||||
OnClick="btnMenuDel_Click" Hidden="true">
|
||||
</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,240 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.Solution
|
||||
{
|
||||
public partial class TemporaryElectricity : PageBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 项目id
|
||||
/// </summary>
|
||||
public string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ProjectId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
|
||||
{
|
||||
this.ProjectId = Request.Params["projectId"];
|
||||
}
|
||||
|
||||
this.ucTree.UnitId = this.CurrUser.UnitId;
|
||||
this.ucTree.ProjectId = this.ProjectId;
|
||||
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId) )
|
||||
{
|
||||
this.panelLeftRegion.Hidden = true;
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
}
|
||||
btnNew.OnClientClick = Window1.GetShowReference("TemporaryElectricityEdit.aspx") + "return false;";
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 公司级树加载
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void changeTree(object sender, EventArgs e)
|
||||
{
|
||||
this.ProjectId = this.ucTree.ProjectId;
|
||||
this.GetButtonPower();
|
||||
|
||||
this.BindGrid();
|
||||
}
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
|
||||
public void BindGrid()
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
DataTable tb = ChecklistData();
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
protected DataTable ChecklistData()
|
||||
{
|
||||
string strSql = @"select C.*,p.UserName from [dbo].[Solution_TemporaryElectricity] C left join Sys_User p on p.UserId=C.CompileMan
|
||||
where 1=1";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
strSql += " AND C.ProjectId = @ProjectId";
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
return tb;
|
||||
}
|
||||
/// <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();
|
||||
}
|
||||
//右键编辑
|
||||
protected void btnMenuModify_Click(object sender, EventArgs e)
|
||||
{
|
||||
EditData();
|
||||
}
|
||||
//双击编辑
|
||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
EditData();
|
||||
}
|
||||
//分页
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
/// <summary>
|
||||
/// 编辑数据方法
|
||||
/// </summary>
|
||||
private void EditData()
|
||||
{
|
||||
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TemporaryElectricityEdit.aspx?TemporaryElectricityId={0}", Grid1.SelectedRowID, "编辑 - ")));
|
||||
|
||||
}
|
||||
//右键查看
|
||||
protected void btnMenuView_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TemporaryElectricityView.aspx?TemporaryElectricityId={0}", Grid1.SelectedRowID, "查看 - ")));
|
||||
}
|
||||
//右键删除
|
||||
protected void btnMenuDel_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length > 0)
|
||||
{
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
////删除附件表
|
||||
BLL.CommonService.DeleteAttachFileById(rowID);
|
||||
BLL.TemporaryElectricityService.DeleteTemporaryElectricityById(rowID);
|
||||
}
|
||||
|
||||
BindGrid();
|
||||
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 搜索
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSearch_Click(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
/// <summary>
|
||||
/// 重置
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnRset_Click(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
#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.ProjectTemporaryElectricityListMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
{
|
||||
this.btnNew.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||
{
|
||||
this.btnMenuModify.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnDelete))
|
||||
{
|
||||
this.btnMenuDel.Hidden = false;
|
||||
}
|
||||
}
|
||||
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
{
|
||||
btnNew.Hidden = true;
|
||||
btnMenuModify.Hidden = true;
|
||||
btnMenuDel.Hidden = true;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
|
||||
{
|
||||
object[] keys = Grid1.DataKeys[e.RowIndex];
|
||||
string fileId = string.Empty;
|
||||
if (keys == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
fileId = keys[0].ToString();
|
||||
}
|
||||
if (e.CommandName.Equals("download"))
|
||||
{
|
||||
string menuId = Const.ProjectTemporaryElectricityListMenuId;
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(
|
||||
String.Format("../../AttachFile/webuploader.aspx?type=-1&source=1&toKeyId={0}&path=FileUpload/TemporaryElectricity&menuId={1}", fileId, menuId)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,197 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HSSE.Solution
|
||||
{
|
||||
|
||||
|
||||
public partial class TemporaryElectricity
|
||||
{
|
||||
|
||||
/// <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>
|
||||
/// panelLeftRegion 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelLeftRegion;
|
||||
|
||||
/// <summary>
|
||||
/// ContentPanel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ContentPanel ContentPanel1;
|
||||
|
||||
/// <summary>
|
||||
/// ucTree 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
|
||||
|
||||
/// <summary>
|
||||
/// panelCenterRegion 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelCenterRegion;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// btnNew 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
/// <summary>
|
||||
/// lblPageIndex 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblPageIndex;
|
||||
|
||||
/// <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>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window WindowAtt;
|
||||
|
||||
/// <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,102 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TemporaryElectricityEdit.aspx.cs" Inherits="FineUIPro.Web.HSSE.Solution.TemporaryElectricityEdit" %>
|
||||
|
||||
<!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" />
|
||||
<script src="../../Controls/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
|
||||
<style type="text/css">
|
||||
.labcenter {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.f-grid-row .f-grid-cell-inner {
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
</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:ContentPanel ID="ContentPanel2" Title="临时用电方案" ShowBorder="true"
|
||||
BodyPadding="10px" EnableCollapse="true" ShowHeader="false" AutoScroll="true"
|
||||
runat="server">
|
||||
<f:Form ID="Form2" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtCode" runat="server" Required="true" ShowRedStar="true" Label="编号" LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtName" runat="server" Required="true" ShowRedStar="true" Label="方案名称" LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtContent" runat="server" Label="内容" MaxLength="200" Height="120px" LabelAlign="Right">
|
||||
</f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtRemark" runat="server" Label="备注" MaxLength="500" Height="100px" LabelAlign="Right">
|
||||
</f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtCompileMan" runat="server" Readonly="true" Label="编制人" LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DatePicker ID="txtCompileDate" ShowRedStar="true" Required="true" runat="server" Label="编制日期" LabelAlign="Right" EnableEdit="true">
|
||||
</f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</f:ContentPanel>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:Label runat="server" ID="lbTemp">
|
||||
</f:Label>
|
||||
<f:Button ID="imgBtnFile" Text="文件" ToolTip="上传及查看" Icon="TableCell" runat="server" OnClick="imgBtnFile_Click">
|
||||
</f:Button>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" OnClick="btnSave_Click" runat="server" ToolTip="保存" Text="保存" ValidateForms="SimpleForm1">
|
||||
</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="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" OnClose="WindowAtt_Close" runat="server" IsModal="true" Width="700px"
|
||||
Height="550px">
|
||||
</f:Window>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,119 @@
|
||||
using BLL;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.UI.WebControls;
|
||||
using AspNet = System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.Solution
|
||||
{
|
||||
public partial class TemporaryElectricityEdit : PageBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
public string TemporaryElectricityId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["TemporaryElectricityId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["TemporaryElectricityId"] = value;
|
||||
}
|
||||
}
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
TemporaryElectricityId = Request.Params["TemporaryElectricityId"];
|
||||
if (!string.IsNullOrEmpty(TemporaryElectricityId))
|
||||
{
|
||||
hdId.Text = this.TemporaryElectricityId;
|
||||
Model.Solution_TemporaryElectricity TemporaryElectricity = BLL.TemporaryElectricityService.GetTemporaryElectricityByTemporaryElectricityId(TemporaryElectricityId);
|
||||
this.txtCode.Text = TemporaryElectricity.Code;
|
||||
this.txtName.Text = TemporaryElectricity.Name;
|
||||
this.txtContent.Text = TemporaryElectricity.Content;
|
||||
this.txtRemark.Text = TemporaryElectricity.Remark;
|
||||
if (!string.IsNullOrEmpty(TemporaryElectricity.CompileMan))
|
||||
{
|
||||
this.txtCompileMan.Text = UserService.GetUserNameByUserId(TemporaryElectricity.CompileMan);
|
||||
}
|
||||
if (TemporaryElectricity.CompileDate != null)
|
||||
{
|
||||
txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", TemporaryElectricity.CompileDate);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.txtCompileMan.Text = this.CurrUser.UserName;
|
||||
txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void Grid1_Sort(object sender, GridSortEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected void WindowAtt_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected void imgBtnFile_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(hdId.Text))
|
||||
{
|
||||
hdId.Text = SQLHelper.GetNewID();
|
||||
}
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=1&toKeyId={0}&path=FileUpload/TemporaryElectricity&menuId={1}", hdId.Text, BLL.Const.ProjectTemporaryElectricityListMenuId)));
|
||||
}
|
||||
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
Saveinspection("save");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存
|
||||
/// </summary>
|
||||
public void Saveinspection(string saveType)
|
||||
{
|
||||
Model.Solution_TemporaryElectricity TemporaryElectricity = new Model.Solution_TemporaryElectricity();
|
||||
TemporaryElectricity.ProjectId = this.CurrUser.LoginProjectId;
|
||||
TemporaryElectricity.Code = this.txtCode.Text.Trim();
|
||||
TemporaryElectricity.Name = this.txtName.Text.Trim();
|
||||
TemporaryElectricity.Content = this.txtContent.Text.Trim();
|
||||
TemporaryElectricity.Remark = this.txtRemark.Text.Trim();
|
||||
TemporaryElectricity.CompileMan = this.CurrUser.UserId;
|
||||
TemporaryElectricity.CompileDate = Funs.GetNewDateTime(this.txtCompileDate.Text.Trim());
|
||||
if (!string.IsNullOrEmpty(this.TemporaryElectricityId))
|
||||
{
|
||||
TemporaryElectricity.TemporaryElectricityId = this.TemporaryElectricityId;
|
||||
TemporaryElectricityService.UpdateTemporaryElectricity(TemporaryElectricity);
|
||||
LogService.AddSys_Log(CurrUser, TemporaryElectricity.Code, TemporaryElectricity.TemporaryElectricityId, Const.ProjectTemporaryElectricityListMenuId, "修改临时用电方案");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrEmpty(hdId.Text))
|
||||
{
|
||||
TemporaryElectricity.TemporaryElectricityId = SQLHelper.GetNewID();
|
||||
TemporaryElectricityId = TemporaryElectricity.TemporaryElectricityId;
|
||||
}
|
||||
else
|
||||
{
|
||||
TemporaryElectricity.TemporaryElectricityId = hdId.Text;
|
||||
}
|
||||
TemporaryElectricityService.AddTemporaryElectricity(TemporaryElectricity);
|
||||
LogService.AddSys_Log(CurrUser, TemporaryElectricity.Code, TemporaryElectricity.TemporaryElectricityId, Const.ProjectTemporaryElectricityListMenuId, "增加临时用电方案");
|
||||
}
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
}
|
||||
}
|
||||
+188
@@ -0,0 +1,188 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HSSE.Solution
|
||||
{
|
||||
|
||||
|
||||
public partial class TemporaryElectricityEdit
|
||||
{
|
||||
|
||||
/// <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>
|
||||
/// ContentPanel2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ContentPanel ContentPanel2;
|
||||
|
||||
/// <summary>
|
||||
/// Form2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form Form2;
|
||||
|
||||
/// <summary>
|
||||
/// txtCode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCode;
|
||||
|
||||
/// <summary>
|
||||
/// txtName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtName;
|
||||
|
||||
/// <summary>
|
||||
/// txtContent 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtContent;
|
||||
|
||||
/// <summary>
|
||||
/// txtRemark 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtRemark;
|
||||
|
||||
/// <summary>
|
||||
/// txtCompileMan 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCompileMan;
|
||||
|
||||
/// <summary>
|
||||
/// txtCompileDate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtCompileDate;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// lbTemp 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbTemp;
|
||||
|
||||
/// <summary>
|
||||
/// imgBtnFile 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button imgBtnFile;
|
||||
|
||||
/// <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>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window WindowAtt;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TemporaryElectricityView.aspx.cs" Inherits="FineUIPro.Web.HSSE.Solution.TemporaryElectricityView" %>
|
||||
|
||||
<!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" />
|
||||
<script src="../../Controls/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
|
||||
<style type="text/css">
|
||||
.labcenter {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.f-grid-row .f-grid-cell-inner {
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
</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:ContentPanel ID="ContentPanel2" Title="临时用电方案" ShowBorder="true"
|
||||
BodyPadding="10px" EnableCollapse="true" ShowHeader="false" AutoScroll="true"
|
||||
runat="server">
|
||||
<f:Form ID="Form2" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtCode" runat="server" Readonly="true" Required="true" ShowRedStar="true" Label="编号" LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtName" runat="server" Readonly="true" Required="true" ShowRedStar="true" Label="名称" LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtContent" runat="server" Readonly="true" Label="内容" MaxLength="200" Height="100px" LabelAlign="Right">
|
||||
</f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtRemark" runat="server" Readonly="true" Label="备注" MaxLength="500" Height="80px" LabelAlign="Right">
|
||||
</f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtCompileMan" runat="server" Readonly="true" Label="编制人" LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DatePicker ID="txtCompileDate" ShowRedStar="true" Required="true" Readonly="true" runat="server" Label="编制日期" LabelAlign="Right" EnableEdit="true">
|
||||
</f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</f:ContentPanel>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:Label runat="server" ID="lbTemp">
|
||||
</f:Label>
|
||||
<f:Button ID="imgBtnFile" Text="文件" ToolTip="上传及查看" Icon="TableCell" runat="server" OnClick="imgBtnFile_Click">
|
||||
</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="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" OnClose="WindowAtt_Close" runat="server" IsModal="true" Width="700px"
|
||||
Height="550px">
|
||||
</f:Window>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,78 @@
|
||||
using BLL;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.UI.WebControls;
|
||||
using AspNet = System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.Solution
|
||||
{
|
||||
public partial class TemporaryElectricityView : PageBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
public string TemporaryElectricityId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["TemporaryElectricityId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["TemporaryElectricityId"] = value;
|
||||
}
|
||||
}
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
TemporaryElectricityId = Request.Params["TemporaryElectricityId"];
|
||||
if (!string.IsNullOrEmpty(TemporaryElectricityId))
|
||||
{
|
||||
hdId.Text = this.TemporaryElectricityId;
|
||||
Model.Solution_TemporaryElectricity TemporaryElectricity = BLL.TemporaryElectricityService.GetTemporaryElectricityByTemporaryElectricityId(TemporaryElectricityId);
|
||||
this.txtCode.Text = TemporaryElectricity.Code;
|
||||
this.txtName.Text = TemporaryElectricity.Name;
|
||||
this.txtContent.Text = TemporaryElectricity.Content;
|
||||
this.txtRemark.Text = TemporaryElectricity.Remark;
|
||||
if (!string.IsNullOrEmpty(TemporaryElectricity.CompileMan))
|
||||
{
|
||||
this.txtCompileMan.Text = UserService.GetUserNameByUserId(TemporaryElectricity.CompileMan);
|
||||
}
|
||||
if (TemporaryElectricity.CompileDate != null)
|
||||
{
|
||||
txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", TemporaryElectricity.CompileDate);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.txtCompileMan.Text = this.CurrUser.UserName;
|
||||
txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void Grid1_Sort(object sender, GridSortEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected void WindowAtt_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected void imgBtnFile_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(hdId.Text))
|
||||
{
|
||||
hdId.Text = SQLHelper.GetNewID();
|
||||
}
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/TemporaryElectricity&menuId={1}", hdId.Text, BLL.Const.ProjectTemporaryElectricityListMenuId)));
|
||||
}
|
||||
}
|
||||
}
|
||||
+179
@@ -0,0 +1,179 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HSSE.Solution
|
||||
{
|
||||
|
||||
|
||||
public partial class TemporaryElectricityView
|
||||
{
|
||||
|
||||
/// <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>
|
||||
/// ContentPanel2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ContentPanel ContentPanel2;
|
||||
|
||||
/// <summary>
|
||||
/// Form2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form Form2;
|
||||
|
||||
/// <summary>
|
||||
/// txtCode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCode;
|
||||
|
||||
/// <summary>
|
||||
/// txtName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtName;
|
||||
|
||||
/// <summary>
|
||||
/// txtContent 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtContent;
|
||||
|
||||
/// <summary>
|
||||
/// txtRemark 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtRemark;
|
||||
|
||||
/// <summary>
|
||||
/// txtCompileMan 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCompileMan;
|
||||
|
||||
/// <summary>
|
||||
/// txtCompileDate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtCompileDate;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// lbTemp 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbTemp;
|
||||
|
||||
/// <summary>
|
||||
/// imgBtnFile 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button imgBtnFile;
|
||||
|
||||
/// <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>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window WindowAtt;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user