20250307 综合管理导入
This commit is contained in:
parent
029a8bf07a
commit
e4fdb97d07
|
@ -1,7 +1,5 @@
|
|||
using BLL;
|
||||
using FineUIPro.Web.ProjectData;
|
||||
using Model;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
|
@ -9,9 +7,6 @@ using System.Data.SqlClient;
|
|||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
|
@ -394,12 +389,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
Ins.DisclosureDate = Funs.GetNewDateTime(tempData.Value6.Trim());
|
||||
if (Ins.DisclosureCode == null)
|
||||
{
|
||||
errInfo += "交底日期[" + tempData.Value6.Trim() + "]不存在;";
|
||||
errInfo += "交底日期[" + tempData.Value6.Trim() + "]格式错误;";
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
errInfo += "交底日期[" + tempData.Value6.Trim() + "]不存在;";
|
||||
errInfo += "交底日期[" + tempData.Value6.Trim() + "]格式错误;";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value7.Trim()))
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="资料收发文登记记录" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="DataReceivingDocId" AllowCellEditing="true" EnableColumnLines="true"
|
||||
ClicksToEdit="2" DataIDField="DataReceivingDocId" AllowSorting="true" SortField="ReceiveDate"
|
||||
SortDirection="DESC" OnSort="Grid1_Sort"
|
||||
ClicksToEdit="2" DataIDField="DataReceivingDocId" AllowSorting="true" SortField="RemarkCode"
|
||||
SortDirection="ASC" OnSort="Grid1_Sort"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="true">
|
||||
<Toolbars>
|
||||
|
@ -159,7 +159,7 @@
|
|||
</f:Window>
|
||||
<f:Window ID="Window2" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Top" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||
Width="700px" Height="560px">
|
||||
Width="1200px" Height="660px">
|
||||
</f:Window>
|
||||
<%--<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true"
|
||||
EnableMaximize="true" Target="Parent" EnableResize="false" runat="server"
|
||||
|
|
|
@ -214,7 +214,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
/// <param name="e"></param>
|
||||
protected void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("DataReceivingDocDataIn.aspx", "导入 - ")));
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("DataReceivingDocDataInNew.aspx", "导入 - ")));
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -0,0 +1,205 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DataReceivingDocDataInNew.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.DataReceivingDocDataInNew" %>
|
||||
|
||||
<!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" Hidden="true">
|
||||
</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:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center" TextAlign="Center" />
|
||||
<f:RenderField Width="70px" HeaderText="行号" ColumnID="RowNo" DataField="RowNo" SortField="RowNo"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" HeaderText="日期" ColumnID="Value1" DataField="Value1" SortField="Value1"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:WindowField ColumnID="Value2" HeaderTextAlign="Center" TextAlign="Left" Width="150px" WindowID="Window1" HeaderText="文件号"
|
||||
DataTextField="Value2" DataIFrameUrlFields="TempId" DataIFrameUrlFormatString="DataReceivingDocDataInNewEdit.aspx?TempId={0}"
|
||||
Title="文件号" DataToolTipField="ToopValue" SortField="Value2">
|
||||
</f:WindowField>
|
||||
<f:RenderField Width="130px" HeaderText="文件名称" ColumnID="Value3" DataField="Value3" SortField="Value3"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" HeaderText="文件类别" ColumnID="Value4" DataField="Value4" SortField="Value4"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" HeaderText="专业" ColumnID="Value5" DataField="Value5" SortField="Value5"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="180px" HeaderText="发件单位" ColumnID="Value6" DataField="Value6" SortField="Value6"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" HeaderText="发件人" ColumnID="Value7" DataField="Value7" SortField="Value7"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" HeaderText="份数" ColumnID="Value8" DataField="Value8" SortField="Value8"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" HeaderText="文件处理人" ColumnID="Value9" DataField="Value9" SortField="Value9"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" HeaderText="上报日期" ColumnID="Value10" DataField="Value10" SortField="Value10"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="180px" HeaderText="上报接收单位" ColumnID="Value11" DataField="Value11" SortField="Value11"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" HeaderText="接收人" ColumnID="Value12" DataField="Value12" SortField="Value12"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" HeaderText="是否需回复" ColumnID="Value13" DataField="Value13" SortField="Value13"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" HeaderText="返回五环日期" ColumnID="Value14" DataField="Value14" SortField="Value14"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" HeaderText="返回五环份数" ColumnID="Value15" DataField="Value15" SortField="Value15"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="180px" HeaderText="下发至单位" ColumnID="Value16" DataField="Value16" SortField="Value16"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" HeaderText="下发份数" ColumnID="Value17" DataField="Value17" SortField="Value17"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" HeaderText="下发单位接收人" ColumnID="Value18" DataField="Value18" SortField="Value18"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" HeaderText="是否存档" ColumnID="Value19" DataField="Value19" SortField="Value19"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" HeaderText="标志编号" ColumnID="Value20" DataField="Value20" SortField="Value20"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</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,674 @@
|
|||
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 DataReceivingDocDataInNew : PageBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 错误集合
|
||||
/// </summary>
|
||||
public static string errorInfos = string.Empty;
|
||||
|
||||
#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"
|
||||
+ @",ToopValue,Type"
|
||||
+ @" FROM Sys_CQMS_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", "DataReceivingDoc"));
|
||||
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_CQMS_DataInTemp
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UserId == this.CurrUser.UserId && x.Type == "DataReceivingDoc"
|
||||
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;
|
||||
}
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DataReceivingDocDataInNewEdit.aspx?TempId={0}", Grid1.SelectedRowID, "维护 - ")));
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 导入信息 维护
|
||||
/// <summary>
|
||||
/// 导入信息编辑
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DataReceivingDocDataInNewEdit.aspx?TempId={0}", Grid1.SelectedRowID, "维护 - ")));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
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_CQMS_DataInTempService.DeleteDataInTempByDataInTempID(rowID);
|
||||
}
|
||||
|
||||
ShowNotify("删除成功!", MessageBoxIcon.Success);
|
||||
this.BindGrid();
|
||||
}
|
||||
#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 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 + Const.ExcelUrl;
|
||||
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 + Const.ExcelUrl + 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 = 2; i < ds.Tables[0].Rows.Count; i++)
|
||||
{
|
||||
Sys_CQMS_DataInTemp newDataInTemp = new Sys_CQMS_DataInTemp();
|
||||
newDataInTemp.TempId = SQLHelper.GetNewID(typeof(Model.Sys_CQMS_DataInTemp));
|
||||
newDataInTemp.ProjectId = this.CurrUser.LoginProjectId;
|
||||
newDataInTemp.UserId = this.CurrUser.UserId;
|
||||
newDataInTemp.Time = System.DateTime.Now;
|
||||
newDataInTemp.Type = "DataReceivingDoc";
|
||||
newDataInTemp.RowNo = i + 2;
|
||||
newDataInTemp.Value1 = ds.Tables[0].Rows[i][0].ToString();
|
||||
newDataInTemp.Value2 = ds.Tables[0].Rows[i][1].ToString();
|
||||
newDataInTemp.Value3 = ds.Tables[0].Rows[i][2].ToString();
|
||||
newDataInTemp.Value4 = ds.Tables[0].Rows[i][3].ToString();
|
||||
newDataInTemp.Value5 = ds.Tables[0].Rows[i][4].ToString();
|
||||
newDataInTemp.Value6 = ds.Tables[0].Rows[i][5].ToString();
|
||||
newDataInTemp.Value7 = ds.Tables[0].Rows[i][6].ToString();
|
||||
newDataInTemp.Value8 = ds.Tables[0].Rows[i][7].ToString();
|
||||
newDataInTemp.Value9 = ds.Tables[0].Rows[i][8].ToString();
|
||||
newDataInTemp.Value10 = ds.Tables[0].Rows[i][9].ToString();
|
||||
newDataInTemp.Value11 = ds.Tables[0].Rows[i][10].ToString();
|
||||
newDataInTemp.Value12 = ds.Tables[0].Rows[i][11].ToString();
|
||||
newDataInTemp.Value13 = ds.Tables[0].Rows[i][12].ToString();
|
||||
newDataInTemp.Value14 = ds.Tables[0].Rows[i][13].ToString();
|
||||
newDataInTemp.Value15 = ds.Tables[0].Rows[i][14].ToString();
|
||||
newDataInTemp.Value16 = ds.Tables[0].Rows[i][15].ToString();
|
||||
newDataInTemp.Value17 = ds.Tables[0].Rows[i][16].ToString();
|
||||
newDataInTemp.Value18 = ds.Tables[0].Rows[i][17].ToString();
|
||||
newDataInTemp.Value19 = ds.Tables[0].Rows[i][18].ToString();
|
||||
newDataInTemp.Value20 = ds.Tables[0].Rows[i][19].ToString();
|
||||
|
||||
BLL.Sys_CQMS_DataInTempService.AddDataInTemp(newDataInTemp);
|
||||
}
|
||||
this.BindGrid();
|
||||
ShowNotify("数据已导入临时表!", MessageBoxIcon.Success);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("导入数据为空!", MessageBoxIcon.Success);
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Alert.ShowInTop("'" + ex.Message + "'", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
#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) + ".xls");
|
||||
Response.ContentType = "application/excel";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
Response.Write(GetGridTableHtml(Grid1));
|
||||
Response.End();
|
||||
}
|
||||
#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, "DataReceivingDoc"); }));
|
||||
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, string IsPDMS)
|
||||
{
|
||||
var oldViewInfos = from x in Funs.DB.Comprehensive_DataReceivingDoc
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
select x;
|
||||
|
||||
var units = from x in Funs.DB.Base_Unit
|
||||
join y in Funs.DB.Project_ProjectUnit on x.UnitId equals y.UnitId
|
||||
where y.ProjectId == this.CurrUser.LoginProjectId
|
||||
select x;
|
||||
|
||||
var cns = from x in Funs.DB.Base_CNProfessional select x;
|
||||
|
||||
var dataInTemp = from x in Funs.DB.Sys_CQMS_DataInTemp
|
||||
where x.ProjectId == LoginProjectId && x.UserId == UserId && x.Type == "DataReceivingDoc"
|
||||
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;
|
||||
|
||||
Model.Comprehensive_DataReceivingDoc Ins = new Model.Comprehensive_DataReceivingDoc();
|
||||
if (!string.IsNullOrEmpty(tempData.Value1.Trim()))
|
||||
{
|
||||
Ins.ReceiveDate = Funs.GetNewDateTime(tempData.Value1.Trim());
|
||||
if (Ins.ReceiveDate == null)
|
||||
{
|
||||
errInfo += "日期[" + tempData.Value1.Trim() + "]错误;";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
errInfo += "日期为必填项;";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value2.Trim()))
|
||||
{
|
||||
Ins.FileCode = tempData.Value2.Trim();
|
||||
}
|
||||
else
|
||||
{
|
||||
errInfo += "文件号为必填项;";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value3.Trim()))
|
||||
{
|
||||
Ins.FileName = tempData.Value3.Trim();
|
||||
}
|
||||
else
|
||||
{
|
||||
errInfo += "文件名称为必填项;";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value4.Trim()))
|
||||
{
|
||||
Ins.FileType = tempData.Value4.Trim();
|
||||
}
|
||||
else
|
||||
{
|
||||
errInfo += "文件类别为必填项;";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value5.Trim()))
|
||||
{
|
||||
var cn = cns.Where(x => x.ProfessionalName == tempData.Value5.Trim()).FirstOrDefault();
|
||||
if (cn == null)
|
||||
{
|
||||
errInfo += "专业[" + tempData.Value5.Trim() + "]不存在;";
|
||||
}
|
||||
else
|
||||
{
|
||||
Ins.CNProfessionalId = cn.CNProfessionalId;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
errInfo += "专业为必填项;";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value6.Trim()))
|
||||
{
|
||||
var unit = units.FirstOrDefault(x => x.UnitName == tempData.Value6.Trim());
|
||||
if (unit == null)
|
||||
{
|
||||
errInfo += "发件单位[" + tempData.Value6.Trim() + "]不存在;";
|
||||
}
|
||||
else
|
||||
{
|
||||
Ins.SendUnit = unit.UnitId;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
errInfo += "发件单位为必填项;";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value7.Trim()))
|
||||
{
|
||||
Ins.SendMan = tempData.Value7.Trim();
|
||||
}
|
||||
else
|
||||
{
|
||||
errInfo += "发件人为必填项;";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value8.Trim()))
|
||||
{
|
||||
try
|
||||
{
|
||||
Ins.Copies = Funs.GetNewInt(tempData.Value8.Trim());
|
||||
if (Ins.Copies == null)
|
||||
{
|
||||
errInfo += "份数[" + tempData.Value8.Trim() + "]格式错误;";
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
errInfo += "份数[" + tempData.Value8.Trim() + "]格式错误;";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
errInfo += "份数为必填项;";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value9.Trim()))
|
||||
{
|
||||
Ins.DocumentHandler = tempData.Value9.Trim();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value10.Trim()))
|
||||
{
|
||||
try
|
||||
{
|
||||
Ins.SendDate = Funs.GetNewDateTime(tempData.Value10.Trim());
|
||||
if (Ins.SendDate == null)
|
||||
{
|
||||
errInfo += "上报日期[" + tempData.Value10.Trim() + "]格式错误;";
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
errInfo += "上报日期[" + tempData.Value10.Trim() + "]格式错误;";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value11.Trim()))
|
||||
{
|
||||
string unitIds = string.Empty;
|
||||
string[] reunit = tempData.Value11.Trim().Split(',');
|
||||
foreach (string unitName in reunit)
|
||||
{
|
||||
var u = units.Where(x => x.UnitName == unitName.Trim()).FirstOrDefault();
|
||||
if (u == null)
|
||||
{
|
||||
errInfo += "上报接收单位[" + unitName.Trim() + "]不存在;";
|
||||
}
|
||||
else
|
||||
{
|
||||
var q = BLL.UnitService.getUnitByUnitName(unitName.Trim()).UnitId;
|
||||
unitIds += q + ",";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(unitIds))
|
||||
{
|
||||
unitIds = unitIds.Substring(0, unitIds.LastIndexOf(","));
|
||||
}
|
||||
Ins.ReceiveUnit = unitIds;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value12.Trim()))
|
||||
{
|
||||
Ins.ReceiveMan = tempData.Value12.Trim();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value13.Trim()))
|
||||
{
|
||||
if (tempData.Value13.Trim()!="是"&& tempData.Value13.Trim()!="否")
|
||||
{
|
||||
errInfo += "是否需回复[" + tempData.Value13.Trim() + "]错误;";
|
||||
}
|
||||
else
|
||||
{
|
||||
Ins.IsReply = tempData.Value13.Trim() == "是" ? true : false;
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value14.Trim()))
|
||||
{
|
||||
try
|
||||
{
|
||||
Ins.ReturnWuhuangDate = Funs.GetNewDateTime(tempData.Value14.Trim());
|
||||
if (Ins.ReturnWuhuangDate == null)
|
||||
{
|
||||
errInfo += "返回五环日期[" + tempData.Value14.Trim() + "]格式错误;";
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
errInfo += "返回五环日期[" + tempData.Value14.Trim() + "]格式错误;";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value15.Trim()))
|
||||
{
|
||||
try
|
||||
{
|
||||
Ins.RetrunWuhuangCopies = Funs.GetNewInt(tempData.Value15.Trim());
|
||||
if (Ins.RetrunWuhuangCopies == null)
|
||||
{
|
||||
errInfo += "返回五环份数[" + tempData.Value15.Trim() + "]格式错误;";
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
errInfo += "返回五环份数[" + tempData.Value15.Trim() + "]格式错误;";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value16.Trim()))
|
||||
{
|
||||
string unitIds = string.Empty;
|
||||
string[] reunit = tempData.Value16.Trim().Split(',');
|
||||
foreach (string unitName in reunit)
|
||||
{
|
||||
var u = units.Where(x => x.UnitName == unitName.Trim()).FirstOrDefault();
|
||||
if (u == null)
|
||||
{
|
||||
errInfo += "下发至单位[" + unitName.Trim() + "]不存在;";
|
||||
}
|
||||
else
|
||||
{
|
||||
var q = BLL.UnitService.getUnitByUnitName(unitName.Trim()).UnitId;
|
||||
unitIds += q + ",";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(unitIds))
|
||||
{
|
||||
unitIds = unitIds.Substring(0, unitIds.LastIndexOf(","));
|
||||
}
|
||||
Ins.IssueToUnit = unitIds;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value17.Trim()))
|
||||
{
|
||||
try
|
||||
{
|
||||
Ins.IssueCopies = Funs.GetNewInt(tempData.Value17.Trim());
|
||||
if (Ins.IssueCopies==null)
|
||||
{
|
||||
errInfo += "下发份数[" + Ins.IssueCopies + "]格式错误;";
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
errInfo += "下发份数[" + Ins.IssueCopies + "]格式错误;";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value18.Trim()))
|
||||
{
|
||||
Ins.IssueUnitReceiver = tempData.Value18.Trim();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value19.Trim()))
|
||||
{
|
||||
if (tempData.Value19.Trim()!="是"&& tempData.Value19.Trim()!="否")
|
||||
{
|
||||
errInfo += "是否存档[" + tempData.Value19.Trim() + "]错误;";
|
||||
}
|
||||
else
|
||||
{
|
||||
Ins.IsOnFile = tempData.Value19.Trim() == "是" ? true : false;
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value20.Trim()))
|
||||
{
|
||||
try
|
||||
{
|
||||
Ins.RemarkCode = Funs.GetNewInt(tempData.Value20.Trim());
|
||||
if (Ins.RemarkCode == null)
|
||||
{
|
||||
errInfo += "标志编号[" + tempData.Value20.Trim() + "]格式错误;";
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
errInfo += "标志编号[" + tempData.Value20.Trim() + "]格式错误;";
|
||||
}
|
||||
}
|
||||
Ins.CompileMan = this.CurrUser.UserId;
|
||||
Ins.CompileDate = DateTime.Now.Date;
|
||||
if (string.IsNullOrEmpty(errInfo)) ////所有信息正确的话 插入数据
|
||||
{
|
||||
Ins.ProjectId = LoginProjectId;
|
||||
var isExitISOValue = oldViewInfos.FirstOrDefault(x => x.RemarkCode == Funs.GetNewIntOrZero(tempData.Value20));
|
||||
if (isExitISOValue != null) ///已存在
|
||||
{
|
||||
Ins.DataReceivingDocId = isExitISOValue.DataReceivingDocId;
|
||||
BLL.DataReceivingDocService.UpdateDataReceivingDoc(Ins);
|
||||
}
|
||||
else
|
||||
{
|
||||
Ins.DataReceivingDocId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DataReceivingDoc));
|
||||
BLL.DataReceivingDocService.AddDataReceivingDoc(Ins);
|
||||
}
|
||||
BLL.Sys_CQMS_DataInTempService.DeleteDataInTempByDataInTempID(tempData.TempId);
|
||||
okCount++;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(errInfo))
|
||||
{
|
||||
tempData.ToopValue = errInfo;
|
||||
BLL.Sys_CQMS_DataInTempService.UpdateDataInTemp(tempData);
|
||||
erreMessage += errInfo + ";";
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 删除所有数据事件
|
||||
/// <summary>
|
||||
/// 删除所有数据事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAllDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
//先删除临时表中 该人员以前导入的数据
|
||||
BLL.Sys_CQMS_DataInTempService.DeleteDataInTempByProjectIdUserId(this.CurrUser.LoginProjectId, this.CurrUser.UserId, "DataReceivingDoc");
|
||||
this.BindGrid();
|
||||
ShowNotify("删除成功!", MessageBoxIcon.Success);
|
||||
this.lbDataCout.Text = string.Empty;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 模版导入说明 下载
|
||||
/// <summary>
|
||||
/// 下载模版
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void imgbtnUpload_Click(object sender, EventArgs e)
|
||||
{
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string uploadfilepath = rootPath + Const.CQMS_DataReceivingDocTempUrl;
|
||||
string filePath = Const.CQMS_DataReceivingDocTempUrl;
|
||||
string fileName = Path.GetFileName(filePath);
|
||||
FileInfo info = new FileInfo(uploadfilepath);
|
||||
long fileSize = info.Length;
|
||||
Response.ClearContent();
|
||||
Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
|
||||
Response.ContentType = "excel/plain";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
Response.AddHeader("Content-Length", fileSize.ToString().Trim());
|
||||
Response.TransmitFile(uploadfilepath, 0, fileSize);
|
||||
Response.End();
|
||||
}
|
||||
#endregion
|
||||
|
||||
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];
|
||||
}
|
||||
}
|
||||
}
|
251
SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocDataInNew.aspx.designer.cs
generated
Normal file
251
SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocDataInNew.aspx.designer.cs
generated
Normal file
|
@ -0,0 +1,251 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
|
||||
|
||||
public partial class DataReceivingDocDataInNew
|
||||
{
|
||||
|
||||
/// <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>
|
||||
/// 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>
|
||||
/// 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,101 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DataReceivingDocDataInNewEdit.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.DataReceivingDocDataInNewEdit" %>
|
||||
|
||||
<!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" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue2" Label="文件号" ShowRedStar="true" Required="true" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue3" Label="文件名称" ShowRedStar="true" Required="true" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue4" Label="文件类别" Required="true" ShowRedStar="true" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtValue5" Label="专业" ShowRedStar="true" Required="true" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue6" Label="发件单位" ShowRedStar="true" Required="true" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue7" Label="发件人" ShowRedStar="true" Required="true" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue8" Label="份数" ShowRedStar="true" Required="true" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtValue9" Label="文件处理人" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue10" Label="上报日期" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue11" Label="上报接收单位" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue12" Label="接收人" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtValue13" Label="是否需回复" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue14" Label="返回五环日期" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue15" Label="返回五环份数" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue16" Label="下发至单位" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtValue17" Label="下发份数" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue18" Label="下发单位接收人" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue19" Label="是否存档" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue20" Label="标志编号" Required="true" ShowRedStar="true" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<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,361 @@
|
|||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
public partial class DataReceivingDocDataInNewEdit : 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_CQMS_DataInTempService.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.txtValue8.Text = dataInTemp.Value8;
|
||||
this.txtValue9.Text = dataInTemp.Value9;
|
||||
this.txtValue10.Text = dataInTemp.Value10;
|
||||
this.txtValue11.Text = dataInTemp.Value11;
|
||||
this.txtValue12.Text = dataInTemp.Value12;
|
||||
this.txtValue13.Text = dataInTemp.Value13;
|
||||
this.txtValue14.Text = dataInTemp.Value14;
|
||||
this.txtValue15.Text = dataInTemp.Value15;
|
||||
this.txtValue16.Text = dataInTemp.Value16;
|
||||
this.txtValue17.Text = dataInTemp.Value17;
|
||||
this.txtValue18.Text = dataInTemp.Value18;
|
||||
this.txtValue19.Text = dataInTemp.Value19;
|
||||
this.txtValue20.Text = dataInTemp.Value20;
|
||||
|
||||
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_CQMS_DataInTempService.GetDataInTempByTempId(this.TempId);
|
||||
if (this.ckAll.Checked)
|
||||
{
|
||||
var allDataInTemp = from x in Funs.DB.Sys_CQMS_DataInTemp where x.ProjectId == this.CurrUser.LoginProjectId && x.UserId == this.CurrUser.UserId && x.Type == "DataReceivingDoc" 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value8 != this.txtValue8.Text.Trim())
|
||||
{
|
||||
var tempValue8 = allDataInTemp.Where(x => x.Value8 == dataInTemp.Value8 || (x.Value8 == null && dataInTemp.Value8 == null));
|
||||
if (tempValue8 != null)
|
||||
{
|
||||
foreach (var item in tempValue8)
|
||||
{
|
||||
item.Value8 = this.txtValue8.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value9 != this.txtValue9.Text.Trim())
|
||||
{
|
||||
var tempValue9 = allDataInTemp.Where(x => x.Value9 == dataInTemp.Value9 || (x.Value9 == null && dataInTemp.Value9 == null));
|
||||
if (tempValue9 != null)
|
||||
{
|
||||
foreach (var item in tempValue9)
|
||||
{
|
||||
item.Value9 = this.txtValue9.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value10 != this.txtValue10.Text.Trim())
|
||||
{
|
||||
var tempValue10 = allDataInTemp.Where(x => x.Value10 == dataInTemp.Value10 || (x.Value10 == null && dataInTemp.Value10 == null));
|
||||
if (tempValue10 != null)
|
||||
{
|
||||
foreach (var item in tempValue10)
|
||||
{
|
||||
item.Value10 = this.txtValue10.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value11 != this.txtValue11.Text.Trim())
|
||||
{
|
||||
var tempValue11 = allDataInTemp.Where(x => x.Value11 == dataInTemp.Value11 || (x.Value11 == null && dataInTemp.Value11 == null));
|
||||
if (tempValue11 != null)
|
||||
{
|
||||
foreach (var item in tempValue11)
|
||||
{
|
||||
item.Value11 = this.txtValue11.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value12 != this.txtValue12.Text.Trim())
|
||||
{
|
||||
var tempValue12 = allDataInTemp.Where(x => x.Value12 == dataInTemp.Value12 || (x.Value12 == null && dataInTemp.Value12 == null));
|
||||
if (tempValue12 != null)
|
||||
{
|
||||
foreach (var item in tempValue12)
|
||||
{
|
||||
item.Value12 = this.txtValue12.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value13 != this.txtValue13.Text.Trim())
|
||||
{
|
||||
var tempValue13 = allDataInTemp.Where(x => x.Value13 == dataInTemp.Value13 || (x.Value13 == null && dataInTemp.Value13 == null));
|
||||
if (tempValue13 != null)
|
||||
{
|
||||
foreach (var item in tempValue13)
|
||||
{
|
||||
item.Value13 = this.txtValue13.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value14 != this.txtValue14.Text.Trim())
|
||||
{
|
||||
var tempValue14 = allDataInTemp.Where(x => x.Value14 == dataInTemp.Value14 || (x.Value14 == null && dataInTemp.Value14 == null));
|
||||
if (tempValue14 != null)
|
||||
{
|
||||
foreach (var item in tempValue14)
|
||||
{
|
||||
item.Value14 = this.txtValue14.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value15 != this.txtValue15.Text.Trim())
|
||||
{
|
||||
var tempValue15 = allDataInTemp.Where(x => x.Value15 == dataInTemp.Value15 || (x.Value15 == null && dataInTemp.Value15 == null));
|
||||
if (tempValue15 != null)
|
||||
{
|
||||
foreach (var item in tempValue15)
|
||||
{
|
||||
item.Value15 = this.txtValue15.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value16 != this.txtValue16.Text.Trim())
|
||||
{
|
||||
var tempValue16 = allDataInTemp.Where(x => x.Value16 == dataInTemp.Value16 || (x.Value16 == null && dataInTemp.Value16 == null));
|
||||
if (tempValue16 != null)
|
||||
{
|
||||
foreach (var item in tempValue16)
|
||||
{
|
||||
item.Value16 = this.txtValue16.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value17 != this.txtValue17.Text.Trim())
|
||||
{
|
||||
var tempValue17 = allDataInTemp.Where(x => x.Value17 == dataInTemp.Value17 || (x.Value17 == null && dataInTemp.Value17 == null));
|
||||
if (tempValue17 != null)
|
||||
{
|
||||
foreach (var item in tempValue17)
|
||||
{
|
||||
item.Value17 = this.txtValue17.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value18 != this.txtValue18.Text.Trim())
|
||||
{
|
||||
var tempValue18 = allDataInTemp.Where(x => x.Value18 == dataInTemp.Value18 || (x.Value18 == null && dataInTemp.Value18 == null));
|
||||
if (tempValue18 != null)
|
||||
{
|
||||
foreach (var item in tempValue18)
|
||||
{
|
||||
item.Value18 = this.txtValue18.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value19 != this.txtValue19.Text.Trim())
|
||||
{
|
||||
var tempValue19 = allDataInTemp.Where(x => x.Value19 == dataInTemp.Value19 || (x.Value19 == null && dataInTemp.Value19 == null));
|
||||
if (tempValue19 != null)
|
||||
{
|
||||
foreach (var item in tempValue19)
|
||||
{
|
||||
item.Value19 = this.txtValue19.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value20 != this.txtValue20.Text.Trim())
|
||||
{
|
||||
var tempValue20 = allDataInTemp.Where(x => x.Value20 == dataInTemp.Value20 || (x.Value20 == null && dataInTemp.Value20 == null));
|
||||
if (tempValue20 != null)
|
||||
{
|
||||
foreach (var item in tempValue20)
|
||||
{
|
||||
item.Value20 = this.txtValue20.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_CQMS_DataInTemp newDataInTemp = new Model.Sys_CQMS_DataInTemp();
|
||||
newDataInTemp.ProjectId = this.CurrUser.LoginProjectId;
|
||||
newDataInTemp.UserId = this.CurrUser.UserId;
|
||||
newDataInTemp.Time = System.DateTime.Now;
|
||||
newDataInTemp.Type = "DataReceivingDoc";
|
||||
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();
|
||||
newDataInTemp.Value8 = this.txtValue8.Text.Trim();
|
||||
newDataInTemp.Value9 = this.txtValue9.Text.Trim();
|
||||
newDataInTemp.Value10 = this.txtValue10.Text.Trim();
|
||||
newDataInTemp.Value11 = this.txtValue11.Text.Trim();
|
||||
newDataInTemp.Value12 = this.txtValue12.Text.Trim();
|
||||
newDataInTemp.Value13 = this.txtValue13.Text.Trim();
|
||||
newDataInTemp.Value14 = this.txtValue14.Text.Trim();
|
||||
newDataInTemp.Value15 = this.txtValue15.Text.Trim();
|
||||
newDataInTemp.Value16 = this.txtValue16.Text.Trim();
|
||||
newDataInTemp.Value17 = this.txtValue17.Text.Trim();
|
||||
newDataInTemp.Value18 = this.txtValue18.Text.Trim();
|
||||
newDataInTemp.Value19 = this.txtValue19.Text.Trim();
|
||||
newDataInTemp.Value20 = this.txtValue20.Text.Trim();
|
||||
if (!string.IsNullOrEmpty(this.TempId))
|
||||
{
|
||||
newDataInTemp.TempId = this.TempId;
|
||||
newDataInTemp.ToopValue = null;
|
||||
BLL.Sys_CQMS_DataInTempService.UpdateDataInTemp(newDataInTemp);
|
||||
}
|
||||
}
|
||||
ShowNotify("信息修改完成!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
269
SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocDataInNewEdit.aspx.designer.cs
generated
Normal file
269
SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocDataInNewEdit.aspx.designer.cs
generated
Normal file
|
@ -0,0 +1,269 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
|
||||
|
||||
public partial class DataReceivingDocDataInNewEdit
|
||||
{
|
||||
|
||||
/// <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>
|
||||
/// txtValue8 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue8;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue9 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue9;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue10 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue10;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue11 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue11;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue12 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue12;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue13 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue13;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue14 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue14;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue15 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue15;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue16 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue16;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue17 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue17;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue18 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue18;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue19 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue19;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue20 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue20;
|
||||
|
||||
/// <summary>
|
||||
/// ckAll 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.CheckBox ckAll;
|
||||
|
||||
/// <summary>
|
||||
/// lbErrCout 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea lbErrCout;
|
||||
}
|
||||
}
|
|
@ -15,7 +15,7 @@
|
|||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="图纸收发记录" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="DesignDrawingsId" AllowCellEditing="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="DesignDrawingsId" AllowSorting="true"
|
||||
SortField="SendDate" SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
SortField="RemarkCode" SortDirection="ASC" 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">
|
||||
|
@ -120,7 +120,7 @@
|
|||
</f:Window>
|
||||
<f:Window ID="Window2" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Top" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||
Width="700px" Height="560px">
|
||||
Width="1200px" Height="660px">
|
||||
</f:Window>
|
||||
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true"
|
||||
EnableMaximize="true" Target="Parent" EnableResize="false" runat="server"
|
||||
|
|
|
@ -209,7 +209,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// <param name="e"></param>
|
||||
protected void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("DesignDrawingsDataIn.aspx", "导入 - ")));
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("DesignDrawingsDataInNew.aspx", "导入 - ")));
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -0,0 +1,181 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DesignDrawingsDataInNew.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.DesignDrawingsDataInNew" %>
|
||||
|
||||
<!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" Hidden="true">
|
||||
</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:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center" TextAlign="Center" />
|
||||
<f:RenderField Width="70px" HeaderText="行号" ColumnID="RowNo" DataField="RowNo" SortField="RowNo"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" HeaderText="专业名称" ColumnID="Value1" DataField="Value1" SortField="Value1"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:WindowField ColumnID="Value2" HeaderTextAlign="Center" TextAlign="Left" Width="150px" WindowID="Window1" HeaderText="设计图纸编号"
|
||||
DataTextField="Value2" DataIFrameUrlFields="TempId" DataIFrameUrlFormatString="DesignDrawingsDataInNewEdit.aspx?TempId={0}"
|
||||
Title="设计图纸编号" DataToolTipField="ToopValue" SortField="Value2">
|
||||
</f:WindowField>
|
||||
<f:RenderField Width="130px" HeaderText="单位工程名称" ColumnID="Value3" DataField="Value3" SortField="Value3"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" HeaderText="图纸内容" ColumnID="Value4" DataField="Value4" SortField="Value4"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" HeaderText="版次" ColumnID="Value5" DataField="Value5" SortField="Value5"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" HeaderText="页数" ColumnID="Value6" DataField="Value6" SortField="Value6"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" HeaderText="接收日期" ColumnID="Value7" DataField="Value7" SortField="Value7"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" HeaderText="发送日期" ColumnID="Value8" DataField="Value8" SortField="Value8"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="180px" HeaderText="接收单位" ColumnID="Value9" DataField="Value9" SortField="Value9"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" HeaderText="接收人" ColumnID="Value10" DataField="Value10" SortField="Value10"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" HeaderText="备注" ColumnID="Value11" DataField="Value11" SortField="Value11"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" HeaderText="标志编号" ColumnID="Value12" DataField="Value12" SortField="Value12"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</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,572 @@
|
|||
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.Security.Cryptography;
|
||||
using System.Threading;
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
public partial class DesignDrawingsDataInNew :PageBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 错误集合
|
||||
/// </summary>
|
||||
public static string errorInfos = string.Empty;
|
||||
|
||||
#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"
|
||||
+ @",ToopValue,Type"
|
||||
+ @" FROM Sys_CQMS_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", "DesignDrawings"));
|
||||
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_CQMS_DataInTemp
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UserId == this.CurrUser.UserId && x.Type == "DesignDrawings"
|
||||
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;
|
||||
}
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DesignDrawingsDataInNewEdit.aspx?TempId={0}", Grid1.SelectedRowID, "维护 - ")));
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 导入信息 维护
|
||||
/// <summary>
|
||||
/// 导入信息编辑
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DesignDrawingsDataInNewEdit.aspx?TempId={0}", Grid1.SelectedRowID, "维护 - ")));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
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_CQMS_DataInTempService.DeleteDataInTempByDataInTempID(rowID);
|
||||
}
|
||||
|
||||
ShowNotify("删除成功!", MessageBoxIcon.Success);
|
||||
this.BindGrid();
|
||||
}
|
||||
#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 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 + Const.ExcelUrl;
|
||||
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 + Const.ExcelUrl + 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 = 1; i < ds.Tables[0].Rows.Count; i++)
|
||||
{
|
||||
Sys_CQMS_DataInTemp newDataInTemp = new Sys_CQMS_DataInTemp();
|
||||
newDataInTemp.TempId = SQLHelper.GetNewID(typeof(Model.Sys_CQMS_DataInTemp));
|
||||
newDataInTemp.ProjectId = this.CurrUser.LoginProjectId;
|
||||
newDataInTemp.UserId = this.CurrUser.UserId;
|
||||
newDataInTemp.Time = System.DateTime.Now;
|
||||
newDataInTemp.Type = "DesignDrawings";
|
||||
newDataInTemp.RowNo = i + 2;
|
||||
newDataInTemp.Value1 = ds.Tables[0].Rows[i][0].ToString();
|
||||
newDataInTemp.Value2 = ds.Tables[0].Rows[i][1].ToString();
|
||||
newDataInTemp.Value3 = ds.Tables[0].Rows[i][2].ToString();
|
||||
newDataInTemp.Value4 = ds.Tables[0].Rows[i][3].ToString();
|
||||
newDataInTemp.Value5 = ds.Tables[0].Rows[i][4].ToString();
|
||||
newDataInTemp.Value6 = ds.Tables[0].Rows[i][5].ToString();
|
||||
newDataInTemp.Value7 = ds.Tables[0].Rows[i][6].ToString();
|
||||
newDataInTemp.Value8 = ds.Tables[0].Rows[i][7].ToString();
|
||||
newDataInTemp.Value9 = ds.Tables[0].Rows[i][8].ToString();
|
||||
newDataInTemp.Value10 = ds.Tables[0].Rows[i][9].ToString();
|
||||
newDataInTemp.Value11 = ds.Tables[0].Rows[i][10].ToString();
|
||||
newDataInTemp.Value12 = ds.Tables[0].Rows[i][11].ToString();
|
||||
|
||||
BLL.Sys_CQMS_DataInTempService.AddDataInTemp(newDataInTemp);
|
||||
}
|
||||
this.BindGrid();
|
||||
ShowNotify("数据已导入临时表!", MessageBoxIcon.Success);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("导入数据为空!", MessageBoxIcon.Success);
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Alert.ShowInTop("'" + ex.Message + "'", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
#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) + ".xls");
|
||||
Response.ContentType = "application/excel";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
Response.Write(GetGridTableHtml(Grid1));
|
||||
Response.End();
|
||||
}
|
||||
#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, "DesignDrawings"); }));
|
||||
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, string IsPDMS)
|
||||
{
|
||||
var oldViewInfos = from x in Funs.DB.Comprehensive_DesignDrawings
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
select x;
|
||||
|
||||
var units = from x in Funs.DB.Base_Unit
|
||||
join y in Funs.DB.Project_ProjectUnit on x.UnitId equals y.UnitId
|
||||
where y.ProjectId == this.CurrUser.LoginProjectId
|
||||
select x;
|
||||
|
||||
var cns = from x in Funs.DB.Base_CNProfessional select x;
|
||||
|
||||
var unitWorks = from x in Funs.DB.WBS_UnitWork
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0")
|
||||
select x;
|
||||
|
||||
var dataInTemp = from x in Funs.DB.Sys_CQMS_DataInTemp
|
||||
where x.ProjectId == LoginProjectId && x.UserId == UserId && x.Type == "DesignDrawings"
|
||||
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;
|
||||
|
||||
Model.Comprehensive_DesignDrawings Ins = new Model.Comprehensive_DesignDrawings();
|
||||
if (!string.IsNullOrEmpty(tempData.Value1.Trim()))
|
||||
{
|
||||
var cn = cns.Where(x => x.ProfessionalName == tempData.Value1.Trim()).FirstOrDefault();
|
||||
if (cn == null)
|
||||
{
|
||||
errInfo += "专业名称[" + tempData.Value1.Trim() + "]不存在;";
|
||||
}
|
||||
else
|
||||
{
|
||||
Ins.CNProfessionalId = cn.CNProfessionalId;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
errInfo += "专业名称为必填项;";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value2.Trim()))
|
||||
{
|
||||
Ins.DesignDrawingsCode = tempData.Value2.Trim();
|
||||
}
|
||||
else
|
||||
{
|
||||
errInfo += "设计图纸编号为必填项;";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value3.Trim()))
|
||||
{
|
||||
string unitIds = string.Empty;
|
||||
string[] reunit = tempData.Value3.Trim().Split(',');
|
||||
foreach (string unitWork in reunit)
|
||||
{
|
||||
var u = unitWorks.Where(x => x.UnitWorkName == unitWork.Trim()).FirstOrDefault();
|
||||
if (u == null)
|
||||
{
|
||||
errInfo += "单位工程名称[" + unitWork.Trim() + "]不存在;";
|
||||
}
|
||||
else
|
||||
{
|
||||
var q = BLL.UnitWorkService.GetUnitWorkByUnitWorkName(this.CurrUser.LoginProjectId, unitWork.Trim()).UnitWorkId;
|
||||
unitIds += q + ",";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(unitIds))
|
||||
{
|
||||
unitIds = unitIds.Substring(0, unitIds.LastIndexOf(","));
|
||||
}
|
||||
Ins.UnitWorkId = unitIds;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value4.Trim()))
|
||||
{
|
||||
Ins.DesignDrawingsContent = tempData.Value4.Trim();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value5.Trim()))
|
||||
{
|
||||
Ins.Edition = tempData.Value5.Trim();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value6.Trim()))
|
||||
{
|
||||
try
|
||||
{
|
||||
Ins.PageNumber = Funs.GetNewInt(tempData.Value6.Trim());
|
||||
if (Ins.PageNumber == null)
|
||||
{
|
||||
errInfo += "页数[" + tempData.Value6.Trim() + "]格式错误;";
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
errInfo += "页数[" + tempData.Value6.Trim() + "]格式错误;";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value7.Trim()))
|
||||
{
|
||||
try
|
||||
{
|
||||
Ins.ReceiveDate = Funs.GetNewDateTime(tempData.Value7.Trim());
|
||||
if (Ins.ReceiveDate == null)
|
||||
{
|
||||
errInfo += "接收日期[" + tempData.Value7.Trim() + "]格式错误;";
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
errInfo += "接收日期[" + tempData.Value7.Trim() + "]格式错误;";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value8.Trim()))
|
||||
{
|
||||
try
|
||||
{
|
||||
Ins.SendDate = Funs.GetNewDateTime(tempData.Value8.Trim());
|
||||
if (Ins.SendDate == null)
|
||||
{
|
||||
errInfo += "发送日期[" + tempData.Value8.Trim() + "]格式错误;";
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
errInfo += "发送日期[" + tempData.Value8.Trim() + "]格式错误;";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value9.Trim()))
|
||||
{
|
||||
string unitIds = string.Empty;
|
||||
string[] reunit = tempData.Value9.Trim().Split(',');
|
||||
foreach (string unitName in reunit)
|
||||
{
|
||||
var u = units.Where(x => x.UnitName == unitName.Trim()).FirstOrDefault();
|
||||
if (u == null)
|
||||
{
|
||||
errInfo += "接收单位[" + unitName.Trim() + "]不存在;";
|
||||
}
|
||||
else
|
||||
{
|
||||
var q = BLL.UnitService.getUnitByUnitName(unitName.Trim()).UnitId;
|
||||
unitIds += q + ",";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(unitIds))
|
||||
{
|
||||
unitIds = unitIds.Substring(0, unitIds.LastIndexOf(","));
|
||||
}
|
||||
Ins.ReceiveUnits = unitIds;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value10.Trim()))
|
||||
{
|
||||
Ins.ReceiveMan = tempData.Value10.Trim();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value11.Trim()))
|
||||
{
|
||||
Ins.Remark = tempData.Value11.Trim();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value12.Trim()))
|
||||
{
|
||||
try
|
||||
{
|
||||
Ins.RemarkCode = Convert.ToInt32(tempData.Value12.Trim());
|
||||
if (Ins.RemarkCode == null)
|
||||
{
|
||||
errInfo += "标志编号[" + tempData.Value12.Trim() + "]格式错误;";
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
errInfo += "标志编号[" + tempData.Value12.Trim() + "]格式错误;";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
errInfo += "标志编号为必填项;";
|
||||
}
|
||||
Ins.CompileMan = this.CurrUser.UserId;
|
||||
if (string.IsNullOrEmpty(errInfo)) ////所有信息正确的话 插入数据
|
||||
{
|
||||
Ins.ProjectId = LoginProjectId;
|
||||
var isExitISOValue = oldViewInfos.FirstOrDefault(x => x.RemarkCode == Funs.GetNewIntOrZero(tempData.Value12));
|
||||
if (isExitISOValue != null) ///已存在
|
||||
{
|
||||
Ins.DesignDrawingsId = isExitISOValue.DesignDrawingsId;
|
||||
BLL.DesignDrawingsService.UpdateDesignDrawings(Ins);
|
||||
}
|
||||
else
|
||||
{
|
||||
Ins.Status = BLL.Const.Comprehensive_Compile;
|
||||
Ins.DesignDrawingsId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignDrawings));
|
||||
BLL.DesignDrawingsService.AddDesignDrawings(Ins);
|
||||
}
|
||||
BLL.Sys_CQMS_DataInTempService.DeleteDataInTempByDataInTempID(tempData.TempId);
|
||||
okCount++;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(errInfo))
|
||||
{
|
||||
tempData.ToopValue = errInfo;
|
||||
BLL.Sys_CQMS_DataInTempService.UpdateDataInTemp(tempData);
|
||||
erreMessage += errInfo + ";";
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 删除所有数据事件
|
||||
/// <summary>
|
||||
/// 删除所有数据事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAllDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
//先删除临时表中 该人员以前导入的数据
|
||||
BLL.Sys_CQMS_DataInTempService.DeleteDataInTempByProjectIdUserId(this.CurrUser.LoginProjectId, this.CurrUser.UserId, "DesignDrawings");
|
||||
this.BindGrid();
|
||||
ShowNotify("删除成功!", MessageBoxIcon.Success);
|
||||
this.lbDataCout.Text = string.Empty;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 模版导入说明 下载
|
||||
/// <summary>
|
||||
/// 下载模版
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void imgbtnUpload_Click(object sender, EventArgs e)
|
||||
{
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string uploadfilepath = rootPath + Const.DesignDrawingsDataInUrl;
|
||||
string filePath = Const.DesignDrawingsDataInUrl;
|
||||
string fileName = Path.GetFileName(filePath);
|
||||
FileInfo info = new FileInfo(uploadfilepath);
|
||||
long fileSize = info.Length;
|
||||
Response.ClearContent();
|
||||
Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
|
||||
Response.ContentType = "excel/plain";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
Response.AddHeader("Content-Length", fileSize.ToString().Trim());
|
||||
Response.TransmitFile(uploadfilepath, 0, fileSize);
|
||||
Response.End();
|
||||
}
|
||||
#endregion
|
||||
|
||||
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];
|
||||
}
|
||||
}
|
||||
}
|
251
SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsDataInNew.aspx.designer.cs
generated
Normal file
251
SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsDataInNew.aspx.designer.cs
generated
Normal file
|
@ -0,0 +1,251 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
|
||||
|
||||
public partial class DesignDrawingsDataInNew
|
||||
{
|
||||
|
||||
/// <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>
|
||||
/// 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>
|
||||
/// 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,78 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DesignDrawingsDataInNewEdit.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.DesignDrawingsDataInNewEdit" %>
|
||||
|
||||
<!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" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue2" Label="设计图纸编号" ShowRedStar="true" Required="true" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue3" Label="单位工程名称" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue4" Label="图纸内容" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtValue5" Label="版次" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue6" Label="页数" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue7" Label="接收日期" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue8" Label="发送日期" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtValue9" Label="接收单位" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue10" Label="接收人" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue11" Label="备注" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue12" Label="标志编号" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<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,249 @@
|
|||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
public partial class DesignDrawingsDataInNewEdit : 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_CQMS_DataInTempService.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.txtValue8.Text = dataInTemp.Value8;
|
||||
this.txtValue9.Text = dataInTemp.Value9;
|
||||
this.txtValue10.Text = dataInTemp.Value10;
|
||||
this.txtValue11.Text = dataInTemp.Value11;
|
||||
this.txtValue12.Text = dataInTemp.Value12;
|
||||
|
||||
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_CQMS_DataInTempService.GetDataInTempByTempId(this.TempId);
|
||||
if (this.ckAll.Checked)
|
||||
{
|
||||
var allDataInTemp = from x in Funs.DB.Sys_CQMS_DataInTemp where x.ProjectId == this.CurrUser.LoginProjectId && x.UserId == this.CurrUser.UserId && x.Type == "DesignDrawings" 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value8 != this.txtValue8.Text.Trim())
|
||||
{
|
||||
var tempValue8 = allDataInTemp.Where(x => x.Value8 == dataInTemp.Value8 || (x.Value8 == null && dataInTemp.Value8 == null));
|
||||
if (tempValue8 != null)
|
||||
{
|
||||
foreach (var item in tempValue8)
|
||||
{
|
||||
item.Value8 = this.txtValue8.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value9 != this.txtValue9.Text.Trim())
|
||||
{
|
||||
var tempValue9 = allDataInTemp.Where(x => x.Value9 == dataInTemp.Value9 || (x.Value9 == null && dataInTemp.Value9 == null));
|
||||
if (tempValue9 != null)
|
||||
{
|
||||
foreach (var item in tempValue9)
|
||||
{
|
||||
item.Value9 = this.txtValue9.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value10 != this.txtValue10.Text.Trim())
|
||||
{
|
||||
var tempValue10 = allDataInTemp.Where(x => x.Value10 == dataInTemp.Value10 || (x.Value10 == null && dataInTemp.Value10 == null));
|
||||
if (tempValue10 != null)
|
||||
{
|
||||
foreach (var item in tempValue10)
|
||||
{
|
||||
item.Value10 = this.txtValue10.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value11 != this.txtValue11.Text.Trim())
|
||||
{
|
||||
var tempValue11 = allDataInTemp.Where(x => x.Value11 == dataInTemp.Value11 || (x.Value11 == null && dataInTemp.Value11 == null));
|
||||
if (tempValue11 != null)
|
||||
{
|
||||
foreach (var item in tempValue11)
|
||||
{
|
||||
item.Value11 = this.txtValue11.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value12 != this.txtValue12.Text.Trim())
|
||||
{
|
||||
var tempValue12 = allDataInTemp.Where(x => x.Value12 == dataInTemp.Value12 || (x.Value12 == null && dataInTemp.Value12 == null));
|
||||
if (tempValue12 != null)
|
||||
{
|
||||
foreach (var item in tempValue12)
|
||||
{
|
||||
item.Value12 = this.txtValue12.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_CQMS_DataInTemp newDataInTemp = new Model.Sys_CQMS_DataInTemp();
|
||||
newDataInTemp.ProjectId = this.CurrUser.LoginProjectId;
|
||||
newDataInTemp.UserId = this.CurrUser.UserId;
|
||||
newDataInTemp.Time = System.DateTime.Now;
|
||||
newDataInTemp.Type = "DesignDrawings";
|
||||
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();
|
||||
newDataInTemp.Value8 = this.txtValue8.Text.Trim();
|
||||
newDataInTemp.Value9 = this.txtValue9.Text.Trim();
|
||||
newDataInTemp.Value10 = this.txtValue10.Text.Trim();
|
||||
newDataInTemp.Value11 = this.txtValue11.Text.Trim();
|
||||
newDataInTemp.Value12 = this.txtValue12.Text.Trim();
|
||||
if (!string.IsNullOrEmpty(this.TempId))
|
||||
{
|
||||
newDataInTemp.TempId = this.TempId;
|
||||
newDataInTemp.ToopValue = null;
|
||||
BLL.Sys_CQMS_DataInTempService.UpdateDataInTemp(newDataInTemp);
|
||||
}
|
||||
}
|
||||
ShowNotify("信息修改完成!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
197
SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsDataInNewEdit.aspx.designer.cs
generated
Normal file
197
SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsDataInNewEdit.aspx.designer.cs
generated
Normal file
|
@ -0,0 +1,197 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
|
||||
|
||||
public partial class DesignDrawingsDataInNewEdit
|
||||
{
|
||||
|
||||
/// <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>
|
||||
/// txtValue8 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue8;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue9 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue9;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue10 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue10;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue11 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue11;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue12 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue12;
|
||||
|
||||
/// <summary>
|
||||
/// ckAll 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.CheckBox ckAll;
|
||||
|
||||
/// <summary>
|
||||
/// lbErrCout 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea lbErrCout;
|
||||
}
|
||||
}
|
|
@ -15,8 +15,8 @@
|
|||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="质量事故处理记录" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="QualityAccidentId" AllowCellEditing="true" EnableColumnLines="true"
|
||||
ClicksToEdit="2" DataIDField="QualityAccidentId" AllowSorting="true" SortField="Time"
|
||||
SortDirection="DESC" OnSort="Grid1_Sort"
|
||||
ClicksToEdit="2" DataIDField="QualityAccidentId" AllowSorting="true" SortField="RemarkCode"
|
||||
SortDirection="ASC" OnSort="Grid1_Sort"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="true">
|
||||
<Toolbars>
|
||||
|
@ -103,7 +103,7 @@
|
|||
</f:Window>
|
||||
<f:Window ID="Window2" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Top" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||
Width="700px" Height="560px">
|
||||
Width="1200px" Height="660px">
|
||||
</f:Window>
|
||||
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true"
|
||||
EnableMaximize="true" Target="Parent" EnableResize="false" runat="server"
|
||||
|
|
|
@ -280,7 +280,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// <param name="e"></param>
|
||||
protected void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("QualityAccidentDataIn.aspx", "导入 - ")));
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("QualityAccidentDataInNew.aspx", "导入 - ")));
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -0,0 +1,172 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QualityAccidentDataInNew.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.QualityAccidentDataInNew" %>
|
||||
|
||||
<!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" Hidden="true">
|
||||
</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:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center" TextAlign="Center" />
|
||||
<f:RenderField Width="70px" HeaderText="行号" ColumnID="RowNo" DataField="RowNo" SortField="RowNo"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:WindowField ColumnID="Value1" HeaderTextAlign="Center" TextAlign="Left" Width="150px" WindowID="Window1" HeaderText="责任单位"
|
||||
DataTextField="Value1" DataIFrameUrlFields="TempId" DataIFrameUrlFormatString="QualityAccidentDataInNewEdit.aspx?TempId={0}"
|
||||
Title="责任单位" DataToolTipField="ToopValue" SortField="Value1">
|
||||
</f:WindowField>
|
||||
<f:RenderField Width="150px" HeaderText="单位工程名称" ColumnID="Value2" DataField="Value2" SortField="Value2"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" HeaderText="时间" ColumnID="Value3" DataField="Value3" SortField="Value3"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" HeaderText="地点" ColumnID="Value4" DataField="Value4" SortField="Value4"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" HeaderText="直接经济损失(估计)原因及性质" ColumnID="Value5" DataField="Value5" SortField="Value5"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" HeaderText="采取补救措施" ColumnID="Value6" DataField="Value6" SortField="Value6"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" HeaderText="事故责任认定" ColumnID="Value7" DataField="Value7" SortField="Value7"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" HeaderText="最终整改措施" ColumnID="Value8" DataField="Value8" SortField="Value8"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" HeaderText="标志编号" ColumnID="Value9" DataField="Value9" SortField="Value9"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</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,511 @@
|
|||
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.Security.Cryptography;
|
||||
using System.Threading;
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
public partial class QualityAccidentDataInNew : PageBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 错误集合
|
||||
/// </summary>
|
||||
public static string errorInfos = string.Empty;
|
||||
|
||||
#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"
|
||||
+ @",ToopValue,Type"
|
||||
+ @" FROM Sys_CQMS_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", "QualityAccident"));
|
||||
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_CQMS_DataInTemp
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UserId == this.CurrUser.UserId && x.Type == "QualityAccident"
|
||||
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;
|
||||
}
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("QualityAccidentDataInNewEdit.aspx?TempId={0}", Grid1.SelectedRowID, "维护 - ")));
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 导入信息 维护
|
||||
/// <summary>
|
||||
/// 导入信息编辑
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("QualityAccidentDataInNewEdit.aspx?TempId={0}", Grid1.SelectedRowID, "维护 - ")));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
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_CQMS_DataInTempService.DeleteDataInTempByDataInTempID(rowID);
|
||||
}
|
||||
|
||||
ShowNotify("删除成功!", MessageBoxIcon.Success);
|
||||
this.BindGrid();
|
||||
}
|
||||
#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 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 + Const.ExcelUrl;
|
||||
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 + Const.ExcelUrl + 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 = 1; i < ds.Tables[0].Rows.Count; i++)
|
||||
{
|
||||
Sys_CQMS_DataInTemp newDataInTemp = new Sys_CQMS_DataInTemp();
|
||||
newDataInTemp.TempId = SQLHelper.GetNewID(typeof(Model.Sys_CQMS_DataInTemp));
|
||||
newDataInTemp.ProjectId = this.CurrUser.LoginProjectId;
|
||||
newDataInTemp.UserId = this.CurrUser.UserId;
|
||||
newDataInTemp.Time = System.DateTime.Now;
|
||||
newDataInTemp.Type = "QualityAccident";
|
||||
newDataInTemp.RowNo = i + 2;
|
||||
newDataInTemp.Value1 = ds.Tables[0].Rows[i][0].ToString();
|
||||
newDataInTemp.Value2 = ds.Tables[0].Rows[i][1].ToString();
|
||||
newDataInTemp.Value3 = ds.Tables[0].Rows[i][2].ToString();
|
||||
newDataInTemp.Value4 = ds.Tables[0].Rows[i][3].ToString();
|
||||
newDataInTemp.Value5 = ds.Tables[0].Rows[i][4].ToString();
|
||||
newDataInTemp.Value6 = ds.Tables[0].Rows[i][5].ToString();
|
||||
newDataInTemp.Value7 = ds.Tables[0].Rows[i][6].ToString();
|
||||
newDataInTemp.Value8 = ds.Tables[0].Rows[i][7].ToString();
|
||||
newDataInTemp.Value9 = ds.Tables[0].Rows[i][8].ToString();
|
||||
|
||||
BLL.Sys_CQMS_DataInTempService.AddDataInTemp(newDataInTemp);
|
||||
}
|
||||
this.BindGrid();
|
||||
ShowNotify("数据已导入临时表!", MessageBoxIcon.Success);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("导入数据为空!", MessageBoxIcon.Success);
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Alert.ShowInTop("'" + ex.Message + "'", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
#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) + ".xls");
|
||||
Response.ContentType = "application/excel";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
Response.Write(GetGridTableHtml(Grid1));
|
||||
Response.End();
|
||||
}
|
||||
#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, "QualityAccident"); }));
|
||||
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, string IsPDMS)
|
||||
{
|
||||
var oldViewInfos = from x in Funs.DB.Comprehensive_QualityAccident
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
select x;
|
||||
|
||||
var units = from x in Funs.DB.Base_Unit
|
||||
join y in Funs.DB.Project_ProjectUnit on x.UnitId equals y.UnitId
|
||||
where y.ProjectId == this.CurrUser.LoginProjectId
|
||||
select x;
|
||||
|
||||
var unitWorks = from x in Funs.DB.WBS_UnitWork
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0")
|
||||
select x;
|
||||
|
||||
var dataInTemp = from x in Funs.DB.Sys_CQMS_DataInTemp
|
||||
where x.ProjectId == LoginProjectId && x.UserId == UserId && x.Type == "QualityAccident"
|
||||
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;
|
||||
|
||||
Model.Comprehensive_QualityAccident Ins = new Model.Comprehensive_QualityAccident();
|
||||
if (!string.IsNullOrEmpty(tempData.Value1.Trim()))
|
||||
{
|
||||
var unit = units.FirstOrDefault(x => x.UnitName == tempData.Value1.Trim());
|
||||
if (unit == null)
|
||||
{
|
||||
errInfo += "责任单位[" + tempData.Value1.Trim() + "]不存在;";
|
||||
}
|
||||
else
|
||||
{
|
||||
Ins.UnitId = unit.UnitId;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
errInfo += "责任单位为必填项;";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value2.Trim()))
|
||||
{
|
||||
string unitIds = string.Empty;
|
||||
string[] reunit = tempData.Value2.Trim().Split(',');
|
||||
foreach (string unitWork in reunit)
|
||||
{
|
||||
var u = unitWorks.Where(x => x.UnitWorkName == unitWork.Trim()).FirstOrDefault();
|
||||
if (u == null)
|
||||
{
|
||||
errInfo += "单位工程[" + unitWork.Trim() + "]不存在;";
|
||||
}
|
||||
else
|
||||
{
|
||||
var q = BLL.UnitWorkService.GetUnitWorkByUnitWorkName(this.CurrUser.LoginProjectId, unitWork.Trim()).UnitWorkId;
|
||||
unitIds += q + ",";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(unitIds))
|
||||
{
|
||||
unitIds = unitIds.Substring(0, unitIds.LastIndexOf(","));
|
||||
}
|
||||
Ins.UnitWorkId = unitIds;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value3.Trim()))
|
||||
{
|
||||
try
|
||||
{
|
||||
Ins.Time = Funs.GetNewDateTime(tempData.Value3.Trim());
|
||||
if (Ins.Time == null)
|
||||
{
|
||||
errInfo += "时间[" + tempData.Value3.Trim() + "]错误;";
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
errInfo += "时间[" + tempData.Value3.Trim() + "]错误;";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value4.Trim()))
|
||||
{
|
||||
Ins.Place = tempData.Value4.Trim();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value5.Trim()))
|
||||
{
|
||||
Ins.DirectEconomicLoss = tempData.Value5.Trim();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value6.Trim()))
|
||||
{
|
||||
Ins.RemedialMeasures = tempData.Value6.Trim();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value7.Trim()))
|
||||
{
|
||||
Ins.ResponsibilityDetermination = tempData.Value7.Trim();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value8.Trim()))
|
||||
{
|
||||
Ins.CorrectiveActions = tempData.Value8.Trim();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value9.Trim()))
|
||||
{
|
||||
try
|
||||
{
|
||||
Ins.RemarkCode = Convert.ToInt32(tempData.Value9.Trim());
|
||||
if (Ins.RemarkCode == null)
|
||||
{
|
||||
errInfo += "标志编号[" + tempData.Value9.Trim() + "]格式错误;";
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
errInfo += "标志编号[" + tempData.Value9.Trim() + "]格式错误;";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
errInfo += "标志编号为必填项;";
|
||||
}
|
||||
Ins.CompileMan = this.CurrUser.UserId;
|
||||
Ins.CompileDate = DateTime.Now.Date;
|
||||
if (string.IsNullOrEmpty(errInfo)) ////所有信息正确的话 插入数据
|
||||
{
|
||||
Ins.ProjectId = LoginProjectId;
|
||||
var isExitISOValue = oldViewInfos.FirstOrDefault(x => x.RemarkCode == Funs.GetNewIntOrZero(tempData.Value9));
|
||||
if (isExitISOValue != null) ///已存在
|
||||
{
|
||||
Ins.QualityAccidentId = isExitISOValue.QualityAccidentId;
|
||||
BLL.QualityAccidentService.UpdateQualityAccident(Ins);
|
||||
}
|
||||
else
|
||||
{
|
||||
Ins.Status = BLL.Const.Comprehensive_Compile;
|
||||
Ins.QualityAccidentId = SQLHelper.GetNewID(typeof(Model.Comprehensive_QualityAccident));
|
||||
BLL.QualityAccidentService.AddQualityAccident(Ins);
|
||||
}
|
||||
BLL.Sys_CQMS_DataInTempService.DeleteDataInTempByDataInTempID(tempData.TempId);
|
||||
okCount++;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(errInfo))
|
||||
{
|
||||
tempData.ToopValue = errInfo;
|
||||
BLL.Sys_CQMS_DataInTempService.UpdateDataInTemp(tempData);
|
||||
erreMessage += errInfo + ";";
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 删除所有数据事件
|
||||
/// <summary>
|
||||
/// 删除所有数据事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAllDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
//先删除临时表中 该人员以前导入的数据
|
||||
BLL.Sys_CQMS_DataInTempService.DeleteDataInTempByProjectIdUserId(this.CurrUser.LoginProjectId, this.CurrUser.UserId, "QualityAccident");
|
||||
this.BindGrid();
|
||||
ShowNotify("删除成功!", MessageBoxIcon.Success);
|
||||
this.lbDataCout.Text = string.Empty;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 模版导入说明 下载
|
||||
/// <summary>
|
||||
/// 下载模版
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void imgbtnUpload_Click(object sender, EventArgs e)
|
||||
{
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string uploadfilepath = rootPath + Const.QualityAccidentTemplateUrl;
|
||||
string filePath = Const.QualityAccidentTemplateUrl;
|
||||
string fileName = Path.GetFileName(filePath);
|
||||
FileInfo info = new FileInfo(uploadfilepath);
|
||||
long fileSize = info.Length;
|
||||
Response.ClearContent();
|
||||
Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
|
||||
Response.ContentType = "excel/plain";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
Response.AddHeader("Content-Length", fileSize.ToString().Trim());
|
||||
Response.TransmitFile(uploadfilepath, 0, fileSize);
|
||||
Response.End();
|
||||
}
|
||||
#endregion
|
||||
|
||||
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];
|
||||
}
|
||||
}
|
||||
}
|
251
SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentDataInNew.aspx.designer.cs
generated
Normal file
251
SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentDataInNew.aspx.designer.cs
generated
Normal file
|
@ -0,0 +1,251 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
|
||||
|
||||
public partial class QualityAccidentDataInNew
|
||||
{
|
||||
|
||||
/// <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>
|
||||
/// 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>
|
||||
/// 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,68 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QualityAccidentDataInNewEdit.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.QualityAccidentDataInNewEdit" %>
|
||||
|
||||
<!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" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue2" Label="单位工程名称" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue3" Label="时间" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue4" Label="地点" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtValue5" Label="直接经济损失(估计)原因及性质" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue6" Label="采取补救措施" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue7" Label="事故责任认定" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue8" Label="最终整改措施" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow ColumnWidths="25% 75%">
|
||||
<Items>
|
||||
<f:TextBox ID="txtValue9" 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,207 @@
|
|||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
public partial class QualityAccidentDataInNewEdit : 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_CQMS_DataInTempService.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.txtValue8.Text = dataInTemp.Value8;
|
||||
this.txtValue9.Text = dataInTemp.Value9;
|
||||
|
||||
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_CQMS_DataInTempService.GetDataInTempByTempId(this.TempId);
|
||||
if (this.ckAll.Checked)
|
||||
{
|
||||
var allDataInTemp = from x in Funs.DB.Sys_CQMS_DataInTemp where x.ProjectId == this.CurrUser.LoginProjectId && x.UserId == this.CurrUser.UserId && x.Type == "QualityAccident" 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value8 != this.txtValue8.Text.Trim())
|
||||
{
|
||||
var tempValue8 = allDataInTemp.Where(x => x.Value8 == dataInTemp.Value8 || (x.Value8 == null && dataInTemp.Value8 == null));
|
||||
if (tempValue8 != null)
|
||||
{
|
||||
foreach (var item in tempValue8)
|
||||
{
|
||||
item.Value8 = this.txtValue8.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value9 != this.txtValue9.Text.Trim())
|
||||
{
|
||||
var tempValue9 = allDataInTemp.Where(x => x.Value9 == dataInTemp.Value9 || (x.Value9 == null && dataInTemp.Value9 == null));
|
||||
if (tempValue9 != null)
|
||||
{
|
||||
foreach (var item in tempValue9)
|
||||
{
|
||||
item.Value9 = this.txtValue9.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_CQMS_DataInTemp newDataInTemp = new Model.Sys_CQMS_DataInTemp();
|
||||
newDataInTemp.ProjectId = this.CurrUser.LoginProjectId;
|
||||
newDataInTemp.UserId = this.CurrUser.UserId;
|
||||
newDataInTemp.Time = System.DateTime.Now;
|
||||
newDataInTemp.Type = "QualityAccident";
|
||||
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();
|
||||
newDataInTemp.Value8 = this.txtValue8.Text.Trim();
|
||||
newDataInTemp.Value9 = this.txtValue9.Text.Trim();
|
||||
if (!string.IsNullOrEmpty(this.TempId))
|
||||
{
|
||||
newDataInTemp.TempId = this.TempId;
|
||||
newDataInTemp.ToopValue = null;
|
||||
BLL.Sys_CQMS_DataInTempService.UpdateDataInTemp(newDataInTemp);
|
||||
}
|
||||
}
|
||||
ShowNotify("信息修改完成!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
170
SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentDataInNewEdit.aspx.designer.cs
generated
Normal file
170
SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentDataInNewEdit.aspx.designer.cs
generated
Normal file
|
@ -0,0 +1,170 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
|
||||
|
||||
public partial class QualityAccidentDataInNewEdit
|
||||
{
|
||||
|
||||
/// <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>
|
||||
/// txtValue8 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue8;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue9 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue9;
|
||||
|
||||
/// <summary>
|
||||
/// ckAll 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.CheckBox ckAll;
|
||||
|
||||
/// <summary>
|
||||
/// lbErrCout 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea lbErrCout;
|
||||
}
|
||||
}
|
|
@ -15,8 +15,8 @@
|
|||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="现场签证管理" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="VisaId" AllowCellEditing="true" EnableColumnLines="true"
|
||||
ClicksToEdit="2" DataIDField="VisaId" AllowSorting="true" SortField="VisaDate"
|
||||
SortDirection="DESC" OnSort="Grid1_Sort"
|
||||
ClicksToEdit="2" DataIDField="VisaId" AllowSorting="true" SortField="RemarkCode"
|
||||
SortDirection="ASC" OnSort="Grid1_Sort"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="true">
|
||||
<Toolbars>
|
||||
|
@ -119,7 +119,7 @@
|
|||
</f:Window>
|
||||
<f:Window ID="Window2" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Top" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||
Width="700px" Height="560px">
|
||||
Width="1200px" Height="660px">
|
||||
</f:Window>
|
||||
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true"
|
||||
EnableMaximize="true" Target="Parent" EnableResize="false" runat="server"
|
||||
|
|
|
@ -202,7 +202,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// <param name="e"></param>
|
||||
protected void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("SiteVisaManagementDataIn.aspx", "导入 - ")));
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("SiteVisaManagementDataInNew.aspx", "导入 - ")));
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -0,0 +1,178 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SiteVisaManagementDataInNew.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.SiteVisaManagementDataInNew" %>
|
||||
|
||||
<!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" Hidden="true">
|
||||
</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:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center" TextAlign="Center" />
|
||||
<f:RenderField Width="70px" HeaderText="行号" ColumnID="RowNo" DataField="RowNo" SortField="RowNo"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" HeaderText="签证单位" ColumnID="Value1" DataField="Value1" SortField="Value1"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:WindowField ColumnID="Value2" HeaderTextAlign="Center" TextAlign="Left" Width="200px" WindowID="Window1" HeaderText="施工签证单编号"
|
||||
DataTextField="Value2" DataIFrameUrlFields="TempId" DataIFrameUrlFormatString="SiteVisaManagementDataInNewEdit.aspx?TempId={0}"
|
||||
Title="施工签证单编号" DataToolTipField="ToopValue" SortField="Value2">
|
||||
</f:WindowField>
|
||||
<f:RenderField Width="260px" HeaderText="施工签证单内容" ColumnID="Value3" DataField="Value3" SortField="Value3"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" HeaderText="费用审核状态" ColumnID="Value4" DataField="Value4" SortField="Value4"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" HeaderText="单位工程" ColumnID="Value5" DataField="Value5" SortField="Value5"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" HeaderText="专业" ColumnID="Value6" DataField="Value6" SortField="Value6"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" HeaderText="签证时间" ColumnID="Value7" DataField="Value7" SortField="Value7"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" HeaderText="签证人" ColumnID="Value8" DataField="Value8" SortField="Value8"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" HeaderText="审批人" ColumnID="Value9" DataField="Value9" SortField="Value9"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" HeaderText="备注" ColumnID="Value10" DataField="Value10" SortField="Value10"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" HeaderText="标志编号" ColumnID="Value11" DataField="Value11" SortField="Value11"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</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,538 @@
|
|||
using BLL;
|
||||
using FineUIPro.Web.ProjectData;
|
||||
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 SiteVisaManagementDataInNew : PageBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 错误集合
|
||||
/// </summary>
|
||||
public static string errorInfos = string.Empty;
|
||||
|
||||
#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"
|
||||
+ @",ToopValue,Type"
|
||||
+ @" FROM Sys_CQMS_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", "SiteVisaManagement"));
|
||||
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_CQMS_DataInTemp
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UserId == this.CurrUser.UserId && x.Type == "SiteVisaManagement"
|
||||
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;
|
||||
}
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SiteVisaManagementDataInNewEdit.aspx?TempId={0}", Grid1.SelectedRowID, "维护 - ")));
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 导入信息 维护
|
||||
/// <summary>
|
||||
/// 导入信息编辑
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SiteVisaManagementDataInNewEdit.aspx?TempId={0}", Grid1.SelectedRowID, "维护 - ")));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
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_CQMS_DataInTempService.DeleteDataInTempByDataInTempID(rowID);
|
||||
}
|
||||
|
||||
ShowNotify("删除成功!", MessageBoxIcon.Success);
|
||||
this.BindGrid();
|
||||
}
|
||||
#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 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 + Const.ExcelUrl;
|
||||
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 + Const.ExcelUrl + 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 = 1; i < ds.Tables[0].Rows.Count; i++)
|
||||
{
|
||||
Sys_CQMS_DataInTemp newDataInTemp = new Sys_CQMS_DataInTemp();
|
||||
newDataInTemp.TempId = SQLHelper.GetNewID(typeof(Model.Sys_CQMS_DataInTemp));
|
||||
newDataInTemp.ProjectId = this.CurrUser.LoginProjectId;
|
||||
newDataInTemp.UserId = this.CurrUser.UserId;
|
||||
newDataInTemp.Time = System.DateTime.Now;
|
||||
newDataInTemp.Type = "SiteVisaManagement";
|
||||
newDataInTemp.RowNo = i + 2;
|
||||
newDataInTemp.Value1 = ds.Tables[0].Rows[i][0].ToString();
|
||||
newDataInTemp.Value2 = ds.Tables[0].Rows[i][1].ToString();
|
||||
newDataInTemp.Value3 = ds.Tables[0].Rows[i][2].ToString();
|
||||
newDataInTemp.Value4 = ds.Tables[0].Rows[i][3].ToString();
|
||||
newDataInTemp.Value5 = ds.Tables[0].Rows[i][4].ToString();
|
||||
newDataInTemp.Value6 = ds.Tables[0].Rows[i][5].ToString();
|
||||
newDataInTemp.Value7 = ds.Tables[0].Rows[i][6].ToString();
|
||||
newDataInTemp.Value8 = ds.Tables[0].Rows[i][7].ToString();
|
||||
newDataInTemp.Value9 = ds.Tables[0].Rows[i][8].ToString();
|
||||
newDataInTemp.Value10 = ds.Tables[0].Rows[i][9].ToString();
|
||||
newDataInTemp.Value11 = ds.Tables[0].Rows[i][10].ToString();
|
||||
|
||||
BLL.Sys_CQMS_DataInTempService.AddDataInTemp(newDataInTemp);
|
||||
}
|
||||
this.BindGrid();
|
||||
ShowNotify("数据已导入临时表!", MessageBoxIcon.Success);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("导入数据为空!", MessageBoxIcon.Success);
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Alert.ShowInTop("'" + ex.Message + "'", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
#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) + ".xls");
|
||||
Response.ContentType = "application/excel";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
Response.Write(GetGridTableHtml(Grid1));
|
||||
Response.End();
|
||||
}
|
||||
#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, "SiteVisaManagement"); }));
|
||||
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, string IsPDMS)
|
||||
{
|
||||
var oldViewInfos = from x in Funs.DB.Comprehensive_SiteVisaManagement
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
select x;
|
||||
|
||||
var units = from x in Funs.DB.Base_Unit
|
||||
join y in Funs.DB.Project_ProjectUnit on x.UnitId equals y.UnitId
|
||||
where y.ProjectId == this.CurrUser.LoginProjectId
|
||||
select x;
|
||||
|
||||
var cns = from x in Funs.DB.Base_CNProfessional select x;
|
||||
|
||||
var unitWorks = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId && (x.SuperUnitWork == null || x.SuperUnitWork == "0") select x;
|
||||
|
||||
var dataInTemp = from x in Funs.DB.Sys_CQMS_DataInTemp
|
||||
where x.ProjectId == LoginProjectId && x.UserId == UserId && x.Type == "SiteVisaManagement"
|
||||
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;
|
||||
|
||||
Model.Comprehensive_SiteVisaManagement Ins = new Model.Comprehensive_SiteVisaManagement();
|
||||
if (!string.IsNullOrEmpty(tempData.Value1.Trim()))
|
||||
{
|
||||
var unit = units.FirstOrDefault(x => x.UnitName == tempData.Value1.Trim());
|
||||
if (unit == null)
|
||||
{
|
||||
errInfo += "签证单位[" + tempData.Value1.Trim() + "]不存在;";
|
||||
}
|
||||
else
|
||||
{
|
||||
Ins.UnitId = unit.UnitId;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
errInfo += "签证单位为必填项;";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value2.Trim()))
|
||||
{
|
||||
Ins.VisaCode = tempData.Value2.Trim();
|
||||
}
|
||||
else
|
||||
{
|
||||
errInfo += "施工签证单编号为必填项;";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value3.Trim()))
|
||||
{
|
||||
Ins.VisaContent = tempData.Value3.Trim();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value4.Trim()))
|
||||
{
|
||||
if (tempData.Value4.Trim() != "未实施" && tempData.Value4.Trim() != "进行中" && tempData.Value4.Trim() != "已完成")
|
||||
{
|
||||
errInfo += "费用审核状态[" + tempData.Value4.Trim() + "]不存在;";
|
||||
}
|
||||
else
|
||||
{
|
||||
Ins.ProcessingState = tempData.Value4.Trim();
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value5.Trim()))
|
||||
{
|
||||
string unitIds = string.Empty;
|
||||
string[] reunit = tempData.Value5.Trim().Split(',');
|
||||
foreach (string unitWork in reunit)
|
||||
{
|
||||
var u = unitWorks.Where(x => x.UnitWorkName == unitWork.Trim()).FirstOrDefault();
|
||||
if (u == null)
|
||||
{
|
||||
errInfo += "单位工程[" + unitWork.Trim() + "]不存在;";
|
||||
}
|
||||
else
|
||||
{
|
||||
var q = BLL.UnitWorkService.GetUnitWorkByUnitWorkName(this.CurrUser.LoginProjectId, unitWork.Trim()).UnitWorkId;
|
||||
unitIds += q + ",";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(unitIds))
|
||||
{
|
||||
unitIds = unitIds.Substring(0, unitIds.LastIndexOf(","));
|
||||
}
|
||||
Ins.UnitWorkId = unitIds;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value6.Trim()))
|
||||
{
|
||||
var cn = cns.Where(x => x.ProfessionalName == tempData.Value6.Trim()).FirstOrDefault();
|
||||
if (cn == null)
|
||||
{
|
||||
errInfo += "专业[" + tempData.Value6.Trim() + "]不存在;";
|
||||
}
|
||||
else
|
||||
{
|
||||
Ins.CNProfessionalId = cn.CNProfessionalId;
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value7.Trim()))
|
||||
{
|
||||
try
|
||||
{
|
||||
Ins.VisaDate = Funs.GetNewDateTime(tempData.Value7.Trim());
|
||||
if (Ins.VisaDate == null)
|
||||
{
|
||||
errInfo += "签证时间[" + tempData.Value7.Trim() + "]格式错误;";
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
errInfo += "签证时间[" + tempData.Value7.Trim() + "]格式错误;";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value8.Trim()))
|
||||
{
|
||||
Ins.SignMan = tempData.Value8.Trim();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value9.Trim()))
|
||||
{
|
||||
Ins.AuditMan = tempData.Value9.Trim();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value10.Trim()))
|
||||
{
|
||||
Ins.Remark = tempData.Value10.Trim();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value11.Trim()))
|
||||
{
|
||||
try
|
||||
{
|
||||
Ins.RemarkCode = Convert.ToInt32(tempData.Value11.Trim());
|
||||
if (Ins.RemarkCode == null)
|
||||
{
|
||||
errInfo += "标志编号[" + tempData.Value11.Trim() + "]格式错误;";
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
errInfo += "标志编号[" + tempData.Value11.Trim() + "]格式错误;";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
errInfo += "标志编号为必填项;";
|
||||
}
|
||||
Ins.CompileMan = this.CurrUser.UserId;
|
||||
if (string.IsNullOrEmpty(errInfo)) ////所有信息正确的话 插入数据
|
||||
{
|
||||
Ins.ProjectId = LoginProjectId;
|
||||
var isExitISOValue = oldViewInfos.FirstOrDefault(x => x.RemarkCode == Funs.GetNewIntOrZero(tempData.Value11));
|
||||
if (isExitISOValue != null) ///已存在
|
||||
{
|
||||
Ins.VisaId = isExitISOValue.VisaId;
|
||||
BLL.SiteVisaManagementService.UpdateSiteVisaManagement(Ins);
|
||||
}
|
||||
else
|
||||
{
|
||||
Ins.Status = BLL.Const.Comprehensive_Compile;
|
||||
Ins.VisaId = SQLHelper.GetNewID(typeof(Model.Comprehensive_SiteVisaManagement));
|
||||
BLL.SiteVisaManagementService.AddSiteVisaManagement(Ins);
|
||||
}
|
||||
BLL.Sys_CQMS_DataInTempService.DeleteDataInTempByDataInTempID(tempData.TempId);
|
||||
okCount++;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(errInfo))
|
||||
{
|
||||
tempData.ToopValue = errInfo;
|
||||
BLL.Sys_CQMS_DataInTempService.UpdateDataInTemp(tempData);
|
||||
erreMessage += errInfo + ";";
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 删除所有数据事件
|
||||
/// <summary>
|
||||
/// 删除所有数据事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAllDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
//先删除临时表中 该人员以前导入的数据
|
||||
BLL.Sys_CQMS_DataInTempService.DeleteDataInTempByProjectIdUserId(this.CurrUser.LoginProjectId, this.CurrUser.UserId, "SiteVisaManagement");
|
||||
this.BindGrid();
|
||||
ShowNotify("删除成功!", MessageBoxIcon.Success);
|
||||
this.lbDataCout.Text = string.Empty;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 模版导入说明 下载
|
||||
/// <summary>
|
||||
/// 下载模版
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void imgbtnUpload_Click(object sender, EventArgs e)
|
||||
{
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string uploadfilepath = rootPath + Const.SiteVisaManagementDataInUrl;
|
||||
string filePath = Const.SiteVisaManagementDataInUrl;
|
||||
string fileName = Path.GetFileName(filePath);
|
||||
FileInfo info = new FileInfo(uploadfilepath);
|
||||
long fileSize = info.Length;
|
||||
Response.ClearContent();
|
||||
Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
|
||||
Response.ContentType = "excel/plain";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
Response.AddHeader("Content-Length", fileSize.ToString().Trim());
|
||||
Response.TransmitFile(uploadfilepath, 0, fileSize);
|
||||
Response.End();
|
||||
}
|
||||
#endregion
|
||||
|
||||
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];
|
||||
}
|
||||
}
|
||||
}
|
251
SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagementDataInNew.aspx.designer.cs
generated
Normal file
251
SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagementDataInNew.aspx.designer.cs
generated
Normal file
|
@ -0,0 +1,251 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
|
||||
|
||||
public partial class SiteVisaManagementDataInNew
|
||||
{
|
||||
|
||||
/// <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>
|
||||
/// 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>
|
||||
/// 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,72 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SiteVisaManagementDataInNewEdit.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.SiteVisaManagementDataInNewEdit" %>
|
||||
|
||||
<!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" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue2" Label="施工签证单编号" ShowRedStar="true" Required="true" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue3" Label="施工签证单内容" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue4" Label="费用审核状态" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtValue5" Label="单位工程" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue6" Label="专业" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue7" Label="签证时间" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue8" Label="签证人" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtValue9" Label="审批人" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue10" Label="备注" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue11" 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,235 @@
|
|||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
public partial class SiteVisaManagementDataInNewEdit : 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_CQMS_DataInTempService.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.txtValue8.Text = dataInTemp.Value8;
|
||||
this.txtValue9.Text = dataInTemp.Value9;
|
||||
this.txtValue10.Text = dataInTemp.Value10;
|
||||
this.txtValue11.Text = dataInTemp.Value11;
|
||||
|
||||
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_CQMS_DataInTempService.GetDataInTempByTempId(this.TempId);
|
||||
if (this.ckAll.Checked)
|
||||
{
|
||||
var allDataInTemp = from x in Funs.DB.Sys_CQMS_DataInTemp where x.ProjectId == this.CurrUser.LoginProjectId && x.UserId == this.CurrUser.UserId && x.Type == "SiteVisaManagement" 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value8 != this.txtValue8.Text.Trim())
|
||||
{
|
||||
var tempValue8 = allDataInTemp.Where(x => x.Value8 == dataInTemp.Value8 || (x.Value8 == null && dataInTemp.Value8 == null));
|
||||
if (tempValue8 != null)
|
||||
{
|
||||
foreach (var item in tempValue8)
|
||||
{
|
||||
item.Value8 = this.txtValue8.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value9 != this.txtValue9.Text.Trim())
|
||||
{
|
||||
var tempValue9 = allDataInTemp.Where(x => x.Value9 == dataInTemp.Value9 || (x.Value9 == null && dataInTemp.Value9 == null));
|
||||
if (tempValue9 != null)
|
||||
{
|
||||
foreach (var item in tempValue9)
|
||||
{
|
||||
item.Value9 = this.txtValue9.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value10 != this.txtValue10.Text.Trim())
|
||||
{
|
||||
var tempValue10 = allDataInTemp.Where(x => x.Value10 == dataInTemp.Value10 || (x.Value10 == null && dataInTemp.Value10 == null));
|
||||
if (tempValue10 != null)
|
||||
{
|
||||
foreach (var item in tempValue10)
|
||||
{
|
||||
item.Value10 = this.txtValue10.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value11 != this.txtValue11.Text.Trim())
|
||||
{
|
||||
var tempValue11 = allDataInTemp.Where(x => x.Value11 == dataInTemp.Value11 || (x.Value11 == null && dataInTemp.Value11 == null));
|
||||
if (tempValue11 != null)
|
||||
{
|
||||
foreach (var item in tempValue11)
|
||||
{
|
||||
item.Value11 = this.txtValue11.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_CQMS_DataInTemp newDataInTemp = new Model.Sys_CQMS_DataInTemp();
|
||||
newDataInTemp.ProjectId = this.CurrUser.LoginProjectId;
|
||||
newDataInTemp.UserId = this.CurrUser.UserId;
|
||||
newDataInTemp.Time = System.DateTime.Now;
|
||||
newDataInTemp.Type = "SiteVisaManagement";
|
||||
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();
|
||||
newDataInTemp.Value8 = this.txtValue8.Text.Trim();
|
||||
newDataInTemp.Value9 = this.txtValue9.Text.Trim();
|
||||
newDataInTemp.Value10 = this.txtValue10.Text.Trim();
|
||||
newDataInTemp.Value11 = this.txtValue11.Text.Trim();
|
||||
if (!string.IsNullOrEmpty(this.TempId))
|
||||
{
|
||||
newDataInTemp.TempId = this.TempId;
|
||||
newDataInTemp.ToopValue = null;
|
||||
BLL.Sys_CQMS_DataInTempService.UpdateDataInTemp(newDataInTemp);
|
||||
}
|
||||
}
|
||||
ShowNotify("信息修改完成!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
188
SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagementDataInNewEdit.aspx.designer.cs
generated
Normal file
188
SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagementDataInNewEdit.aspx.designer.cs
generated
Normal file
|
@ -0,0 +1,188 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
|
||||
|
||||
public partial class SiteVisaManagementDataInNewEdit
|
||||
{
|
||||
|
||||
/// <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>
|
||||
/// txtValue8 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue8;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue9 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue9;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue10 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue10;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue11 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue11;
|
||||
|
||||
/// <summary>
|
||||
/// ckAll 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.CheckBox ckAll;
|
||||
|
||||
/// <summary>
|
||||
/// lbErrCout 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea lbErrCout;
|
||||
}
|
||||
}
|
|
@ -15,7 +15,7 @@
|
|||
<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="RemarkCode" SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
SortField="RemarkCode" SortDirection="ASC" 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">
|
||||
|
@ -88,7 +88,7 @@
|
|||
</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">
|
||||
Width="1200px" Height="650px">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<Items>
|
||||
|
|
|
@ -201,7 +201,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
/// <param name="e"></param>
|
||||
protected void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("TrainingRecordsDataIn.aspx", "导入 - ")));
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("TrainingRecordsDataInNew.aspx", "导入 - ")));
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -0,0 +1,169 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TrainingRecordsDataInNew.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.TrainingRecordsDataInNew" %>
|
||||
|
||||
<!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" Hidden="true">
|
||||
</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:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center" TextAlign="Center" />
|
||||
<f:RenderField Width="70px" HeaderText="行号" ColumnID="RowNo" DataField="RowNo" SortField="RowNo"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:WindowField ColumnID="Value1" HeaderTextAlign="Center" TextAlign="Left" Width="300px" WindowID="Window1" HeaderText="培训内容"
|
||||
DataTextField="Value1" DataIFrameUrlFields="TempId" DataIFrameUrlFormatString="TrainingRecordsDataInNewEdit.aspx?TempId={0}"
|
||||
Title="培训内容" DataToolTipField="ToopValue" SortField="Value1">
|
||||
</f:WindowField>
|
||||
<f:RenderField Width="100px" HeaderText="专业名称" ColumnID="Value2" DataField="Value2" SortField="Value2"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" HeaderText="培训对象" ColumnID="Value3" DataField="Value3" SortField="Value3"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" HeaderText="培训地点" ColumnID="Value4" DataField="Value4" SortField="Value4"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" HeaderText="课时" ColumnID="Value5" DataField="Value5" SortField="Value5"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" HeaderText="主讲人" ColumnID="Value6" DataField="Value6" SortField="Value6"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" HeaderText="备注" ColumnID="Value7" DataField="Value7" SortField="Value7"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" HeaderText="标志编号" ColumnID="Value8" DataField="Value8" SortField="Value8"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</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,488 @@
|
|||
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 TrainingRecordsDataInNew : PageBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 错误集合
|
||||
/// </summary>
|
||||
public static string errorInfos = string.Empty;
|
||||
|
||||
#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"
|
||||
+ @",ToopValue,Type"
|
||||
+ @" FROM Sys_CQMS_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_CQMS_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;
|
||||
}
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TrainingRecordsDataInNewEdit.aspx?TempId={0}", Grid1.SelectedRowID, "维护 - ")));
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 导入信息 维护
|
||||
/// <summary>
|
||||
/// 导入信息编辑
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TrainingRecordsDataInNewEdit.aspx?TempId={0}", Grid1.SelectedRowID, "维护 - ")));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
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_CQMS_DataInTempService.DeleteDataInTempByDataInTempID(rowID);
|
||||
}
|
||||
|
||||
ShowNotify("删除成功!", MessageBoxIcon.Success);
|
||||
this.BindGrid();
|
||||
}
|
||||
#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 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 + Const.ExcelUrl;
|
||||
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 + Const.ExcelUrl + 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 = 1; i < ds.Tables[0].Rows.Count; i++)
|
||||
{
|
||||
Sys_CQMS_DataInTemp newDataInTemp = new Sys_CQMS_DataInTemp();
|
||||
newDataInTemp.TempId = SQLHelper.GetNewID(typeof(Model.Sys_CQMS_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][0].ToString();
|
||||
newDataInTemp.Value2 = ds.Tables[0].Rows[i][1].ToString();
|
||||
newDataInTemp.Value3 = ds.Tables[0].Rows[i][2].ToString();
|
||||
newDataInTemp.Value4 = ds.Tables[0].Rows[i][3].ToString();
|
||||
newDataInTemp.Value5 = ds.Tables[0].Rows[i][4].ToString();
|
||||
newDataInTemp.Value6 = ds.Tables[0].Rows[i][5].ToString();
|
||||
newDataInTemp.Value7 = ds.Tables[0].Rows[i][6].ToString();
|
||||
newDataInTemp.Value8 = ds.Tables[0].Rows[i][7].ToString();
|
||||
|
||||
BLL.Sys_CQMS_DataInTempService.AddDataInTemp(newDataInTemp);
|
||||
}
|
||||
this.BindGrid();
|
||||
ShowNotify("数据已导入临时表!", MessageBoxIcon.Success);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("导入数据为空!", MessageBoxIcon.Success);
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Alert.ShowInTop("'" + ex.Message + "'", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
#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) + ".xls");
|
||||
Response.ContentType = "application/excel";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
Response.Write(GetGridTableHtml(Grid1));
|
||||
Response.End();
|
||||
}
|
||||
#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, "TrainingRecords"); }));
|
||||
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, string IsPDMS)
|
||||
{
|
||||
var oldViewInfos = from x in Funs.DB.Comprehensive_TrainingRecords
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
select x;
|
||||
|
||||
var cns = from x in Funs.DB.Base_CNProfessional select x;
|
||||
|
||||
var dataInTemp = from x in Funs.DB.Sys_CQMS_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;
|
||||
|
||||
Model.Comprehensive_TrainingRecords Ins = new Model.Comprehensive_TrainingRecords();
|
||||
if (!string.IsNullOrEmpty(tempData.Value1.Trim()))
|
||||
{
|
||||
Ins.TrainingContents = tempData.Value1.Trim();
|
||||
}
|
||||
else
|
||||
{
|
||||
errInfo += "培训内容为必填项;";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value2.Trim()))
|
||||
{
|
||||
var cn = cns.Where(x => x.ProfessionalName == tempData.Value2.Trim()).FirstOrDefault();
|
||||
if (cn == null)
|
||||
{
|
||||
errInfo += "专业名称[" + tempData.Value2.Trim() + "]不存在;";
|
||||
}
|
||||
else
|
||||
{
|
||||
Ins.CNProfessionalId = cn.CNProfessionalId;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
errInfo += "专业名称为必填项;";
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(tempData.Value3.Trim()))
|
||||
{
|
||||
Ins.TrainingObject = tempData.Value3.Trim();
|
||||
}
|
||||
else
|
||||
{
|
||||
errInfo += "培训对象为必填项;";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value4.Trim()))
|
||||
{
|
||||
Ins.TrainingAddress = tempData.Value4.Trim();
|
||||
}
|
||||
else
|
||||
{
|
||||
errInfo += "培训地点为必填项;";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value5.Trim()))
|
||||
{
|
||||
try
|
||||
{
|
||||
Ins.Hours = Funs.GetNewDecimal(tempData.Value5.Trim());
|
||||
if (Ins.Hours == null)
|
||||
{
|
||||
errInfo += "课时[" + tempData.Value5.Trim() + "]不存在;";
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
errInfo += "课时[" + tempData.Value5.Trim() + "]不存在;";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value6.Trim()))
|
||||
{
|
||||
Ins.KeynoteSpeaker = tempData.Value6.Trim();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value7.Trim()))
|
||||
{
|
||||
Ins.Remark=tempData.Value7.Trim();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value8.Trim()))
|
||||
{
|
||||
try
|
||||
{
|
||||
Ins.RemarkCode = Convert.ToInt32(tempData.Value8.Trim());
|
||||
if (Ins.RemarkCode == null)
|
||||
{
|
||||
errInfo += "标志编号[" + tempData.Value8.Trim() + "]格式错误;";
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
errInfo += "标志编号[" + tempData.Value8.Trim() + "]格式错误;";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
errInfo += "标志编号为必填项;";
|
||||
}
|
||||
if (string.IsNullOrEmpty(errInfo)) ////所有信息正确的话 插入数据
|
||||
{
|
||||
Ins.ProjectId = LoginProjectId;
|
||||
var isExitISOValue = oldViewInfos.FirstOrDefault(x => x.RemarkCode == Funs.GetNewIntOrZero(tempData.Value8));
|
||||
if (isExitISOValue != null) ///已存在
|
||||
{
|
||||
Ins.TrainingRecordsId = isExitISOValue.TrainingRecordsId;
|
||||
BLL.TrainingRecordsService.UpdateTrainingRecords(Ins);
|
||||
}
|
||||
else
|
||||
{
|
||||
Ins.TrainingRecordsId = SQLHelper.GetNewID(typeof(Model.Comprehensive_ConTechnologyDisclosure));
|
||||
BLL.TrainingRecordsService.AddTrainingRecords(Ins);
|
||||
}
|
||||
BLL.Sys_CQMS_DataInTempService.DeleteDataInTempByDataInTempID(tempData.TempId);
|
||||
okCount++;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(errInfo))
|
||||
{
|
||||
tempData.ToopValue = errInfo;
|
||||
BLL.Sys_CQMS_DataInTempService.UpdateDataInTemp(tempData);
|
||||
erreMessage += errInfo + ";";
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 删除所有数据事件
|
||||
/// <summary>
|
||||
/// 删除所有数据事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAllDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
//先删除临时表中 该人员以前导入的数据
|
||||
BLL.Sys_CQMS_DataInTempService.DeleteDataInTempByProjectIdUserId(this.CurrUser.LoginProjectId, this.CurrUser.UserId, "TrainingRecords");
|
||||
this.BindGrid();
|
||||
ShowNotify("删除成功!", MessageBoxIcon.Success);
|
||||
this.lbDataCout.Text = string.Empty;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 模版导入说明 下载
|
||||
/// <summary>
|
||||
/// 下载模版
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void imgbtnUpload_Click(object sender, EventArgs e)
|
||||
{
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string uploadfilepath = rootPath + Const.CQMS_TrainingRecordsTemplateUrl;
|
||||
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();
|
||||
}
|
||||
#endregion
|
||||
|
||||
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];
|
||||
}
|
||||
}
|
||||
}
|
251
SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecordsDataInNew.aspx.designer.cs
generated
Normal file
251
SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecordsDataInNew.aspx.designer.cs
generated
Normal file
|
@ -0,0 +1,251 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
|
||||
|
||||
public partial class TrainingRecordsDataInNew
|
||||
{
|
||||
|
||||
/// <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>
|
||||
/// 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>
|
||||
/// 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="TrainingRecordsDataInNewEdit.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.TrainingRecordsDataInNewEdit" %>
|
||||
|
||||
<!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" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue2" Label="专业名称" ShowRedStar="true" Required="true" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue3" Label="培训对象" ShowRedStar="true" Required="true" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue4" Label="培训地点" Required="true" ShowRedStar="true" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtValue5" Label="课时" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue6" Label="主讲人" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue7" Label="备注" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue8" Label="标志编号" ShowRedStar="true" Required="true" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<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,193 @@
|
|||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
public partial class TrainingRecordsDataInNewEdit : 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_CQMS_DataInTempService.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.txtValue8.Text = dataInTemp.Value8;
|
||||
|
||||
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_CQMS_DataInTempService.GetDataInTempByTempId(this.TempId);
|
||||
if (this.ckAll.Checked)
|
||||
{
|
||||
var allDataInTemp = from x in Funs.DB.Sys_CQMS_DataInTemp where x.ProjectId == this.CurrUser.LoginProjectId && x.UserId == this.CurrUser.UserId && x.Type == "TrainingRecords" 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value8 != this.txtValue8.Text.Trim())
|
||||
{
|
||||
var tempValue8 = allDataInTemp.Where(x => x.Value8 == dataInTemp.Value8 || (x.Value8 == null && dataInTemp.Value8 == null));
|
||||
if (tempValue8 != null)
|
||||
{
|
||||
foreach (var item in tempValue8)
|
||||
{
|
||||
item.Value8 = this.txtValue8.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_CQMS_DataInTemp newDataInTemp = new Model.Sys_CQMS_DataInTemp();
|
||||
newDataInTemp.ProjectId = this.CurrUser.LoginProjectId;
|
||||
newDataInTemp.UserId = this.CurrUser.UserId;
|
||||
newDataInTemp.Time = System.DateTime.Now;
|
||||
newDataInTemp.Type = "TrainingRecords";
|
||||
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();
|
||||
newDataInTemp.Value8 = this.txtValue8.Text.Trim();
|
||||
if (!string.IsNullOrEmpty(this.TempId))
|
||||
{
|
||||
newDataInTemp.TempId = this.TempId;
|
||||
newDataInTemp.ToopValue = null;
|
||||
BLL.Sys_CQMS_DataInTempService.UpdateDataInTemp(newDataInTemp);
|
||||
}
|
||||
}
|
||||
ShowNotify("信息修改完成!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
161
SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecordsDataInNewEdit.aspx.designer.cs
generated
Normal file
161
SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecordsDataInNewEdit.aspx.designer.cs
generated
Normal file
|
@ -0,0 +1,161 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
|
||||
|
||||
public partial class TrainingRecordsDataInNewEdit
|
||||
{
|
||||
|
||||
/// <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>
|
||||
/// txtValue8 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue8;
|
||||
|
||||
/// <summary>
|
||||
/// ckAll 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.CheckBox ckAll;
|
||||
|
||||
/// <summary>
|
||||
/// lbErrCout 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea lbErrCout;
|
||||
}
|
||||
}
|
|
@ -441,6 +441,8 @@
|
|||
<Content Include="CQMS\Comprehensive\DataReceivingDoc.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\DataReceivingDocApprove.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\DataReceivingDocDataIn.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\DataReceivingDocDataInNew.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\DataReceivingDocDataInNewEdit.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\DataReceivingDocEdit.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\DataReceivingEdit.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\DesignChangeOrder.aspx" />
|
||||
|
@ -458,6 +460,8 @@
|
|||
<Content Include="CQMS\Comprehensive\DesignDrawings.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\DesignDrawingsApprove.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\DesignDrawingsDataIn.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\DesignDrawingsDataInNew.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\DesignDrawingsDataInNewEdit.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\DesignDrawingsEdit.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\GeneralPlanApproval.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\GeneralPlanApprovalDataIn.aspx" />
|
||||
|
@ -508,6 +512,8 @@
|
|||
<Content Include="CQMS\Comprehensive\QualityAccident.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\QualityAccidentApprove.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\QualityAccidentDataIn.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\QualityAccidentDataInNew.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\QualityAccidentDataInNewEdit.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\QualityAccidentEdit.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\ReviewDrawings.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\ReviewDrawingsDataIn.aspx" />
|
||||
|
@ -517,6 +523,8 @@
|
|||
<Content Include="CQMS\Comprehensive\SiteVisaManagement.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\SiteVisaManagementApprove.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\SiteVisaManagementDataIn.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\SiteVisaManagementDataInNew.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\SiteVisaManagementDataInNewEdit.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\SiteVisaManagementEdit.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\SpecialEquipment.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\SpecialEquipmentApprove.aspx" />
|
||||
|
@ -526,6 +534,8 @@
|
|||
<Content Include="CQMS\Comprehensive\SpecialEquipmentEdit.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\TrainingRecords.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\TrainingRecordsDataIn.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\TrainingRecordsDataInNew.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\TrainingRecordsDataInNewEdit.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\TrainingRecordsEdit.aspx" />
|
||||
<Content Include="CQMS\DataBase\ConstructionStandardList.aspx" />
|
||||
<Content Include="CQMS\DataBase\ConstructionStandardListEdit.aspx" />
|
||||
|
@ -7567,6 +7577,20 @@
|
|||
<Compile Include="CQMS\Comprehensive\DataReceivingDocDataIn.aspx.designer.cs">
|
||||
<DependentUpon>DataReceivingDocDataIn.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\DataReceivingDocDataInNew.aspx.cs">
|
||||
<DependentUpon>DataReceivingDocDataInNew.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\DataReceivingDocDataInNew.aspx.designer.cs">
|
||||
<DependentUpon>DataReceivingDocDataInNew.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\DataReceivingDocDataInNewEdit.aspx.cs">
|
||||
<DependentUpon>DataReceivingDocDataInNewEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\DataReceivingDocDataInNewEdit.aspx.designer.cs">
|
||||
<DependentUpon>DataReceivingDocDataInNewEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\DataReceivingDocEdit.aspx.cs">
|
||||
<DependentUpon>DataReceivingDocEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
@ -7686,6 +7710,20 @@
|
|||
<Compile Include="CQMS\Comprehensive\DesignDrawingsDataIn.aspx.designer.cs">
|
||||
<DependentUpon>DesignDrawingsDataIn.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\DesignDrawingsDataInNew.aspx.cs">
|
||||
<DependentUpon>DesignDrawingsDataInNew.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\DesignDrawingsDataInNew.aspx.designer.cs">
|
||||
<DependentUpon>DesignDrawingsDataInNew.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\DesignDrawingsDataInNewEdit.aspx.cs">
|
||||
<DependentUpon>DesignDrawingsDataInNewEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\DesignDrawingsDataInNewEdit.aspx.designer.cs">
|
||||
<DependentUpon>DesignDrawingsDataInNewEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\DesignDrawingsEdit.aspx.cs">
|
||||
<DependentUpon>DesignDrawingsEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
@ -8036,6 +8074,20 @@
|
|||
<Compile Include="CQMS\Comprehensive\QualityAccidentDataIn.aspx.designer.cs">
|
||||
<DependentUpon>QualityAccidentDataIn.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\QualityAccidentDataInNew.aspx.cs">
|
||||
<DependentUpon>QualityAccidentDataInNew.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\QualityAccidentDataInNew.aspx.designer.cs">
|
||||
<DependentUpon>QualityAccidentDataInNew.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\QualityAccidentDataInNewEdit.aspx.cs">
|
||||
<DependentUpon>QualityAccidentDataInNewEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\QualityAccidentDataInNewEdit.aspx.designer.cs">
|
||||
<DependentUpon>QualityAccidentDataInNewEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\QualityAccidentEdit.aspx.cs">
|
||||
<DependentUpon>QualityAccidentEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
@ -8099,6 +8151,20 @@
|
|||
<Compile Include="CQMS\Comprehensive\SiteVisaManagementDataIn.aspx.designer.cs">
|
||||
<DependentUpon>SiteVisaManagementDataIn.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\SiteVisaManagementDataInNew.aspx.cs">
|
||||
<DependentUpon>SiteVisaManagementDataInNew.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\SiteVisaManagementDataInNew.aspx.designer.cs">
|
||||
<DependentUpon>SiteVisaManagementDataInNew.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\SiteVisaManagementDataInNewEdit.aspx.cs">
|
||||
<DependentUpon>SiteVisaManagementDataInNewEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\SiteVisaManagementDataInNewEdit.aspx.designer.cs">
|
||||
<DependentUpon>SiteVisaManagementDataInNewEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\SiteVisaManagementEdit.aspx.cs">
|
||||
<DependentUpon>SiteVisaManagementEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
@ -8162,6 +8228,20 @@
|
|||
<Compile Include="CQMS\Comprehensive\TrainingRecordsDataIn.aspx.designer.cs">
|
||||
<DependentUpon>TrainingRecordsDataIn.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\TrainingRecordsDataInNew.aspx.cs">
|
||||
<DependentUpon>TrainingRecordsDataInNew.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\TrainingRecordsDataInNew.aspx.designer.cs">
|
||||
<DependentUpon>TrainingRecordsDataInNew.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\TrainingRecordsDataInNewEdit.aspx.cs">
|
||||
<DependentUpon>TrainingRecordsDataInNewEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\TrainingRecordsDataInNewEdit.aspx.designer.cs">
|
||||
<DependentUpon>TrainingRecordsDataInNewEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\TrainingRecordsEdit.aspx.cs">
|
||||
<DependentUpon>TrainingRecordsEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
|
Loading…
Reference in New Issue