This commit is contained in:
2026-03-06 17:58:48 +08:00
parent 393e451064
commit adedb7e83d
102 changed files with 13691 additions and 271 deletions
@@ -74,6 +74,8 @@
<f:Button ID="btnNew" Text="新增" Icon="Add" EnablePostBack="false" runat="server"
Hidden="true">
</f:Button>
<f:Button ID="btnPull" runat="server" OnClick="btnPull_Click" ToolTip="获取" Text="获取">
</f:Button>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" Icon="FolderUp"
EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button>
@@ -533,5 +533,18 @@ namespace FineUIPro.Web.HSSE.Check
File.Delete(pdfUrl);
}
#endregion
#region
/// <summary>
/// 拉取总包检查
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnPull_Click(object sender, EventArgs e)
{
APICheckSpecialSyncService.getCheckSpecialLists();
this.BindGrid();
}
#endregion
}
}
@@ -120,6 +120,15 @@ namespace FineUIPro.Web.HSSE.Check {
/// </remarks>
protected global::FineUIPro.Button btnNew;
/// <summary>
/// btnPull 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnPull;
/// <summary>
/// btnOut 控件。
/// </summary>
@@ -60,10 +60,17 @@
<f:DropDownList ID="drpStates" runat="server" Label="状态" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged"
LabelWidth="70px" LabelAlign="Right" Width="170px">
</f:DropDownList>
<%--<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:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:HiddenField runat="server" ID="hdRemark">
</f:HiddenField>
<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="编制" Hidden="true">
</f:Button>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp"
@@ -145,7 +152,13 @@
</f:TemplateField> --%>
<f:RenderField Width="90px" ColumnID="StatesStr" DataField="StatesStr" SortField="StatesStr"
FieldType="String" HeaderText="状态" HeaderTextAlign="Center" TextAlign="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>--%>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
@@ -183,6 +183,15 @@ namespace FineUIPro.Web.HSSE.HiddenInspection {
/// </remarks>
protected global::FineUIPro.HiddenField hdRemark;
/// <summary>
/// btnPull 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnPull;
/// <summary>
/// btnNew 控件。
/// </summary>
@@ -36,6 +36,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" Text="新增" Icon="Add" EnablePostBack="false" Hidden="true"
@@ -84,6 +95,9 @@
SortField="FlowOperateName" 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" />--%>
@@ -44,7 +44,7 @@ namespace FineUIPro.Web.HSSE.License
{
this.ProjectId = Request.Params["projectId"];
}
Funs.FineUIPleaseSelect(this.drpStates);
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
BLL.LicenseTypeService.InitLicenseTypeDropDownList(this.drpLicenseType, true);
@@ -65,7 +65,7 @@ namespace FineUIPro.Web.HSSE.License
private void BindGrid()
{
string strSql = "SELECT LicenseManager.LicenseManagerId,LicenseManager.ProjectId,LicenseManager.LicenseTypeId,CodeRecords.Code AS LicenseManagerCode,LicenseManager.LicenseManageName,LicenseManager.UnitId,LicenseManager.LicenseManageContents,LicenseManager.CompileMan,LicenseManager.CompileDate,LicenseManager.States,LicenseManager.ProjectCode,LicenseManager.ProjectName,LicenseManager.LicenseTypeName,LicenseManager.UnitName,LicenseManager.PersonName,LicenseManager.WorkAreaName,LicenseManager.StartDate,LicenseManager.EndDate"
+ @" ,(CASE WHEN LicenseManager.States = " + BLL.Const.State_0 + " OR LicenseManager.States IS NULL THEN '待['+OperatePerson.PersonName+']提交' WHEN LicenseManager.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperatePerson.PersonName+']办理' END) AS FlowOperateName"
+ @" ,(CASE WHEN LicenseManager.States = " + BLL.Const.State_0 + " OR LicenseManager.States IS NULL THEN '待['+OperatePerson.PersonName+']提交' WHEN LicenseManager.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperatePerson.PersonName+']办理' END) AS FlowOperateName,LicenseManager.SourceDes"
+ @" 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"
@@ -88,7 +88,16 @@ namespace FineUIPro.Web.HSSE.License
strSql += " AND LicenseManager.UnitId = @UnitId"; ///状态为已完成
listStr.Add(new SqlParameter("@UnitId", this.CurrUser.UnitId));
}
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.States = @States";
listStr.Add(new SqlParameter("@States", this.drpStates.SelectedValue));
}
DateTime? startDate = Funs.GetNewDateTime(this.txtStartDate.Text);
if (!string.IsNullOrEmpty(this.txtStartDate.Text))
{
@@ -102,6 +102,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>
@@ -79,6 +79,9 @@
<f:Button ID="btnAttachUrl" Text="附件" ToolTip="附件上传及查看" Icon="TableCell" runat="server"
OnClick="btnAttachUrl_Click" ValidateForms="SimpleForm1">
</f:Button>
<f:Button ID="btnAttachUrlGB" Text="关闭附件" ToolTip="附件上传及查看" Icon="TableCell" runat="server"
OnClick="btnAttachUrlGB_Click" ValidateForms="SimpleForm1">
</f:Button>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ValidateForms="SimpleForm1"
@@ -127,6 +127,11 @@ 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());
}
@@ -245,6 +250,21 @@ namespace FineUIPro.Web.HSSE.License
}
#endregion
/// <summary>
/// 上传附件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAttachUrlGB_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(this.LicenseManagerId))
{
this.SaveData(BLL.Const.BtnSave);
}
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/LicenseManagerAttachUrl&menuId={1}", LicenseManagerId + "_GB", BLL.Const.ProjectLicenseManagerMenuId)));
}
#region
/// <summary>
/// 单位选择事件
@@ -174,6 +174,15 @@ namespace FineUIPro.Web.HSSE.License {
/// </remarks>
protected global::FineUIPro.Button btnAttachUrl;
/// <summary>
/// btnAttachUrlGB 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAttachUrlGB;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
@@ -70,6 +70,9 @@
<f:Button ID="btnAttachUrl" Text="附件" ToolTip="附件上传及查看" Icon="TableCell" runat="server"
OnClick="btnAttachUrl_Click" ValidateForms="SimpleForm1">
</f:Button>
<f:Button ID="btnAttachUrlGB" Text="关闭附件" ToolTip="附件上传及查看" Icon="TableCell" runat="server"
OnClick="btnAttachUrlGB_Click" ValidateForms="SimpleForm1">
</f:Button>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnClose" EnablePostBack="false" Text="关闭" runat="server" Icon="SystemClose">
@@ -100,6 +100,19 @@ namespace FineUIPro.Web.HSSE.License
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/LicenseManagerAttachUrl&menuId={1}&type=-1", LicenseManagerId, BLL.Const.ProjectLicenseManagerMenuId)));
}
}
/// <summary>
/// 上传关闭附件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAttachUrlGB_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(this.LicenseManagerId))
{
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/LicenseManagerAttachUrl&menuId={1}&type=-1", LicenseManagerId + "_GB", BLL.Const.ProjectLicenseManagerMenuId)));
}
}
#endregion
}
}
@@ -174,6 +174,15 @@ namespace FineUIPro.Web.HSSE.License {
/// </remarks>
protected global::FineUIPro.Button btnAttachUrl;
/// <summary>
/// btnAttachUrlGB 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAttachUrlGB;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
@@ -31,8 +31,14 @@
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="250px" LabelWidth="80px"
LabelAlign="right">
</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" Text="新增" Icon="Add" EnablePostBack="false" Hidden="true"
runat="server">
</f:Button>
@@ -74,6 +80,9 @@
SortField="FlowOperateName" FieldType="String" HeaderText="状态" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="140px" ColumnID="Remark" DataField="Remark" FieldType="String" HeaderText="备注" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
@@ -1,4 +1,5 @@
using BLL;
using Model;
using System;
using System.Collections.Generic;
using System.Data;
@@ -60,7 +61,7 @@ namespace FineUIPro.Web.HSSE.Meeting
private void BindGrid()
{
string strSql = "SELECT ClassMeeting.ClassMeetingId,ClassMeeting.ProjectId,CodeRecords.Code AS ClassMeetingCode,Unit.UnitId,Unit.UnitName,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.PersonName,Users.PersonName)+']提交' WHEN ClassMeeting.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.PersonName+']办理' END) AS FlowOperateName"
+ @" ,(CASE WHEN ClassMeeting.States = " + BLL.Const.State_0 + " OR ClassMeeting.States IS NULL THEN '待['+ISNULL(OperateUser.PersonName,Users.PersonName)+']提交' WHEN ClassMeeting.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.PersonName+']办理' END) AS FlowOperateName,ClassMeeting.Remark"
+ @" FROM Meeting_ClassMeeting AS ClassMeeting "
+ @" 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"
@@ -85,6 +86,11 @@ namespace FineUIPro.Web.HSSE.Meeting
strSql += " AND ClassMeetingName LIKE @ClassMeetingName";
listStr.Add(new SqlParameter("@ClassMeetingName", "%" + this.txtClassMeetingName.Text.Trim() + "%"));
}
if (this.rbSource.SelectedValue == "1")
{
strSql += " AND ClassMeeting.Remark LIKE @Remark ";
listStr.Add(new SqlParameter("@Remark", "%#%"));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
@@ -294,5 +300,31 @@ namespace FineUIPro.Web.HSSE.Meeting
Response.End();
}
#endregion
#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
}
}
@@ -84,6 +84,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>
@@ -128,6 +128,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());
}
@@ -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.PersonId, 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 = Person_PersonsService.GetPersonsNameById(TemporaryElectricity.CompileMan);
}
if (TemporaryElectricity.CompileDate != null)
{
txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", TemporaryElectricity.CompileDate);
}
}
else
{
this.txtCompileMan.Text = this.CurrUser.PersonName;
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.PersonId;
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());
}
}
}
@@ -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 = Person_PersonsService.GetPersonsNameById(TemporaryElectricity.CompileMan);
}
if (TemporaryElectricity.CompileDate != null)
{
txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", TemporaryElectricity.CompileDate);
}
}
else
{
this.txtCompileMan.Text = this.CurrUser.PersonName;
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)));
}
}
}
@@ -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;
}
}