Merge branch 'master' of http://47.104.102.122:3000/panhf/CNCEC_SUBQHSE_WUHUAN
This commit is contained in:
commit
1c14fbc61b
|
@ -33,3 +33,4 @@
|
|||
/SGGL/FineUIPro.Web/FileUpload/Solution/2024-02
|
||||
/SGGL/FineUIPro.Web/FileUpload/Solution/2024-03
|
||||
/SGGL/FineUIPro.Web/FileUpload/TestRun/TestRunMonthSummary/2024-03
|
||||
/SGGL/FineUIPro.Web/FileUpload/TestRun/TestRunMonthSummary/2024-04
|
||||
|
|
|
@ -0,0 +1,76 @@
|
|||
|
||||
insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
values('CFD19410-DF80-494A-A2DD-D23A03438742','培训记录','CQMS/Comprehensive/TrainingRecords.aspx',105,'4a0e62cb-ee50-4a14-80b7-377602e9902c','Menu_CQMS',0,1,1)
|
||||
go
|
||||
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
values('5FE760BC-6496-42C2-8091-F9704DF0CCD2','CFD19410-DF80-494A-A2DD-D23A03438742','增加',1)
|
||||
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
values('93B46D7D-AAE0-4D27-A7D6-0A3DE875DAC3','CFD19410-DF80-494A-A2DD-D23A03438742','修改',2)
|
||||
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
values('7FC2CA0A-9D93-45BE-8A17-0FB17A644496','CFD19410-DF80-494A-A2DD-D23A03438742','删除',3)
|
||||
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
values('7F3CF7C1-9916-4F12-BBB6-CA892EDDD351','CFD19410-DF80-494A-A2DD-D23A03438742','保存',4)
|
||||
go
|
||||
|
||||
CREATE TABLE [dbo].[Comprehensive_TrainingRecords](
|
||||
[TrainingRecordsId] [nvarchar](50) NOT NULL,
|
||||
[ProjectId] [nvarchar](50) NULL,
|
||||
[TrainingContents] [nvarchar](100) NULL,
|
||||
[CNProfessionalId] [nvarchar](50) NULL,
|
||||
[TrainingObject] [nvarchar](50) NULL,
|
||||
[TrainingAddress] [nvarchar](50) NULL,
|
||||
[Hours] [decimal](18, 1) NULL,
|
||||
[KeynoteSpeaker] [nvarchar](50) NULL,
|
||||
[Remark] [nvarchar](50) NULL,
|
||||
CONSTRAINT [PK_Comprehensive_TrainingRecords] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[TrainingRecordsId] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[Comprehensive_TrainingRecords] WITH CHECK ADD CONSTRAINT [FK_Comprehensive_TrainingRecords_Base_CNProfessional] FOREIGN KEY([CNProfessionalId])
|
||||
REFERENCES [dbo].[Base_CNProfessional] ([CNProfessionalId])
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[Comprehensive_TrainingRecords] CHECK CONSTRAINT [FK_Comprehensive_TrainingRecords_Base_CNProfessional]
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[Comprehensive_TrainingRecords] WITH CHECK ADD CONSTRAINT [FK_Comprehensive_TrainingRecords_Base_Project] FOREIGN KEY([ProjectId])
|
||||
REFERENCES [dbo].[Base_Project] ([ProjectId])
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[Comprehensive_TrainingRecords] CHECK CONSTRAINT [FK_Comprehensive_TrainingRecords_Base_Project]
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_TrainingRecords', @level2type=N'COLUMN',@level2name=N'TrainingRecordsId'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_TrainingRecords', @level2type=N'COLUMN',@level2name=N'ProjectId'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'培训内容' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_TrainingRecords', @level2type=N'COLUMN',@level2name=N'TrainingContents'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'专业' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_TrainingRecords', @level2type=N'COLUMN',@level2name=N'CNProfessionalId'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'培训对象' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_TrainingRecords', @level2type=N'COLUMN',@level2name=N'TrainingObject'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'培训地址' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_TrainingRecords', @level2type=N'COLUMN',@level2name=N'TrainingAddress'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'课时(时)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_TrainingRecords', @level2type=N'COLUMN',@level2name=N'Hours'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主讲人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_TrainingRecords', @level2type=N'COLUMN',@level2name=N'KeynoteSpeaker'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_TrainingRecords', @level2type=N'COLUMN',@level2name=N'Remark'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'培训表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_TrainingRecords'
|
||||
GO
|
||||
|
||||
|
|
@ -246,6 +246,7 @@
|
|||
<Compile Include="CQMS\Check\SpotCheckService.cs" />
|
||||
<Compile Include="CQMS\Check\TechnicalContactListApproveService.cs" />
|
||||
<Compile Include="CQMS\Check\TechnicalContactListService.cs" />
|
||||
<Compile Include="CQMS\Comprehensive\TrainingRecordsService.cs" />
|
||||
<Compile Include="CQMS\DataBase\ConstructionStandardListProjectService.cs" />
|
||||
<Compile Include="CQMS\DataBase\ConstructionStandardListService.cs" />
|
||||
<Compile Include="CQMS\DataBase\DataTypeProjectService.cs" />
|
||||
|
|
|
@ -0,0 +1,91 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 培训记录
|
||||
/// </summary>
|
||||
public class TrainingRecordsService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取培训记录
|
||||
/// </summary>
|
||||
/// <param name="trainingRecordsId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Comprehensive_TrainingRecords GetTrainingRecordsById(string trainingRecordsId)
|
||||
{
|
||||
return Funs.DB.Comprehensive_TrainingRecords.FirstOrDefault(e => e.TrainingRecordsId == trainingRecordsId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据培训内容、专业获取培训记录
|
||||
/// </summary>
|
||||
/// <param name="trainingContents"></param>
|
||||
/// <param name="cNProfessionalId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Comprehensive_TrainingRecords GetTrainingRecordsByName(string trainingContents, string cNProfessionalId)
|
||||
{
|
||||
return Funs.DB.Comprehensive_TrainingRecords.FirstOrDefault(e => e.TrainingContents == trainingContents && e.CNProfessionalId == cNProfessionalId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加培训记录
|
||||
/// </summary>
|
||||
/// <param name="trainingRecords"></param>
|
||||
public static void AddTrainingRecords(Model.Comprehensive_TrainingRecords trainingRecords)
|
||||
{
|
||||
Model.Comprehensive_TrainingRecords newTraining = new Model.Comprehensive_TrainingRecords
|
||||
{
|
||||
TrainingRecordsId = trainingRecords.TrainingRecordsId,
|
||||
ProjectId = trainingRecords.ProjectId,
|
||||
TrainingContents = trainingRecords.TrainingContents,
|
||||
CNProfessionalId = trainingRecords.CNProfessionalId,
|
||||
TrainingObject = trainingRecords.TrainingObject,
|
||||
TrainingAddress = trainingRecords.TrainingAddress,
|
||||
Hours = trainingRecords.Hours,
|
||||
KeynoteSpeaker = trainingRecords.KeynoteSpeaker,
|
||||
Remark = trainingRecords.Remark
|
||||
};
|
||||
Funs.DB.Comprehensive_TrainingRecords.InsertOnSubmit(newTraining);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改培训记录
|
||||
/// </summary>
|
||||
/// <param name="trainingRecords"></param>
|
||||
public static void UpdateTrainingRecords(Model.Comprehensive_TrainingRecords trainingRecords)
|
||||
{
|
||||
Model.Comprehensive_TrainingRecords newTraining = Funs.DB.Comprehensive_TrainingRecords.FirstOrDefault(e => e.TrainingRecordsId == trainingRecords.TrainingRecordsId);
|
||||
if (newTraining != null)
|
||||
{
|
||||
newTraining.TrainingContents = trainingRecords.TrainingContents;
|
||||
newTraining.CNProfessionalId = trainingRecords.CNProfessionalId;
|
||||
newTraining.TrainingObject = trainingRecords.TrainingObject;
|
||||
newTraining.TrainingAddress = trainingRecords.TrainingAddress;
|
||||
newTraining.Hours = trainingRecords.Hours;
|
||||
newTraining.KeynoteSpeaker = trainingRecords.KeynoteSpeaker;
|
||||
newTraining.Remark = trainingRecords.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除培训记录
|
||||
/// </summary>
|
||||
/// <param name="trainingRecordsId"></param>
|
||||
public static void DeleteTrainingRecordsById(string trainingRecordsId)
|
||||
{
|
||||
Model.Comprehensive_TrainingRecords training = Funs.DB.Comprehensive_TrainingRecords.FirstOrDefault(e => e.TrainingRecordsId == trainingRecordsId);
|
||||
if (training != null)
|
||||
{
|
||||
Funs.DB.Comprehensive_TrainingRecords.DeleteOnSubmit(training);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3245,6 +3245,11 @@ namespace BLL
|
|||
/// 资料收发文登记记录导入模板原始虚拟路径
|
||||
/// </summary>
|
||||
public const string CQMS_DataReceivingDocTempUrl = "File\\Excel\\DataIn\\资料收发文登记记录导入模板.xlsx";
|
||||
|
||||
/// <summary>
|
||||
/// 培训记录导入模板原始虚拟路径
|
||||
/// </summary>
|
||||
public const string CQMS_TrainingRecordsTemplateUrl= "File\\Excel\\DataIn\\培训记录导入模板.xlsx";
|
||||
#endregion
|
||||
|
||||
#region 绩效考核模板文件路径
|
||||
|
@ -3844,6 +3849,11 @@ namespace BLL
|
|||
/// </summary>
|
||||
public const string DesignDrawingsMenuId = "d8de4143-b680-44cf-9a78-acd3d49a8d00";
|
||||
|
||||
/// <summary>
|
||||
/// 培训记录
|
||||
/// </summary>
|
||||
public const string TrainingRecordsMenuId = "CFD19410-DF80-494A-A2DD-D23A03438742";
|
||||
|
||||
/// <summary>
|
||||
/// 图纸会审管理
|
||||
/// </summary>
|
||||
|
|
|
@ -0,0 +1,109 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TrainingRecords.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.TrainingRecords" %>
|
||||
|
||||
<!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>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="Panel1" />
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="培训记录" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="TrainingRecordsId" AllowCellEditing="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="TrainingRecordsId" AllowSorting="true"
|
||||
SortField="" SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="ToolSearch" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpCNProfessionalId" runat="server" Label="专业" LabelAlign="Right"></f:DropDownList>
|
||||
<f:TextBox ID="txtTrainingContents" runat="server" Label="培训内容" LabelAlign="Right"></f:TextBox>
|
||||
<f:Button ID="btnSearch" Icon="SystemSearch"
|
||||
EnablePostBack="true" runat="server" ToolTip="查询" OnClick="btnSearch_Click">
|
||||
</f:Button>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnNew" Icon="Add" ToolTip="新增" Hidden="true" EnablePostBack="true" runat="server" OnClick="btnNew_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnImport" ToolTip="导入" Hidden="true" Icon="PackageIn" runat="server" OnClick="btnImport_Click">
|
||||
</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 ColumnID="TrainingContents" DataField="TrainingContents" FieldType="String" HeaderText="培训内容" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="300px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="ProfessionalName" DataField="ProfessionalName" FieldType="String" HeaderText="专业" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="120px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="TrainingObject" DataField="TrainingObject" FieldType="String" HeaderText="培训对象" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="200px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="TrainingAddress" DataField="TrainingAddress" FieldType="String" HeaderText="培训地点" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="200px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="Hours" DataField="Hours" FieldType="String" HeaderText="课时(小时)" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="120px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="KeynoteSpeaker" DataField="KeynoteSpeaker" FieldType="String" HeaderText="主讲人" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="120px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="Remark" DataField="Remark" FieldType="String" HeaderText="备注" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="120px" ExpandUnusedSpace="true">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
</Listeners>
|
||||
<PageItems>
|
||||
<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>
|
||||
</PageItems>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="培训记录" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
|
||||
Width="800px" Height="500px">
|
||||
</f:Window>
|
||||
<f:Window ID="Window2" Title="培训记录导入" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
|
||||
Width="1024px" Height="650px">
|
||||
</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="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,246 @@
|
|||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
public partial class TrainingRecords : PageBase
|
||||
{
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
GetButtonPower();
|
||||
BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true);
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 数据绑定
|
||||
/// </summary>
|
||||
public void BindGrid()
|
||||
{
|
||||
string strSql = @"SELECT C.TrainingRecordsId,
|
||||
C.ProjectId,
|
||||
C.TrainingContents,
|
||||
C.CNProfessionalId,
|
||||
C.TrainingObject,
|
||||
C.TrainingAddress,
|
||||
C.Hours,
|
||||
C.KeynoteSpeaker,
|
||||
C.Remark,
|
||||
CN.ProfessionalName"
|
||||
+ @" FROM Comprehensive_TrainingRecords C "
|
||||
+ @" LEFT JOIN Base_CNProfessional CN ON C.CNProfessionalId=CN.CNProfessionalId"
|
||||
+ @" WHERE C.ProjectId = @ProjectId";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
if (drpCNProfessionalId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND C.CNProfessionalId=@CNProfessionalId";
|
||||
listStr.Add(new SqlParameter("@CNProfessionalId", drpCNProfessionalId.SelectedValue));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtTrainingContents.Text.Trim()))
|
||||
{
|
||||
strSql += " AND C.TrainingContents LIKE @TrainingContents";
|
||||
listStr.Add(new SqlParameter("@TrainingContents", "%" + this.txtTrainingContents.Text.Trim() + "%"));
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
//tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 查询
|
||||
/// <summary>
|
||||
/// 查询
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSearch_Click(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 分页、排序
|
||||
/// <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 Grid1_Sort(object sender, GridSortEventArgs e)
|
||||
{
|
||||
Grid1.SortDirection = e.SortDirection;
|
||||
Grid1.SortField = e.SortField;
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 新增
|
||||
/// <summary>
|
||||
/// 新增按钮事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnNew_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TrainingRecordsEdit.aspx", "编辑 - ")));
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 编辑
|
||||
/// <summary>
|
||||
/// 右键修改
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuModify_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TrainingRecordsEdit.aspx?id={0}", Grid1.SelectedRowID, "编辑 - ")));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Grid行双击事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
this.btnMenuModify_Click(sender, e);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 删除
|
||||
/// <summary>
|
||||
/// 右键删除
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
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();
|
||||
var trainingRecords = BLL.TrainingRecordsService.GetTrainingRecordsById(rowID);
|
||||
if (trainingRecords != null)
|
||||
{
|
||||
BLL.TrainingRecordsService.DeleteTrainingRecordsById(rowID);
|
||||
}
|
||||
}
|
||||
BindGrid();
|
||||
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 关闭弹出窗口
|
||||
/// <summary>
|
||||
/// 关闭弹出窗口
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 导入
|
||||
/// <summary>
|
||||
/// 导入按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("TrainingRecordsDataIn.aspx", "导入 - ")));
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取按钮权限
|
||||
/// <summary>
|
||||
/// 获取按钮权限
|
||||
/// </summary>
|
||||
/// <param name="button"></param>
|
||||
/// <returns></returns>
|
||||
private void GetButtonPower()
|
||||
{
|
||||
if (Request.Params["value"] == BLL.Const._Null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.TrainingRecordsMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
{
|
||||
this.btnNew.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||
{
|
||||
this.btnMenuModify.Hidden = false;
|
||||
this.Grid1.EnableRowDoubleClickEvent = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Grid1.EnableRowDoubleClickEvent = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnDelete))
|
||||
{
|
||||
this.btnMenuDel.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnSave))
|
||||
{
|
||||
this.btnImport.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,177 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||
|
||||
|
||||
public partial class TrainingRecords {
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolSearch 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar ToolSearch;
|
||||
|
||||
/// <summary>
|
||||
/// drpCNProfessionalId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpCNProfessionalId;
|
||||
|
||||
/// <summary>
|
||||
/// txtTrainingContents 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtTrainingContents;
|
||||
|
||||
/// <summary>
|
||||
/// btnSearch 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSearch;
|
||||
|
||||
/// <summary>
|
||||
/// btnNew 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
/// <summary>
|
||||
/// btnImport 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnImport;
|
||||
|
||||
/// <summary>
|
||||
/// lblPageIndex 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblPageIndex;
|
||||
|
||||
/// <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>
|
||||
/// Window2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window2;
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuModify 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuModify;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDel 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuDel;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,167 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TrainingRecordsDataIn.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.TrainingRecordsDataIn" %>
|
||||
|
||||
<!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-row.red {
|
||||
background-color: LightCoral;
|
||||
}
|
||||
|
||||
.Label {
|
||||
font-size: larger;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
<style type="text/css">
|
||||
/*定义父容器*/
|
||||
.content {
|
||||
width: 550px;
|
||||
height: 30px;
|
||||
background: #E4F1FB;
|
||||
margin: 0 auto;
|
||||
}
|
||||
/*定义进度条*/
|
||||
.box {
|
||||
width: 0px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
background: #3BAAE3;
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:HiddenField ID="id" ClientIDMode="Static" runat="server"></f:HiddenField>
|
||||
<f:Panel ID="Panel1" runat="server" Margin="2px" BodyPadding="2px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Right">
|
||||
<Items>
|
||||
<f:HiddenField ID="hdfileName" runat="server"></f:HiddenField>
|
||||
<f:FileUpload ID="FileExcel" runat="server" Label="数据文件" EmptyText="请上传EXCEl格式文件" Width="350px" LabelWidth="90px" LabelAlign="Right"></f:FileUpload>
|
||||
<f:Button ID="imgbtnImport" runat="server" Text="上传" ToolTip="文件上传" OnClick="imgbtnImport_Click"></f:Button>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
|
||||
<f:CheckBox ID="ckUpdate" runat="server" Text="更新导入"></f:CheckBox>
|
||||
<f:Button ID="btnSave" runat="server" Text="保存" ToolTip="审核保存" Icon="SystemSave" OnClick="btnSave_Click"></f:Button>
|
||||
<f:Button ID="btnRefresh" runat="server" ClientIDMode="Static" Text="刷新" Icon="SystemSave" OnClick="btnRefresh_Click" Hidden="true"></f:Button>
|
||||
<f:Button ID="btnAllDelete" runat="server" Icon="Delete" Text="删除记录" ToolTip="删除当前人所有临时导入记录" ConfirmText="删除当前人所有临时导入记录?"
|
||||
ConfirmTarget="Top" OnClick="btnAllDelete_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" Icon="TableGo"
|
||||
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:Button>
|
||||
<f:Button ID="imgbtnUpload" runat="server" Icon="DiskDownload" Text="模板下载" OnClick="imgbtnUpload_Click" EnableAjaxLoading="false"></f:Button>
|
||||
<%--<f:Button ID="lkAchievements" runat="server" Icon="DiskDownload" Text="导入说明" OnClick="lkAchievements_Click" EnableAjaxLoading="false"></f:Button>--%>
|
||||
</Items>
|
||||
<Items>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="数据导入" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="TempId" AllowCellEditing="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableColumnLines="true" ClicksToEdit="2" DataIDField="TempId" AllowSorting="true"
|
||||
SortField="RowNo" SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
|
||||
<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="70px" HeaderText="行号" ColumnID="RowNo" DataField="RowNo" SortField="RowNo"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="Value1" DataField="Value1" FieldType="String" HeaderText="培训内容" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="130px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="Value2" DataField="Value2" FieldType="String" HeaderText="专业" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="130px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="Value3" DataField="Value3" FieldType="String" HeaderText="培训对象" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="130px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="Value4" DataField="Value4" FieldType="String" HeaderText="培训地点" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="130px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="Value5" DataField="Value5" FieldType="String" HeaderText="课时(小时)" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="130px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="Value6" DataField="Value6" FieldType="String" HeaderText="主讲人" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="110px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="Value7" DataField="Value7" FieldType="String" HeaderText="备注" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="110px">
|
||||
</f:RenderField>
|
||||
</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" Selected="true" />
|
||||
<f:ListItem Text="20" Value="20" />
|
||||
<f:ListItem Text="25" Value="25" />
|
||||
</f:DropDownList>
|
||||
<f:Label Label="错误记录数" runat="server" ID="lbDataCout" CssClass="Label" LabelAlign="right" LabelWidth="120px"></f:Label>
|
||||
</PageItems>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="数据信息" Hidden="true" EnableIFrame="true"
|
||||
EnableMaximize="true" Target="Top" EnableResize="true" runat="server"
|
||||
IsModal="true" Width="1200px" Height="600px">
|
||||
</f:Window>
|
||||
<f:Window ID="Window2" Hidden="true" runat="server" MinHeight="30px"
|
||||
Target="Parent" ShowHeader="false" BodyPadding="0" Margin="0"
|
||||
IsModal="true" Width="550px" Height="32px">
|
||||
<Items>
|
||||
<f:ContentPanel ShowBorder="false" Height="30px" ShowHeader="false" ID="ContentPanel3" runat="server">
|
||||
<div class="content" id="content">
|
||||
<div class="box" id="box"></div>
|
||||
</div>
|
||||
</f:ContentPanel>
|
||||
</Items>
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" ClientIDMode="Static" runat="server">
|
||||
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
|
||||
runat="server" Text="编辑" Icon="TableEdit">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
|
||||
ConfirmText="删除选中行?" ConfirmTarget="Top" runat="server" Text="删除" Icon="Delete">
|
||||
</f:MenuButton>
|
||||
</f:Menu>
|
||||
<asp:ScriptManager ID="ScriptManager2" runat="server" EnablePageMethods="true">
|
||||
<Scripts>
|
||||
<asp:ScriptReference Path="~/res/DataInTable.js" />
|
||||
</Scripts>
|
||||
</asp:ScriptManager>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
var menuID = '<%= Menu1.ClientID %>';
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onRowContextMenu(event, rowId) {
|
||||
F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||
return false;
|
||||
}
|
||||
|
||||
function reloadGrid() {
|
||||
__doPostBack(null, 'reloadGrid');
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,521 @@
|
|||
using BLL;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
public partial class TrainingRecordsDataIn : PageBase
|
||||
{
|
||||
#region 定义项
|
||||
/// <summary>
|
||||
/// 上传预设的虚拟路径
|
||||
/// </summary>
|
||||
private string initPath = Const.ExcelUrl;
|
||||
|
||||
/// <summary>
|
||||
/// 错误集合
|
||||
/// </summary>
|
||||
public static string errorInfos = string.Empty;
|
||||
|
||||
#endregion
|
||||
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
if (percent == null)
|
||||
{
|
||||
percent = new Dictionary<string, int>();
|
||||
}
|
||||
this.id.Text = this.CurrUser.UserId;
|
||||
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
// 绑定表格
|
||||
this.BindGrid();
|
||||
}
|
||||
else if (GetRequestEventArgument() == "reloadGrid")
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 绑定数据
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"SELECT TempId,ProjectId,UserId,Time,RowNo,ToopValue,Value1,Value2,Value3,Value4,Value5,Value6,Value7,Value8,Value9,Value10"
|
||||
+ @" ,Value11,Value12,Value13,Value14,Value15,Value16,Value17,Value18,Value19,Value20,Value21,Value22,Value23,Value24,Value25,Value26,Value27,Value28,Value29,Value30"
|
||||
+ @" ,Value31,Value32,Value33,Value34,Value35,Value36,Value37,Value38,Value39,Value40,Value41,Value42,Value43,Value44,Value45,Value46,Value47,Value48,Value49,Value50,ToopValue,Type"
|
||||
+ @" FROM Sys_DataInTemp "
|
||||
+ @" WHERE ProjectId=@ProjectId AND UserId=@UserId AND Type=@Type";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
listStr.Add(new SqlParameter("@UserId", this.CurrUser.UserId));
|
||||
listStr.Add(new SqlParameter("@Type", "TrainingRecords"));//培训记录
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
|
||||
var dataInTempAll = from x in Funs.DB.Sys_DataInTemp
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UserId == this.CurrUser.UserId && x.Type == "TrainingRecords"
|
||||
select x;
|
||||
for (int i = 0; i < Grid1.Rows.Count; i++)
|
||||
{
|
||||
var dataInTemp = dataInTempAll.FirstOrDefault(x => x.TempId == Grid1.Rows[i].DataKeys[0].ToString());
|
||||
if (dataInTemp != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(dataInTemp.ToopValue))
|
||||
{
|
||||
Grid1.Rows[i].RowCssClass = "red";
|
||||
}
|
||||
}
|
||||
}
|
||||
var errData = from x in dataInTempAll where x.ToopValue != null select x;
|
||||
this.lbDataCout.Text = errData.Count().ToString();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 双击事件
|
||||
/// <summary>
|
||||
/// Grid行双击事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.TrainingRecordsMenuId, Const.BtnSave))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TrainingRecordsDataInEdit.aspx?TempId={0}", Grid1.SelectedRowID, "维护 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 导入信息 维护
|
||||
/// <summary>
|
||||
/// 导入信息编辑
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.TrainingRecordsMenuId, BLL.Const.BtnSave))
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TrainingRecordsDataInEdit.aspx?TempId={0}", Grid1.SelectedRowID, "维护 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.TrainingRecordsMenuId, Const.BtnSave))
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
BLL.Sys_DataTempService.DeleteDataInTempByDataInTempID(rowID);
|
||||
}
|
||||
ShowNotify("删除成功!", MessageBoxIcon.Success);
|
||||
this.BindGrid();
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 分页 排序
|
||||
/// <summary>
|
||||
/// 分页
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页显示条数下拉框
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 删除所有数据事件
|
||||
/// <summary>
|
||||
/// 删除所有数据事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAllDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.TrainingRecordsMenuId, Const.BtnSave))
|
||||
{
|
||||
//先删除临时表中 该人员以前导入的数据
|
||||
BLL.Sys_DataTempService.DeleteDataInTempByProjectIdUserId(this.CurrUser.LoginProjectId, this.CurrUser.UserId, "TrainingRecords");
|
||||
this.BindGrid();
|
||||
ShowNotify("删除成功!", MessageBoxIcon.Success);
|
||||
this.lbDataCout.Text = string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 下载模板
|
||||
/// <summary>
|
||||
/// 下载模板
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void imgbtnUpload_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.TemplateUpload(BLL.Const.CQMS_TrainingRecordsTemplateUrl);
|
||||
}
|
||||
|
||||
protected void TemplateUpload(string initTemplatePath)
|
||||
{
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string uploadfilepath = rootPath + initTemplatePath;
|
||||
string filePath = Const.CQMS_TrainingRecordsTemplateUrl;
|
||||
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();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 导入说明
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
//protected void lkAchievements_Click(object sender, EventArgs e)
|
||||
//{
|
||||
// this.TemplateUpload(Const.CQMS_DataReceivingDocTempUrl);
|
||||
//}
|
||||
#endregion
|
||||
|
||||
#region 进度条
|
||||
public static Dictionary<string, int> percent { get; set; }
|
||||
public static Dictionary<string, string> url { get; set; }
|
||||
|
||||
[System.Web.Services.WebMethod]
|
||||
public static int getPercent(string id)
|
||||
{
|
||||
return percent[id];
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 文件上传
|
||||
/// <summary>
|
||||
/// 文件上传
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void imgbtnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (this.FileExcel.HasFile == false)
|
||||
{
|
||||
ShowNotify("请选择Excel文件!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string IsXls = Path.GetExtension(this.FileExcel.FileName).ToString().Trim().ToLower();
|
||||
if (IsXls != ".xls" && IsXls != ".xlsx")
|
||||
{
|
||||
ShowNotify("只能选择Excel文件!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
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.FileExcel.PostedFile.SaveAs(filePath);
|
||||
//文件上传服务器后的名称
|
||||
string fileName = rootPath + initPath + this.hdfileName.Text;
|
||||
//读取Excel
|
||||
DataSet ds = NPOIHelper.ExcelToDataSet(fileName, out errorInfos, true);
|
||||
//验证Excel读取是否有误
|
||||
if (!string.IsNullOrEmpty(errorInfos))
|
||||
{
|
||||
ShowNotify(errorInfos, MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
if (ds.Tables.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
|
||||
{
|
||||
Sys_DataInTemp newDataInTemp = new Sys_DataInTemp();
|
||||
newDataInTemp.TempId = SQLHelper.GetNewID(typeof(Model.Sys_DataInTemp));
|
||||
newDataInTemp.ProjectId = this.CurrUser.LoginProjectId;
|
||||
newDataInTemp.UserId = this.CurrUser.UserId;
|
||||
newDataInTemp.Time = System.DateTime.Now;
|
||||
newDataInTemp.Type = "TrainingRecords";
|
||||
newDataInTemp.RowNo = i + 2;
|
||||
newDataInTemp.Value1 = ds.Tables[0].Rows[i]["培训内容"].ToString().Trim();
|
||||
newDataInTemp.Value2 = ds.Tables[0].Rows[i]["专业"].ToString().Trim();
|
||||
newDataInTemp.Value3 = ds.Tables[0].Rows[i]["培训对象"].ToString().Trim();
|
||||
newDataInTemp.Value4 = ds.Tables[0].Rows[i]["培训地点"].ToString().Trim();
|
||||
newDataInTemp.Value5 = ds.Tables[0].Rows[i]["课时(小时)"].ToString().Trim();
|
||||
newDataInTemp.Value6 = ds.Tables[0].Rows[i]["主讲人"].ToString().Trim();
|
||||
newDataInTemp.Value7 = ds.Tables[0].Rows[i]["备注"].ToString().Trim();
|
||||
|
||||
BLL.Sys_DataTempService.AddDataInTemp(newDataInTemp);
|
||||
}
|
||||
this.BindGrid();
|
||||
ShowNotify("数据已导入临时表!", MessageBoxIcon.Success);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("无数据!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Alert.ShowInTop("'" + ex.Message + "'", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 保存审核事件
|
||||
/// <summary>
|
||||
/// 保存审核事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
Thread t = new Thread(new ThreadStart(() => { btnSaveMethod(this.CurrUser.LoginProjectId, this.CurrUser.UserId); }));
|
||||
t.Start();
|
||||
if (percent.ContainsKey(this.CurrUser.UserId))
|
||||
{
|
||||
percent[CurrUser.UserId] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
percent.Add(CurrUser.UserId, 0);
|
||||
}
|
||||
PageContext.RegisterStartupScript("printX()");
|
||||
}
|
||||
protected void btnRefresh_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.BindGrid();
|
||||
}
|
||||
|
||||
protected void btnSaveMethod(string LoginProjectId, string UserId)
|
||||
{
|
||||
var cNProfessionals = from x in Funs.DB.Base_CNProfessional select x;//专业
|
||||
|
||||
var dataInTemp = from x in Funs.DB.Sys_DataInTemp
|
||||
where x.ProjectId == LoginProjectId && x.UserId == UserId && x.Type == "TrainingRecords"
|
||||
select x;
|
||||
int okCount = 0;
|
||||
int i = 0;
|
||||
int ir = dataInTemp.Count();
|
||||
string erreMessage = "";
|
||||
foreach (var tempData in dataInTemp)
|
||||
{
|
||||
if (tempData != null)
|
||||
{
|
||||
i++;
|
||||
percent[UserId] = (int)(100 * i / ir);
|
||||
string errInfo = string.Empty;
|
||||
var isExitValue = Funs.DB.Comprehensive_TrainingRecords.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.TrainingContents == tempData.Value1
|
||||
&& x.CNProfessionalId == tempData.Value2);
|
||||
if (isExitValue == null || this.ckUpdate.Checked)
|
||||
{
|
||||
Model.Comprehensive_TrainingRecords newData = new Model.Comprehensive_TrainingRecords();
|
||||
if (!string.IsNullOrEmpty(tempData.Value1.Trim()))
|
||||
{
|
||||
newData.TrainingContents = tempData.Value1.Trim();
|
||||
}
|
||||
else
|
||||
{
|
||||
errInfo += "培训内容为必填项;";
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(tempData.Value2.Trim()))
|
||||
{
|
||||
var professional = cNProfessionals.FirstOrDefault(e => e.ProfessionalName == tempData.Value2.Trim());
|
||||
if (professional != null)
|
||||
{
|
||||
newData.CNProfessionalId = professional.CNProfessionalId;
|
||||
}
|
||||
else
|
||||
{
|
||||
errInfo += "专业不存在;";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
errInfo += "专业为必填项;";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value3.Trim()))
|
||||
{
|
||||
newData.TrainingObject = tempData.Value3.Trim();
|
||||
}
|
||||
else
|
||||
{
|
||||
errInfo += "培训对象为必填项;";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value4.Trim()))
|
||||
{
|
||||
newData.TrainingAddress = tempData.Value4.Trim();
|
||||
}
|
||||
else
|
||||
{
|
||||
errInfo += "培训地点为必填项;";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value5.Trim()))
|
||||
{
|
||||
try
|
||||
{
|
||||
newData.Hours = Funs.GetNewDecimal(tempData.Value5.Trim());
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
errInfo += "课时(小时)格式错误;";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value6.Trim()))
|
||||
{
|
||||
newData.KeynoteSpeaker = tempData.Value6.Trim();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value7.Trim()))
|
||||
{
|
||||
newData.Remark = tempData.Value7.Trim();
|
||||
}
|
||||
if (string.IsNullOrEmpty(errInfo)) ////所有信息正确的话 这插入管线焊口
|
||||
{
|
||||
newData.ProjectId = this.CurrUser.LoginProjectId;
|
||||
|
||||
var data = BLL.TrainingRecordsService.GetTrainingRecordsByName(newData.TrainingContents, newData.CNProfessionalId);
|
||||
if (data == null)
|
||||
{
|
||||
newData.TrainingRecordsId = SQLHelper.GetNewID(typeof(Model.Comprehensive_TrainingRecords));
|
||||
BLL.TrainingRecordsService.AddTrainingRecords(newData);
|
||||
}
|
||||
else
|
||||
{
|
||||
newData.TrainingRecordsId = data.TrainingRecordsId;
|
||||
BLL.TrainingRecordsService.UpdateTrainingRecords(newData);
|
||||
}
|
||||
|
||||
BLL.Sys_DataTempService.DeleteDataInTempByDataInTempID(tempData.TempId);
|
||||
okCount++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
errInfo = "该条记录已存在于培训记录表中。";
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(errInfo))
|
||||
{
|
||||
tempData.ToopValue = errInfo;
|
||||
BLL.Sys_DataTempService.UpdateDataInTemp(tempData);
|
||||
erreMessage += errInfo + ";";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 导出按钮
|
||||
/// 导出按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
Response.ClearContent();
|
||||
string filename = Funs.GetNewFileName();
|
||||
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("培训记录导入模板" + filename, System.Text.Encoding.UTF8) + ".xlsx");
|
||||
Response.ContentType = "application/excel";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
Response.Write(GetGridTableHtml(Grid1));
|
||||
Response.End();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
267
SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecordsDataIn.aspx.designer.cs
generated
Normal file
267
SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecordsDataIn.aspx.designer.cs
generated
Normal file
|
@ -0,0 +1,267 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||
|
||||
|
||||
public partial class TrainingRecordsDataIn {
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// id 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField id;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// hdfileName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdfileName;
|
||||
|
||||
/// <summary>
|
||||
/// FileExcel 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.FileUpload FileExcel;
|
||||
|
||||
/// <summary>
|
||||
/// imgbtnImport 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button imgbtnImport;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// ckUpdate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.CheckBox ckUpdate;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnRefresh 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnRefresh;
|
||||
|
||||
/// <summary>
|
||||
/// btnAllDelete 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAllDelete;
|
||||
|
||||
/// <summary>
|
||||
/// btnOut 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnOut;
|
||||
|
||||
/// <summary>
|
||||
/// imgbtnUpload 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button imgbtnUpload;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <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>
|
||||
/// lbDataCout 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbDataCout;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
/// <summary>
|
||||
/// Window2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window2;
|
||||
|
||||
/// <summary>
|
||||
/// ContentPanel3 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ContentPanel ContentPanel3;
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuEdit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuEdit;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDelete 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuDelete;
|
||||
|
||||
/// <summary>
|
||||
/// ScriptManager2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.ScriptManager ScriptManager2;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TrainingRecordsDataInEdit.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.TrainingRecordsDataInEdit" %>
|
||||
|
||||
<!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>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Right">
|
||||
<Items>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtValue1" Label="培训内容" ShowRedStar="true" Required="true" runat="server" FocusOnPageLoad="true" MaxLength="50" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue2" Label="专业" ShowRedStar="true" Required="true" runat="server" MaxLength="50" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtValue3" Label="培训对象" ShowRedStar="true" Required="true" runat="server" MaxLength="50" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue4" Label="培训地点" ShowRedStar="true" Required="true" runat="server" MaxLength="50" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtValue5" Label="课时(小时)" ShowRedStar="true" Required="true" runat="server" MaxLength="50" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue6" Label="主讲人" ShowRedStar="true" Required="true" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtValue7" Label="备注" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:CheckBox ID="ckAll" runat="server" Checked="true" Text="是否批量修改"></f:CheckBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea runat="server" Label="错误信息" ID="lbErrCout" Readonly="true" LabelWidth="120px"></f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,175 @@
|
|||
using BLL;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
public partial class TrainingRecordsDataInEdit : PageBase
|
||||
{
|
||||
#region 定义项
|
||||
/// <summary>
|
||||
/// 临时表主键
|
||||
/// </summary>
|
||||
public string TempId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["TempId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["TempId"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 加载页面
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.TempId = Request.Params["TempId"];
|
||||
this.txtValue1.Focus();
|
||||
var dataInTemp = BLL.Sys_DataTempService.GetDataInTempByTempId(this.TempId);
|
||||
if (dataInTemp != null)
|
||||
{
|
||||
this.txtValue1.Text = dataInTemp.Value1;
|
||||
this.txtValue2.Text = dataInTemp.Value2;
|
||||
this.txtValue3.Text = dataInTemp.Value3;
|
||||
this.txtValue4.Text = dataInTemp.Value4;
|
||||
this.txtValue5.Text = dataInTemp.Value5;
|
||||
this.txtValue6.Text = dataInTemp.Value6;
|
||||
this.txtValue7.Text = dataInTemp.Value7;
|
||||
|
||||
this.lbErrCout.Text = dataInTemp.ToopValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 保存按钮
|
||||
/// <summary>
|
||||
/// 保存按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
var dataInTemp = BLL.Sys_DataTempService.GetDataInTempByTempId(this.TempId);
|
||||
if (this.ckAll.Checked)
|
||||
{
|
||||
var allDataInTemp = from x in Funs.DB.Sys_DataInTemp where x.ProjectId == this.CurrUser.LoginProjectId && x.UserId == this.CurrUser.UserId select x;
|
||||
if (dataInTemp.Value1 != this.txtValue1.Text.Trim())
|
||||
{
|
||||
var tempValue1 = allDataInTemp.Where(x => x.Value1 == dataInTemp.Value1 || (x.Value1 == null && dataInTemp.Value1 == null));
|
||||
if (tempValue1 != null)
|
||||
{
|
||||
foreach (var item in tempValue1)
|
||||
{
|
||||
item.Value1 = this.txtValue1.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value2 != this.txtValue2.Text.Trim())
|
||||
{
|
||||
var tempValue2 = allDataInTemp.Where(x => x.Value2 == dataInTemp.Value2 || (x.Value2 == null && dataInTemp.Value2 == null));
|
||||
if (tempValue2 != null)
|
||||
{
|
||||
foreach (var item in tempValue2)
|
||||
{
|
||||
item.Value2 = this.txtValue2.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value3 != this.txtValue3.Text.Trim())
|
||||
{
|
||||
var tempValue3 = allDataInTemp.Where(x => x.Value3 == dataInTemp.Value3 || (x.Value3 == null && dataInTemp.Value3 == null));
|
||||
if (tempValue3 != null)
|
||||
{
|
||||
foreach (var item in tempValue3)
|
||||
{
|
||||
item.Value3 = this.txtValue3.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value5 != this.txtValue5.Text.Trim())
|
||||
{
|
||||
var tempValue5 = allDataInTemp.Where(x => x.Value5 == dataInTemp.Value5 || (x.Value5 == null && dataInTemp.Value5 == null));
|
||||
if (tempValue5 != null)
|
||||
{
|
||||
foreach (var item in tempValue5)
|
||||
{
|
||||
item.Value5 = this.txtValue5.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value6 != this.txtValue6.Text.Trim())
|
||||
{
|
||||
var tempValue6 = allDataInTemp.Where(x => x.Value6 == dataInTemp.Value6 || (x.Value6 == null && dataInTemp.Value6 == null));
|
||||
if (tempValue6 != null)
|
||||
{
|
||||
foreach (var item in tempValue6)
|
||||
{
|
||||
item.Value6 = this.txtValue6.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value7 != this.txtValue7.Text.Trim())
|
||||
{
|
||||
var tempValue7 = allDataInTemp.Where(x => x.Value7 == dataInTemp.Value7 || (x.Value7 == null && dataInTemp.Value7 == null));
|
||||
if (tempValue7 != null)
|
||||
{
|
||||
foreach (var item in tempValue7)
|
||||
{
|
||||
item.Value7 = this.txtValue7.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
var toopValue = allDataInTemp.Where(x => x.ToopValue == dataInTemp.ToopValue);
|
||||
if (toopValue != null)
|
||||
{
|
||||
foreach (var item in toopValue)
|
||||
{
|
||||
item.ToopValue = null;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Sys_DataInTemp newDataInTemp = new Model.Sys_DataInTemp();
|
||||
newDataInTemp.ProjectId = this.CurrUser.LoginProjectId;
|
||||
newDataInTemp.UserId = this.CurrUser.UserId;
|
||||
newDataInTemp.Time = System.DateTime.Now;
|
||||
newDataInTemp.Type = dataInTemp.Type;
|
||||
newDataInTemp.Value1 = this.txtValue1.Text.Trim();
|
||||
newDataInTemp.Value2 = this.txtValue2.Text.Trim();
|
||||
newDataInTemp.Value3 = this.txtValue3.Text.Trim();
|
||||
newDataInTemp.Value4 = this.txtValue4.Text.Trim();
|
||||
newDataInTemp.Value5 = this.txtValue5.Text.Trim();
|
||||
newDataInTemp.Value6 = this.txtValue6.Text.Trim();
|
||||
newDataInTemp.Value7 = this.txtValue7.Text.Trim();
|
||||
if (!string.IsNullOrEmpty(this.TempId))
|
||||
{
|
||||
newDataInTemp.TempId = this.TempId;
|
||||
newDataInTemp.ToopValue = null;
|
||||
BLL.Sys_DataTempService.UpdateDataInTemp(newDataInTemp);
|
||||
}
|
||||
}
|
||||
ShowNotify("信息修改完成!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
150
SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecordsDataInEdit.aspx.designer.cs
generated
Normal file
150
SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecordsDataInEdit.aspx.designer.cs
generated
Normal file
|
@ -0,0 +1,150 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||
|
||||
|
||||
public partial class TrainingRecordsDataInEdit {
|
||||
|
||||
/// <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>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue1;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue2;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue3 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue3;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue4 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue4;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue5 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue5;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue6 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue6;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue7 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue7;
|
||||
|
||||
/// <summary>
|
||||
/// ckAll 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.CheckBox ckAll;
|
||||
|
||||
/// <summary>
|
||||
/// lbErrCout 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea lbErrCout;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TrainingRecordsEdit.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.TrainingRecordsEdit" %>
|
||||
|
||||
<!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>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="SimpleForm1" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true" BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtTrainingContents" runat="server" Label="培训内容" MaxLength="100" LabelAlign="Right" LabelWidth="130px" Required="true" ShowRedStar="true"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpCNProfessionalId" runat="server" Label="专业" LabelAlign="Right" LabelWidth="130px" Required="true" ShowRedStar="true"></f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtTrainingObject" runat="server" Label="培训对象" MaxLength="50" LabelAlign="Right" LabelWidth="130px"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtTrainingAddress" runat="server" Label="培训地点" MaxLength="50" LabelAlign="Right" LabelWidth="130px"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:NumberBox ID="txtHours" runat="server" Label="课时(小时)" LabelAlign="Right" NoNegative="true" LabelWidth="130px"></f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtKeynoteSpeaker" runat="server" Label="主讲人" MaxLength="50" LabelAlign="Right" LabelWidth="130px"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtRemark" runat="server" Label="备注" MaxLength="50" LabelAlign="Right" LabelWidth="130px"></f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ToolTip="保存" ValidateForms="SimpleForm1" OnClick="btnSave_Click" Hidden="true">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,118 @@
|
|||
using BLL;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
public partial class TrainingRecordsEdit : PageBase
|
||||
{
|
||||
#region 定义变量
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
public string TrainingRecordsId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["TrainingRecordsId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["TrainingRecordsId"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
GetButtonPower();
|
||||
BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true);
|
||||
this.TrainingRecordsId = Request.Params["id"];
|
||||
Model.Comprehensive_TrainingRecords trainingRecords = BLL.TrainingRecordsService.GetTrainingRecordsById(this.TrainingRecordsId);
|
||||
if (trainingRecords != null)
|
||||
{
|
||||
this.TrainingRecordsId = trainingRecords.TrainingRecordsId;
|
||||
this.txtTrainingContents.Text = trainingRecords.TrainingContents;
|
||||
if (!string.IsNullOrEmpty(trainingRecords.CNProfessionalId))
|
||||
{
|
||||
this.drpCNProfessionalId.SelectedValue = trainingRecords.CNProfessionalId;
|
||||
}
|
||||
this.txtTrainingObject.Text = trainingRecords.TrainingObject;
|
||||
this.txtTrainingAddress.Text = trainingRecords.TrainingAddress;
|
||||
this.txtHours.Text = trainingRecords.Hours.HasValue ? trainingRecords.Hours.ToString() : "";
|
||||
this.txtKeynoteSpeaker.Text = trainingRecords.KeynoteSpeaker;
|
||||
this.txtRemark.Text = trainingRecords.Remark;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 保存
|
||||
/// <summary>
|
||||
/// 保存按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (drpCNProfessionalId.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
Model.Comprehensive_TrainingRecords trainingRecords = new Model.Comprehensive_TrainingRecords();
|
||||
trainingRecords.CNProfessionalId = this.drpCNProfessionalId.SelectedValue;
|
||||
trainingRecords.TrainingContents = this.txtTrainingContents.Text.Trim();
|
||||
trainingRecords.TrainingObject = this.txtTrainingObject.Text.Trim();
|
||||
trainingRecords.TrainingAddress = this.txtTrainingAddress.Text.Trim();
|
||||
trainingRecords.Hours = Funs.GetNewDecimal(this.txtHours.Text.Trim());
|
||||
trainingRecords.KeynoteSpeaker = this.txtKeynoteSpeaker.Text.Trim();
|
||||
trainingRecords.Remark = this.txtRemark.Text.Trim();
|
||||
if (!string.IsNullOrEmpty(this.TrainingRecordsId))
|
||||
{
|
||||
trainingRecords.TrainingRecordsId = this.TrainingRecordsId;
|
||||
BLL.TrainingRecordsService.UpdateTrainingRecords(trainingRecords);
|
||||
}
|
||||
else
|
||||
{
|
||||
trainingRecords.TrainingRecordsId = SQLHelper.GetNewID(typeof(Model.Comprehensive_TrainingRecords));
|
||||
trainingRecords.ProjectId = this.CurrUser.LoginProjectId;
|
||||
BLL.TrainingRecordsService.AddTrainingRecords(trainingRecords);
|
||||
}
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取按钮权限
|
||||
/// <summary>
|
||||
/// 获取按钮权限
|
||||
/// </summary>
|
||||
/// <param name="button"></param>
|
||||
/// <returns></returns>
|
||||
private void GetButtonPower()
|
||||
{
|
||||
if (Request.Params["value"] == "0")
|
||||
{
|
||||
return;
|
||||
}
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.TrainingRecordsMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnSave))
|
||||
{
|
||||
this.btnSave.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
123
SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecordsEdit.aspx.designer.cs
generated
Normal file
123
SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecordsEdit.aspx.designer.cs
generated
Normal file
|
@ -0,0 +1,123 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||
|
||||
|
||||
public partial class TrainingRecordsEdit {
|
||||
|
||||
/// <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>
|
||||
/// txtTrainingContents 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtTrainingContents;
|
||||
|
||||
/// <summary>
|
||||
/// drpCNProfessionalId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpCNProfessionalId;
|
||||
|
||||
/// <summary>
|
||||
/// txtTrainingObject 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtTrainingObject;
|
||||
|
||||
/// <summary>
|
||||
/// txtTrainingAddress 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtTrainingAddress;
|
||||
|
||||
/// <summary>
|
||||
/// txtHours 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtHours;
|
||||
|
||||
/// <summary>
|
||||
/// txtKeynoteSpeaker 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtKeynoteSpeaker;
|
||||
|
||||
/// <summary>
|
||||
/// txtRemark 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtRemark;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
}
|
||||
}
|
|
@ -1344,7 +1344,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
|
||||
#region 10-1 土建
|
||||
var TJInspection = reportItem.Where(x => x.ReType == "10-1").ToList();
|
||||
if (TJInspection.Count > 0)
|
||||
if (TJInspection != null || TJInspection.Count > 0)
|
||||
{
|
||||
isYm = true;
|
||||
//whileIndex += 1;
|
||||
|
@ -1472,7 +1472,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
|
||||
#region 10-2 设备
|
||||
var SBInspection = reportItem.Where(x => x.ReType == "10-2").ToList();
|
||||
if (SBInspection.Count > 0)
|
||||
if (SBInspection != null || SBInspection.Count > 0)
|
||||
{
|
||||
isYm = true;
|
||||
//whileIndex += 1;
|
||||
|
@ -1600,7 +1600,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
|
||||
#region 10-3 管道
|
||||
var GDInspection = reportItem.Where(x => x.ReType == "10-3").ToList();
|
||||
if (GDInspection.Count > 0)
|
||||
if (GDInspection != null || GDInspection.Count > 0)
|
||||
{
|
||||
isYm = true;
|
||||
//whileIndex += 1;
|
||||
|
@ -1728,7 +1728,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
|
||||
#region 10-4 电气
|
||||
var DQInspection = reportItem.Where(x => x.ReType == "10-4").ToList();
|
||||
if (DQInspection.Count > 0)
|
||||
if (DQInspection != null || DQInspection.Count > 0)
|
||||
{
|
||||
isYm = true;
|
||||
//whileIndex += 1;
|
||||
|
@ -1856,7 +1856,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
|
||||
#region 10-5.仪表
|
||||
var YBInspection = reportItem.Where(x => x.ReType == "10-5").ToList();
|
||||
if (YBInspection.Count > 0)
|
||||
if (YBInspection != null || YBInspection.Count > 0)
|
||||
{
|
||||
isYm = true;
|
||||
//whileIndex += 1;
|
||||
|
@ -1984,7 +1984,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
|
||||
#region 10-6.防腐
|
||||
var FFInspection = reportItem.Where(x => x.ReType == "10-6").ToList();
|
||||
if (FFInspection.Count > 0)
|
||||
if (FFInspection != null || FFInspection.Count > 0)
|
||||
{
|
||||
isYm = true;
|
||||
//whileIndex += 1;
|
||||
|
@ -2112,7 +2112,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
|
||||
#region 10-7.消防
|
||||
var XFInspection = reportItem.Where(x => x.ReType == "10-7").ToList();
|
||||
if (XFInspection.Count > 0)
|
||||
if (XFInspection != null || XFInspection.Count > 0)
|
||||
{
|
||||
isYm = true;
|
||||
//whileIndex += 1;
|
||||
|
@ -2240,7 +2240,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
|
||||
#region 10.总数
|
||||
var InspectionDataInspection = reportItem.Where(x => x.ReType == "10").ToList();
|
||||
if (InspectionDataInspection.Count > 0)
|
||||
if (InspectionDataInspection != null || InspectionDataInspection.Count > 0)
|
||||
{
|
||||
isYm = true;
|
||||
//whileIndex += 1;
|
||||
|
@ -2260,48 +2260,67 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
}
|
||||
}
|
||||
numberIndex = 1;
|
||||
decimal? num1 = 0, num2 = 0;
|
||||
decimal MonthsCountstring = 0, ProjectCountstring = 0;
|
||||
//decimal? num1 = 0, num2 = 0;
|
||||
//decimal MonthsCountstring = 0, ProjectCountstring = 0;
|
||||
int CheckNum = 0, OKNum = 0, TotalCheckNum = 0, TotalOKNum = 0;
|
||||
string QuantitySum1 = String.Empty;//本月检查合格点数/本月检查点数
|
||||
string QuantitySum2 = String.Empty;//累计检查合格点数/累计检查点数
|
||||
foreach (var item in InspectionDataInspection)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(item.RectificationRate))
|
||||
if (string.IsNullOrEmpty(item.RectificationRate))
|
||||
{
|
||||
MonthsCountstring = Convert.ToDecimal(item.RectificationRate.Replace("%", ""));
|
||||
}
|
||||
else {
|
||||
item.RectificationRate = "0%";
|
||||
MonthsCountstring= Convert.ToDecimal(item.RectificationRate.Replace("%", ""));
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(item.TotationRate))
|
||||
if (string.IsNullOrEmpty(item.TotationRate))
|
||||
{
|
||||
ProjectCountstring = Convert.ToDecimal(item.TotationRate.Replace("%", ""));
|
||||
}
|
||||
else {
|
||||
item.TotationRate = "0%";
|
||||
ProjectCountstring = Convert.ToDecimal(item.TotationRate.Replace("%", ""));
|
||||
}
|
||||
//创建行
|
||||
Row row = new Row(doc);
|
||||
row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width, "", "1"));
|
||||
row.Cells.Add(CreateCell(item.ContentName, doc, table.FirstRow.Cells[1].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.RectificationRate.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.TotationRate.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(Convert.ToString(item.RectificationRate), doc, table.FirstRow.Cells[2].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(Convert.ToString(item.TotationRate), doc, table.FirstRow.Cells[3].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.Remarks, doc, table.FirstRow.Cells[4].CellFormat.Width));
|
||||
table.Rows.Insert(numberIndex, row);
|
||||
num1 += MonthsCountstring;
|
||||
num2 += ProjectCountstring;
|
||||
//num1 += MonthsCountstring;
|
||||
//num2 += ProjectCountstring;
|
||||
CheckNum += Convert.ToInt32(item.MonthsCount);
|
||||
OKNum += Convert.ToInt32(item.ProjectCount);
|
||||
TotalCheckNum += Convert.ToInt32(item.MonthsBackCount);
|
||||
TotalOKNum += Convert.ToInt32(item.TotalNoBackCount);
|
||||
|
||||
numberIndex += 1;
|
||||
}
|
||||
//自动设置表格样式
|
||||
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
|
||||
|
||||
|
||||
if (CheckNum != 0)//被除数不能为零
|
||||
{
|
||||
QuantitySum1 = Math.Round((decimal)OKNum / (decimal)CheckNum * 100, 2) + "%";//保留两位小数、后四舍五入
|
||||
}
|
||||
else
|
||||
{
|
||||
QuantitySum1 = "0%";
|
||||
}
|
||||
if (TotalCheckNum != 0)//被除数不能为零
|
||||
{
|
||||
QuantitySum2 = Math.Round((decimal)TotalOKNum / (decimal)TotalCheckNum * 100, 2) + "%";//保留两位小数、后四舍五入
|
||||
}
|
||||
else
|
||||
{
|
||||
QuantitySum2 = "0%";
|
||||
}
|
||||
|
||||
|
||||
//创建合计
|
||||
Row rowhj = new Row(doc);
|
||||
rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[0].CellFormat.Width));
|
||||
rowhj.Cells.Add(CreateCell("合计", doc, table.FirstRow.Cells[1].CellFormat.Width));
|
||||
rowhj.Cells.Add(CreateCell(num1.ToString() + "%", doc, table.FirstRow.Cells[2].CellFormat.Width));
|
||||
rowhj.Cells.Add(CreateCell(num2.ToString() + "%", doc, table.FirstRow.Cells[3].CellFormat.Width));
|
||||
rowhj.Cells.Add(CreateCell(QuantitySum1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
|
||||
rowhj.Cells.Add(CreateCell(QuantitySum2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
|
||||
rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[4].CellFormat.Width));
|
||||
table.Rows.Insert(numberIndex, rowhj);
|
||||
|
||||
|
@ -2473,7 +2492,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
rowhj.Cells.Add(CreateCell(num3.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
|
||||
rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
|
||||
rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.FirstRow.Cells[4].CellFormat.Width));
|
||||
rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[4].CellFormat.Width));
|
||||
rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[5].CellFormat.Width));
|
||||
table.Rows.Insert(numberIndex, rowhj);
|
||||
|
||||
//自动设置表格样式
|
||||
|
@ -3026,8 +3045,11 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
#region 设置页眉上的数据
|
||||
whileIndex = 1;
|
||||
table = (Aspose.Words.Tables.Table)doc.GetChild(NodeType.Table, 1, true);
|
||||
if (unitsYz != null)
|
||||
{
|
||||
//业主名称
|
||||
table.Rows[0].Cells[2].FirstParagraph.Runs[0].Text = unitsYz.UnitName;
|
||||
}
|
||||
|
||||
//项目号
|
||||
table.Rows[0].Cells[4].FirstParagraph.Runs[0].Text = pModel.ProjectCode;
|
||||
|
|
|
@ -1318,6 +1318,18 @@
|
|||
</f:TextBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="CheckNum" DataField="CheckNum" Hidden="true"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="本月">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="TotalCheckNum" DataField="TotalCheckNum" Hidden="true"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="累计">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="OKNum" DataField="OKNum" Hidden="true"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="本月">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="TotalOKNum" DataField="TotalOKNum" Hidden="true"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="累计">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
|
|
|
@ -2781,6 +2781,13 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
//保存9.计量器具报验管理情况
|
||||
saveMeasuringInspection();
|
||||
//保存10.现场质量共检数据
|
||||
saveTjInspection();
|
||||
saveSbInspection();
|
||||
saveGDInspection();
|
||||
saveDQInspection();
|
||||
saveYBInspection();
|
||||
saveFFInspection();
|
||||
saveXFInspection();
|
||||
saveInspectionDataInspection();
|
||||
//保存11.压力管道监检情况
|
||||
savePressureInspection();
|
||||
|
@ -3457,10 +3464,16 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
ReportId = ReportId,
|
||||
ReType = "10",
|
||||
ContentName = values.Value<string>("WorkName"),
|
||||
RectificationRate = values.Value<string>("OneOKRate"),
|
||||
TotationRate = values.Value<string>("TotalOneOKRate"),
|
||||
MonthsCount = values.Value<int>("CheckNum"), //当前检查点数
|
||||
MonthsBackCount = values.Value<int>("TotalCheckNum"),//累计点数
|
||||
|
||||
ProjectCount = values.Value<int>("OKNum"),//当前合格点数
|
||||
TotalNoBackCount = values.Value<int>("TotalOKNum"),//累计合格点数
|
||||
|
||||
RectificationRate = values.Value<string>("OneOKRate"),//本月合格点数
|
||||
TotationRate = values.Value<string>("TotalOneOKRate"),
|
||||
Remarks = values.Value<string>("Remarks"),//本月累计合格点数
|
||||
|
||||
Remarks = values.Value<string>("Remarks"),
|
||||
};
|
||||
if (gvInspectionDataInspection.Rows[rowIndex].DataKeys.Length > 0)
|
||||
{
|
||||
|
|
|
@ -311,6 +311,13 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
//保存9.计量器具报验管理情况
|
||||
saveMeasuringInspection();
|
||||
//保存10.现场质量共检数据
|
||||
saveTjInspection();
|
||||
saveSbInspection();
|
||||
saveGDInspection();
|
||||
saveDQInspection();
|
||||
saveYBInspection();
|
||||
saveFFInspection();
|
||||
saveXFInspection();
|
||||
saveInspectionDataInspection();
|
||||
//保存11.压力管道监检情况
|
||||
savePressureInspection();
|
||||
|
@ -450,7 +457,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
//加载13.特种设备监检情况
|
||||
loadSpecialInspection(objType);
|
||||
////加载14.NCR管理情况
|
||||
loadNcrManagementInspection();
|
||||
loadNcrManagementInspection(objType);
|
||||
|
||||
//加载15.质量巡检情况
|
||||
loadQualityInspection(objType);
|
||||
|
@ -1083,7 +1090,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
/// <summary>
|
||||
/// NCR管理情况
|
||||
/// </summary>
|
||||
void loadNcrManagementInspection()
|
||||
void loadNcrManagementInspection(string objType)
|
||||
{
|
||||
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
||||
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
||||
|
@ -1121,7 +1128,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
u.UnitId,
|
||||
u.UnitName,
|
||||
c.IssuedDate,
|
||||
c.Status
|
||||
c.Status,
|
||||
c.ImplementationFrontState,
|
||||
};
|
||||
|
||||
var AllList = query.ToList();
|
||||
|
@ -1131,9 +1139,13 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
Model.NCRReportStatisc NCRStatisc = new Model.NCRReportStatisc();
|
||||
NCRStatisc.Id = Guid.NewGuid().ToString();
|
||||
NCRStatisc.WorkName = item.UnitName;
|
||||
NCRStatisc.CurrentPeriodOkNum = unitNCRStatic.Count(x => x.Status == "3");
|
||||
NCRStatisc.OKNum = AllList.Count(x => x.Status == "3");
|
||||
//NCRStatisc.CurrentPeriodOkNum = unitNCRStatic.Count(x => x.Status == "3");
|
||||
//NCRStatisc.OKNum = AllList.Count(x => x.Status == "3");
|
||||
NCRStatisc.CurrentPeriodOkNum = unitNCRStatic.Where(x => x.ImplementationFrontState.Trim().Equals("已闭合")).Count();
|
||||
NCRStatisc.OKNum = AllList.Where(x => x.ImplementationFrontState.Trim().Equals("已闭合")).Count();
|
||||
|
||||
NCRStatisc.CheckNum = AllList.Count();
|
||||
|
||||
if (NCRStatisc.CheckNum != 0)//被除数不能为零
|
||||
{
|
||||
NCRStatisc.OKRate = Math.Round((double)NCRStatisc.OKNum / (double)NCRStatisc.CheckNum * 100, 2) + "%";//保留两位小数、后四舍五入
|
||||
|
@ -1142,6 +1154,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
{
|
||||
NCRStatisc.OKRate = "0%";
|
||||
}
|
||||
|
||||
StatisticsList.Add(NCRStatisc);
|
||||
|
||||
CurrentPeriodOkNumSum += NCRStatisc.CurrentPeriodOkNum;
|
||||
|
@ -1590,6 +1603,246 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
#endregion
|
||||
|
||||
#region 10.现场质量共检数据
|
||||
void saveTjInspection() //检验批统计:土建
|
||||
{
|
||||
List<Model.Report_CQMS_MonthReportItem> detailLists = new List<Model.Report_CQMS_MonthReportItem>();
|
||||
JArray teamGroupData = gvTj.GetMergedData();
|
||||
foreach (JObject teamGroupRow in teamGroupData)
|
||||
{
|
||||
JObject values = teamGroupRow.Value<JObject>("values");
|
||||
int rowIndex = teamGroupRow.Value<int>("index");
|
||||
Model.Report_CQMS_MonthReportItem newDetail = new Model.Report_CQMS_MonthReportItem
|
||||
{
|
||||
ReportId = ReportId,
|
||||
ReType = "10-1",
|
||||
ContentName = values.Value<string>("WorkName"),
|
||||
|
||||
MonthsCount = values.Value<int>("CheckNum"), //当前检查点数
|
||||
MonthsBackCount = values.Value<int>("TotalCheckNum"),//累计点数
|
||||
|
||||
ProjectCount = values.Value<int>("OKNum"),//当前合格点数
|
||||
TotalNoBackCount = values.Value<int>("TotalOKNum"),//累计合格点数
|
||||
|
||||
RectificationRate = values.Value<string>("OneOKRate"),//本月合格点数
|
||||
Remarks = values.Value<string>("TotalOneOKRate"),//本月累计合格点数
|
||||
};
|
||||
if (gvTj.Rows[rowIndex].DataKeys.Length > 0)
|
||||
{
|
||||
newDetail.Id = gvTj.Rows[rowIndex].DataKeys[0].ToString();
|
||||
}
|
||||
detailLists.Add(newDetail);
|
||||
}
|
||||
if (detailLists.Count > 0)
|
||||
{
|
||||
Funs.DB.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
void saveSbInspection() //检验批统计:设备
|
||||
{
|
||||
List<Model.Report_CQMS_MonthReportItem> detailLists = new List<Model.Report_CQMS_MonthReportItem>();
|
||||
JArray teamGroupData = GvSb.GetMergedData();
|
||||
foreach (JObject teamGroupRow in teamGroupData)
|
||||
{
|
||||
JObject values = teamGroupRow.Value<JObject>("values");
|
||||
int rowIndex = teamGroupRow.Value<int>("index");
|
||||
Model.Report_CQMS_MonthReportItem newDetail = new Model.Report_CQMS_MonthReportItem
|
||||
{
|
||||
ReportId = ReportId,
|
||||
ReType = "10-2",
|
||||
ContentName = values.Value<string>("WorkName"),
|
||||
MonthsCount = values.Value<int>("CheckNum"), //当前检查点数
|
||||
MonthsBackCount = values.Value<int>("TotalCheckNum"),//累计点数
|
||||
|
||||
ProjectCount = values.Value<int>("OKNum"),//当前合格点数
|
||||
TotalNoBackCount = values.Value<int>("TotalOKNum"),//累计合格点数
|
||||
|
||||
RectificationRate = values.Value<string>("OneOKRate"),//本月合格点数
|
||||
Remarks = values.Value<string>("TotalOneOKRate"),//本月累计合格点数
|
||||
};
|
||||
if (GvSb.Rows[rowIndex].DataKeys.Length > 0)
|
||||
{
|
||||
newDetail.Id = GvSb.Rows[rowIndex].DataKeys[0].ToString();
|
||||
}
|
||||
detailLists.Add(newDetail);
|
||||
}
|
||||
if (detailLists.Count > 0)
|
||||
{
|
||||
Funs.DB.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
void saveGDInspection() //检验批统计:管道
|
||||
{
|
||||
List<Model.Report_CQMS_MonthReportItem> detailLists = new List<Model.Report_CQMS_MonthReportItem>();
|
||||
JArray teamGroupData = GvGD.GetMergedData();
|
||||
foreach (JObject teamGroupRow in teamGroupData)
|
||||
{
|
||||
JObject values = teamGroupRow.Value<JObject>("values");
|
||||
int rowIndex = teamGroupRow.Value<int>("index");
|
||||
Model.Report_CQMS_MonthReportItem newDetail = new Model.Report_CQMS_MonthReportItem
|
||||
{
|
||||
ReportId = ReportId,
|
||||
ReType = "10-3",
|
||||
ContentName = values.Value<string>("WorkName"),
|
||||
MonthsCount = values.Value<int>("CheckNum"), //当前检查点数
|
||||
MonthsBackCount = values.Value<int>("TotalCheckNum"),//累计点数
|
||||
|
||||
ProjectCount = values.Value<int>("OKNum"),//当前合格点数
|
||||
TotalNoBackCount = values.Value<int>("TotalOKNum"),//累计合格点数
|
||||
|
||||
RectificationRate = values.Value<string>("OneOKRate"),//本月合格点数
|
||||
Remarks = values.Value<string>("TotalOneOKRate"),//本月累计合格点数
|
||||
};
|
||||
if (GvGD.Rows[rowIndex].DataKeys.Length > 0)
|
||||
{
|
||||
newDetail.Id = GvGD.Rows[rowIndex].DataKeys[0].ToString();
|
||||
}
|
||||
detailLists.Add(newDetail);
|
||||
}
|
||||
if (detailLists.Count > 0)
|
||||
{
|
||||
Funs.DB.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
void saveDQInspection() //检验批统计:电气
|
||||
{
|
||||
List<Model.Report_CQMS_MonthReportItem> detailLists = new List<Model.Report_CQMS_MonthReportItem>();
|
||||
JArray teamGroupData = GvDq.GetMergedData();
|
||||
foreach (JObject teamGroupRow in teamGroupData)
|
||||
{
|
||||
JObject values = teamGroupRow.Value<JObject>("values");
|
||||
int rowIndex = teamGroupRow.Value<int>("index");
|
||||
Model.Report_CQMS_MonthReportItem newDetail = new Model.Report_CQMS_MonthReportItem
|
||||
{
|
||||
ReportId = ReportId,
|
||||
ReType = "10-4",
|
||||
ContentName = values.Value<string>("WorkName"),
|
||||
MonthsCount = values.Value<int>("CheckNum"), //当前检查点数
|
||||
MonthsBackCount = values.Value<int>("TotalCheckNum"),//累计点数
|
||||
|
||||
ProjectCount = values.Value<int>("OKNum"),//当前合格点数
|
||||
TotalNoBackCount = values.Value<int>("TotalOKNum"),//累计合格点数
|
||||
|
||||
RectificationRate = values.Value<string>("OneOKRate"),//本月合格点数
|
||||
Remarks = values.Value<string>("TotalOneOKRate"),//本月累计合格点数
|
||||
};
|
||||
if (GvDq.Rows[rowIndex].DataKeys.Length > 0)
|
||||
{
|
||||
newDetail.Id = GvDq.Rows[rowIndex].DataKeys[0].ToString();
|
||||
}
|
||||
detailLists.Add(newDetail);
|
||||
}
|
||||
if (detailLists.Count > 0)
|
||||
{
|
||||
Funs.DB.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
void saveYBInspection() //检验批统计:仪表
|
||||
{
|
||||
List<Model.Report_CQMS_MonthReportItem> detailLists = new List<Model.Report_CQMS_MonthReportItem>();
|
||||
JArray teamGroupData = GvYb.GetMergedData();
|
||||
foreach (JObject teamGroupRow in teamGroupData)
|
||||
{
|
||||
JObject values = teamGroupRow.Value<JObject>("values");
|
||||
int rowIndex = teamGroupRow.Value<int>("index");
|
||||
Model.Report_CQMS_MonthReportItem newDetail = new Model.Report_CQMS_MonthReportItem
|
||||
{
|
||||
ReportId = ReportId,
|
||||
ReType = "10-5",
|
||||
ContentName = values.Value<string>("WorkName"),
|
||||
MonthsCount = values.Value<int>("CheckNum"), //当前检查点数
|
||||
MonthsBackCount = values.Value<int>("TotalCheckNum"),//累计点数
|
||||
|
||||
ProjectCount = values.Value<int>("OKNum"),//当前合格点数
|
||||
TotalNoBackCount = values.Value<int>("TotalOKNum"),//累计合格点数
|
||||
|
||||
RectificationRate = values.Value<string>("OneOKRate"),//本月合格点数
|
||||
Remarks = values.Value<string>("TotalOneOKRate"),//本月累计合格点数
|
||||
};
|
||||
if (GvYb.Rows[rowIndex].DataKeys.Length > 0)
|
||||
{
|
||||
newDetail.Id = GvYb.Rows[rowIndex].DataKeys[0].ToString();
|
||||
}
|
||||
detailLists.Add(newDetail);
|
||||
}
|
||||
if (detailLists.Count > 0)
|
||||
{
|
||||
Funs.DB.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
void saveFFInspection() //检验批统计:防腐
|
||||
{
|
||||
List<Model.Report_CQMS_MonthReportItem> detailLists = new List<Model.Report_CQMS_MonthReportItem>();
|
||||
JArray teamGroupData = GvFf.GetMergedData();
|
||||
foreach (JObject teamGroupRow in teamGroupData)
|
||||
{
|
||||
JObject values = teamGroupRow.Value<JObject>("values");
|
||||
int rowIndex = teamGroupRow.Value<int>("index");
|
||||
Model.Report_CQMS_MonthReportItem newDetail = new Model.Report_CQMS_MonthReportItem
|
||||
{
|
||||
ReportId = ReportId,
|
||||
ReType = "10-6",
|
||||
ContentName = values.Value<string>("WorkName"),
|
||||
MonthsCount = values.Value<int>("CheckNum"), //当前检查点数
|
||||
MonthsBackCount = values.Value<int>("TotalCheckNum"),//累计点数
|
||||
|
||||
ProjectCount = values.Value<int>("OKNum"),//当前合格点数
|
||||
TotalNoBackCount = values.Value<int>("TotalOKNum"),//累计合格点数
|
||||
|
||||
RectificationRate = values.Value<string>("OneOKRate"),//本月合格点数
|
||||
Remarks = values.Value<string>("TotalOneOKRate"),//本月累计合格点数
|
||||
};
|
||||
if (GvFf.Rows[rowIndex].DataKeys.Length > 0)
|
||||
{
|
||||
newDetail.Id = GvFf.Rows[rowIndex].DataKeys[0].ToString();
|
||||
}
|
||||
detailLists.Add(newDetail);
|
||||
}
|
||||
if (detailLists.Count > 0)
|
||||
{
|
||||
Funs.DB.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
void saveXFInspection() //检验批统计:消防
|
||||
{
|
||||
List<Model.Report_CQMS_MonthReportItem> detailLists = new List<Model.Report_CQMS_MonthReportItem>();
|
||||
JArray teamGroupData = GvXf.GetMergedData();
|
||||
foreach (JObject teamGroupRow in teamGroupData)
|
||||
{
|
||||
JObject values = teamGroupRow.Value<JObject>("values");
|
||||
int rowIndex = teamGroupRow.Value<int>("index");
|
||||
Model.Report_CQMS_MonthReportItem newDetail = new Model.Report_CQMS_MonthReportItem
|
||||
{
|
||||
ReportId = ReportId,
|
||||
ReType = "10-7",
|
||||
ContentName = values.Value<string>("WorkName"),
|
||||
MonthsCount = values.Value<int>("CheckNum"), //当前检查点数
|
||||
MonthsBackCount = values.Value<int>("TotalCheckNum"),//累计点数
|
||||
|
||||
ProjectCount = values.Value<int>("OKNum"),//当前合格点数
|
||||
TotalNoBackCount = values.Value<int>("TotalOKNum"),//累计合格点数
|
||||
|
||||
RectificationRate = values.Value<string>("OneOKRate"),//本月合格点数
|
||||
Remarks = values.Value<string>("TotalOneOKRate"),//本月累计合格点数
|
||||
};
|
||||
if (GvXf.Rows[rowIndex].DataKeys.Length > 0)
|
||||
{
|
||||
newDetail.Id = GvXf.Rows[rowIndex].DataKeys[0].ToString();
|
||||
}
|
||||
detailLists.Add(newDetail);
|
||||
}
|
||||
if (detailLists.Count > 0)
|
||||
{
|
||||
Funs.DB.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
void saveInspectionDataInspection()
|
||||
{
|
||||
List<Model.Report_CQMS_MonthReportItem> detailLists = new List<Model.Report_CQMS_MonthReportItem>();
|
||||
|
@ -1602,11 +1855,11 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
{
|
||||
ReportId = ReportId,
|
||||
ReType = "10",
|
||||
ContentName = values.Value<string>("ContentName"),
|
||||
MonthsCount = values.Value<int>("MonthsCount"),
|
||||
ProjectCount = values.Value<int>("ProjectCount"),
|
||||
//RectificationRate = values.Value<string>("RectificationRate"),
|
||||
Remarks = values.Value<string>("Remarks")
|
||||
ContentName = values.Value<string>("WorkName"),
|
||||
RectificationRate = values.Value<string>("OneOKRate"),
|
||||
TotationRate = values.Value<string>("TotalOneOKRate"),
|
||||
|
||||
Remarks = values.Value<string>("Remarks"),
|
||||
};
|
||||
if (gvInspectionDataInspection.Rows[rowIndex].DataKeys.Length > 0)
|
||||
{
|
||||
|
|
Binary file not shown.
|
@ -479,6 +479,10 @@
|
|||
<Content Include="CQMS\Comprehensive\SpecialEquipment.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\SpecialEquipmentApprove.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\SpecialEquipmentEdit.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\TrainingRecords.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\TrainingRecordsDataIn.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\TrainingRecordsDataInEdit.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\TrainingRecordsEdit.aspx" />
|
||||
<Content Include="CQMS\DataBase\ConstructionStandardList.aspx" />
|
||||
<Content Include="CQMS\DataBase\ConstructionStandardListEdit.aspx" />
|
||||
<Content Include="CQMS\DataBase\ConstructionStandardListProject.aspx" />
|
||||
|
@ -7721,6 +7725,34 @@
|
|||
<Compile Include="CQMS\Comprehensive\SpecialEquipmentEdit.aspx.designer.cs">
|
||||
<DependentUpon>SpecialEquipmentEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\TrainingRecords.aspx.cs">
|
||||
<DependentUpon>TrainingRecords.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\TrainingRecords.aspx.designer.cs">
|
||||
<DependentUpon>TrainingRecords.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\TrainingRecordsDataIn.aspx.cs">
|
||||
<DependentUpon>TrainingRecordsDataIn.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\TrainingRecordsDataIn.aspx.designer.cs">
|
||||
<DependentUpon>TrainingRecordsDataIn.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\TrainingRecordsDataInEdit.aspx.cs">
|
||||
<DependentUpon>TrainingRecordsDataInEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\TrainingRecordsDataInEdit.aspx.designer.cs">
|
||||
<DependentUpon>TrainingRecordsDataInEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\TrainingRecordsEdit.aspx.cs">
|
||||
<DependentUpon>TrainingRecordsEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\TrainingRecordsEdit.aspx.designer.cs">
|
||||
<DependentUpon>TrainingRecordsEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\DataBase\ConstructionStandardList.aspx.cs">
|
||||
<DependentUpon>ConstructionStandardList.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
<add verb="GET" path="res.axd" type="FineUIPro.ResourceHandler, FineUIPro" validate="false"/>
|
||||
<add path="ChartImg.axd" verb="GET,POST,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
|
||||
</httpHandlers>
|
||||
<compilation debug="false" targetFramework="4.6.1"/>
|
||||
<compilation debug="true" targetFramework="4.6.1"/>
|
||||
<httpRuntime requestValidationMode="2.0" maxRequestLength="2147483647" executionTimeout="36000"/>
|
||||
<authentication mode="Forms">
|
||||
<forms loginUrl="Login.aspx" name="PUBLISHERCOOKIE" protection="All" timeout="1440" path="/"/>
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
<TreeNode id="49b87812-c07d-4b0e-9909-960e5cd822c7" Text="压力管道管理" NavigateUrl="CQMS/Comprehensive/PressurePipe.aspx"></TreeNode>
|
||||
<TreeNode id="1da8fd71-f653-4764-bbfd-65e43f0220e5" Text="质量事故处理记录" NavigateUrl="CQMS/Comprehensive/QualityAccident.aspx"></TreeNode>
|
||||
<TreeNode id="E7C8C938-661C-438F-852F-F0A4C285306B" Text="资料收发文登记记录" NavigateUrl="CQMS/Comprehensive/DataReceivingDoc.aspx"></TreeNode>
|
||||
<TreeNode id="CFD19410-DF80-494A-A2DD-D23A03438742" Text="培训记录" NavigateUrl="CQMS/Comprehensive/TrainingRecords.aspx"></TreeNode>
|
||||
<TreeNode id="d8de4143-b680-44cf-9a78-acd3d49a8d00" Text="图纸收发记录" NavigateUrl="CQMS/Comprehensive/DesignDrawings.aspx"></TreeNode>
|
||||
<TreeNode id="856D53B3-C5FB-443F-917B-39E83BE685DB" Text="图纸会审管理" NavigateUrl="CQMS/Comprehensive/ReviewDrawings.aspx"></TreeNode>
|
||||
<TreeNode id="B2086D3A-2384-487E-AFFB-6FACDD09B621" Text="质量数据" NavigateUrl="ZHGL/DataSync/ProjectDataSync/Project_CQMSData_CQMS.aspx"></TreeNode>
|
||||
|
@ -42,7 +43,7 @@
|
|||
<TreeNode id="267064F1-88F7-4468-998A-49A1A2F25BB8" Text="季度工程项目质量信息表" NavigateUrl="CQMS/ManageReport/QuarterlyProjectQuality.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="A54EC449-5F77-4068-83B9-AA305B721A0B" Text="质量检查" NavigateUrl=""><TreeNode id="B3E99BD9-FDC7-4F15-8C3C-A7821AC9E306" Text="质量巡检" NavigateUrl="CQMS/Check/CheckList.aspx"></TreeNode>
|
||||
<TreeNode id="E6703F32-4E42-4D03-84B3-5EC0E8E48E0F" Text="质量共检" NavigateUrl="CQMS/Check/JointCheck.aspx"></TreeNode>
|
||||
<TreeNode id="E6703F32-4E42-4D03-84B3-5EC0E8E48E0F" Text="质量专项检查" NavigateUrl="CQMS/Check/JointCheck.aspx"></TreeNode>
|
||||
<TreeNode id="D3B1433E-00DE-432B-A30A-0EFB513480A8" Text="问题统计" NavigateUrl="CQMS/Check/JointCheckStatistics.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="BBBF69F1-9520-4E0A-B0C0-9F4D3FBF4C10" Text="施工方案管理" NavigateUrl=""><TreeNode id="91C4BFDB-0A51-4992-99CC-EB4EC185593D" Text="施工方案" NavigateUrl="CQMS/Solution/ConstructSolution.aspx"></TreeNode>
|
||||
|
|
|
@ -97,8 +97,8 @@
|
|||
<TreeNode id="F76B40FD-BF9A-4751-86F9-D9E11310B04D" Text="其他巡检记录管理" NavigateUrl="TestRun/ProduceTestRun/TestRunOthersCheck.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="F4827DE7-FDA6-42B6-A495-616EEFC4C8A5" Text="生产性能考核管理" NavigateUrl=""><TreeNode id="AC5BC922-FA5E-4141-8458-7DE89434A8E7" Text="检查表模板" NavigateUrl="TestRun/Produce/InspectTemplate.aspx"></TreeNode>
|
||||
<TreeNode id="BEAE1E66-5783-489B-A268-F46491AE1257" Text="投料试车管理" NavigateUrl="TestRun/Produce/SubInspectTerm.aspx"></TreeNode>
|
||||
<TreeNode id="D8DF6DDB-3CDD-41C0-B374-1AAE40802B68" Text="投料试车确认" NavigateUrl="TestRun/Produce/SubWorkInspect.aspx"></TreeNode>
|
||||
<TreeNode id="BEAE1E66-5783-489B-A268-F46491AE1257" Text="性能考核管理" NavigateUrl="TestRun/Produce/SubInspectTerm.aspx"></TreeNode>
|
||||
<TreeNode id="D8DF6DDB-3CDD-41C0-B374-1AAE40802B68" Text="性能考核确认" NavigateUrl="TestRun/Produce/SubWorkInspect.aspx"></TreeNode>
|
||||
<TreeNode id="C2E827C4-6E04-4EB6-8E51-B43FCBD3753F" Text="检查表尾项管理" NavigateUrl="TestRun/Produce/InspectTailTermList.aspx"></TreeNode>
|
||||
<TreeNode id="AF4EEC31-73E9-4F36-BEA7-2A92468F324E" Text="尾项处理" NavigateUrl="TestRun/Produce/TailTermHandleList.aspx"></TreeNode>
|
||||
<TreeNode id="7400F47B-3F45-4142-B21F-3BECCABBB202" Text="尾项审核" NavigateUrl="TestRun/Produce/TailTermApproveList.aspx"></TreeNode>
|
||||
|
|
2316
SGGL/Model/Model.cs
2316
SGGL/Model/Model.cs
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue