20231115人员信息与体检关联关联
This commit is contained in:
parent
46752f3351
commit
11e8156f65
|
|
@ -1,4 +1,8 @@
|
||||||
using System.Linq;
|
using FineUIPro;
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace BLL
|
namespace BLL
|
||||||
{
|
{
|
||||||
|
|
@ -9,6 +13,62 @@ namespace BLL
|
||||||
{
|
{
|
||||||
public static Model.SGGLDB db = Funs.DB;
|
public static Model.SGGLDB db = Funs.DB;
|
||||||
|
|
||||||
|
#region 获取安全巡检列表信息
|
||||||
|
/// <summary>
|
||||||
|
/// 记录数
|
||||||
|
/// </summary>
|
||||||
|
public static int count
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 定义变量
|
||||||
|
/// </summary>
|
||||||
|
private static IQueryable<Model.SitePerson_Person> getDataLists = from x in db.SitePerson_Person
|
||||||
|
select x;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="projectId"></param>
|
||||||
|
/// <param name="personName"></param>
|
||||||
|
/// <param name="Grid1"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static IEnumerable getListData(string projectId, string personName, Grid Grid1)
|
||||||
|
{
|
||||||
|
IQueryable<Model.SitePerson_Person> getDataList = getDataLists;
|
||||||
|
if (!string.IsNullOrEmpty(projectId))
|
||||||
|
{
|
||||||
|
getDataList = getDataList.Where(e => e.ProjectId == projectId);
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(personName))
|
||||||
|
{
|
||||||
|
getDataList = getDataList.Where(e => e.PersonName.Contains(personName));
|
||||||
|
}
|
||||||
|
|
||||||
|
count = getDataList.Count();
|
||||||
|
if (count == 0)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
getDataList = SortConditionHelper.SortingAndPaging(getDataList, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
|
||||||
|
return from x in getDataList
|
||||||
|
select new
|
||||||
|
{
|
||||||
|
x.ProjectId,
|
||||||
|
ProjectName = db.Base_Project.First(p => p.ProjectId == x.ProjectId).ProjectName,
|
||||||
|
x.UnitId,
|
||||||
|
UnitName = db.Base_Unit.First(p => p.UnitId == x.UnitId).UnitName,
|
||||||
|
x.SitePersonId,
|
||||||
|
x.PersonId,
|
||||||
|
x.CardNo,
|
||||||
|
x.PersonName,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据主键获取体检管理
|
/// 根据主键获取体检管理
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
namespace BLL
|
namespace BLL
|
||||||
{
|
{
|
||||||
using Model;
|
using Model;
|
||||||
|
using NPOI.Util;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
@ -361,17 +362,20 @@
|
||||||
group x by x.ProjectId into g
|
group x by x.ProjectId into g
|
||||||
select new { g.First().ProjectId, count = g.Count() }).Distinct();
|
select new { g.First().ProjectId, count = g.Count() }).Distinct();
|
||||||
|
|
||||||
List<Model.Base_Project> getList = new List<Base_Project>();
|
|
||||||
if (getProjects.Count() > 0)
|
if (getProjects.Count() > 0)
|
||||||
{
|
{
|
||||||
getList = (from x in getProjects
|
var getList = (from x in getProjects
|
||||||
join y in pcount on x.ProjectId equals y.ProjectId into PP
|
join y in pcount on x.ProjectId equals y.ProjectId into PP
|
||||||
from p in PP.DefaultIfEmpty()
|
from p in PP.DefaultIfEmpty()
|
||||||
orderby p.count descending
|
orderby p.count descending
|
||||||
select x).ToList();
|
select x);
|
||||||
|
return getList.ToList();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
return getList;
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,6 @@
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
debugger
|
|
||||||
var imgID = '<%=Grid1.ClientID %>';
|
var imgID = '<%=Grid1.ClientID %>';
|
||||||
F.ready(function () {
|
F.ready(function () {
|
||||||
var $wrap = $("#" + imgID)
|
var $wrap = $("#" + imgID)
|
||||||
|
|
|
||||||
|
|
@ -8,100 +8,91 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<form id="form1" runat="server">
|
<form id="form1" runat="server">
|
||||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||||
<Items>
|
<Items>
|
||||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="体检管理" EnableCollapse="true"
|
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="体检管理" EnableCollapse="true"
|
||||||
runat="server" BoxFlex="1" EnableColumnLines="true" DataKeyNames="FileId" DataIDField="FileId" AllowSorting="true"
|
runat="server" BoxFlex="1" EnableColumnLines="true" DataKeyNames="SitePersonId"
|
||||||
SortField="ProjectCode,FileCode" SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true"
|
DataIDField="SitePersonId" AllowSorting="true"
|
||||||
IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
|
SortField="CardNo" SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="true"
|
||||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
|
IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
|
||||||
<Toolbars>
|
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
|
||||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
<Toolbars>
|
||||||
<Items>
|
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||||
<f:TextBox runat="server" Label="编号" ID="txtFileCode" EmptyText="输入查询条件"
|
<Items>
|
||||||
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="250px" LabelWidth="80px"
|
<f:TextBox runat="server" Label="姓名" ID="txtPersonName" EmptyText="输入查询条件"
|
||||||
LabelAlign="right">
|
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="250px" LabelWidth="80px"
|
||||||
</f:TextBox>
|
LabelAlign="right">
|
||||||
<f:TextBox runat="server" Label="名称" ID="txtFileName" EmptyText="输入查询条件"
|
</f:TextBox>
|
||||||
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="250px" LabelWidth="80px"
|
<f:DropDownList ID="drpProject" runat="server" Label="所属项目" EnableEdit="true"
|
||||||
LabelAlign="right">
|
Hidden="true" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged">
|
||||||
</f:TextBox>
|
</f:DropDownList>
|
||||||
<f:DropDownList ID="drpProject" runat="server" Label="所属项目" EnableEdit="true" Hidden="true" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged">
|
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||||
</f:DropDownList>
|
</f:ToolbarFill>
|
||||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" Icon="FolderUp"
|
||||||
</f:ToolbarFill>
|
EnableAjax="false" DisableControlBeforePostBack="false" Hidden="true">
|
||||||
<f:Button ID="btnNew" Text="新增" Icon="Add" EnablePostBack="false" Hidden="true"
|
</f:Button>
|
||||||
runat="server">
|
</Items>
|
||||||
</f:Button>
|
</f:Toolbar>
|
||||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" Icon="FolderUp"
|
</Toolbars>
|
||||||
EnableAjax="false" DisableControlBeforePostBack="false">
|
<Columns>
|
||||||
</f:Button>
|
<f:TemplateField ColumnID="tfNumber" Width="55px" HeaderText="序号" HeaderTextAlign="Center"
|
||||||
</Items>
|
TextAlign="Center">
|
||||||
</f:Toolbar>
|
<ItemTemplate>
|
||||||
</Toolbars>
|
<asp:Label ID="lblNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||||
<Columns>
|
</ItemTemplate>
|
||||||
<f:TemplateField ColumnID="tfNumber" Width="55px" HeaderText="序号" HeaderTextAlign="Center"
|
</f:TemplateField>
|
||||||
TextAlign="Center">
|
<f:RenderField Width="150px" ColumnID="CardNo" DataField="CardNo"
|
||||||
<ItemTemplate>
|
FieldType="String" HeaderText="卡号" HeaderTextAlign="Center"
|
||||||
<asp:Label ID="lblNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
TextAlign="Left">
|
||||||
</ItemTemplate>
|
</f:RenderField>
|
||||||
</f:TemplateField>
|
<f:RenderField Width="250px" ColumnID="ProjectName" DataField="ProjectName" ExpandUnusedSpace="true"
|
||||||
<f:RenderField Width="100px" ColumnID="FileCode" DataField="FileCode"
|
FieldType="String" HeaderText="项目" HeaderTextAlign="Center"
|
||||||
SortField="FileCode" FieldType="String" HeaderText="编号" HeaderTextAlign="Center"
|
TextAlign="Left">
|
||||||
TextAlign="Left">
|
</f:RenderField>
|
||||||
</f:RenderField>
|
<f:RenderField Width="250px" ColumnID="UnitName" DataField="UnitName"
|
||||||
<f:RenderField Width="380px" ColumnID="ProjectName" DataField="ProjectName"
|
FieldType="String" HeaderText="单位名称" HeaderTextAlign="Center"
|
||||||
SortField="ProjectName" FieldType="String" HeaderText="项目" HeaderTextAlign="Center"
|
TextAlign="Left">
|
||||||
TextAlign="Left">
|
</f:RenderField>
|
||||||
</f:RenderField>
|
<f:RenderField Width="150px" ColumnID="PersonName" DataField="PersonName"
|
||||||
<f:RenderField Width="200px" ColumnID="FileName" DataField="FileName"
|
FieldType="String" HeaderText="姓名" HeaderTextAlign="Center"
|
||||||
SortField="FileName" FieldType="String" HeaderText="名称" HeaderTextAlign="Center"
|
TextAlign="Left">
|
||||||
TextAlign="Left">
|
</f:RenderField>
|
||||||
</f:RenderField>
|
<f:TemplateField ColumnID="tfImageUrl1" Width="150px" HeaderText="体检" HeaderTextAlign="Center"
|
||||||
<f:RenderField Width="90px" ColumnID="CompileManName" DataField="CompileManName"
|
TextAlign="Left">
|
||||||
SortField="CompileManName" FieldType="String" HeaderText="整理人" HeaderTextAlign="Center"
|
<ItemTemplate>
|
||||||
TextAlign="Left">
|
<asp:Label ID="lbImageUrl" runat="server" Text='<%# ConvertImageUrlByImage(Eval("PersonId")) %>'></asp:Label>
|
||||||
</f:RenderField>
|
</ItemTemplate>
|
||||||
<f:RenderField Width="100px" ColumnID="CompileDate" DataField="CompileDate"
|
</f:TemplateField>
|
||||||
SortField="CompileDate" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd"
|
</Columns>
|
||||||
HeaderText="整理时间" HeaderTextAlign="Center" TextAlign="Center">
|
<Listeners>
|
||||||
</f:RenderField>
|
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||||
<f:RenderField Width="140px" ColumnID="FlowOperateName" DataField="FlowOperateName"
|
</Listeners>
|
||||||
SortField="FlowOperateName" FieldType="String" HeaderText="状态" HeaderTextAlign="Center"
|
<PageItems>
|
||||||
TextAlign="Left">
|
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||||
</f:RenderField>
|
</f:ToolbarSeparator>
|
||||||
</Columns>
|
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
|
||||||
<Listeners>
|
</f:ToolbarText>
|
||||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
|
||||||
</Listeners>
|
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||||
<PageItems>
|
</f:DropDownList>
|
||||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
</PageItems>
|
||||||
</f:ToolbarSeparator>
|
</f:Grid>
|
||||||
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
|
</Items>
|
||||||
</f:ToolbarText>
|
</f:Panel>
|
||||||
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
|
<f:Window ID="WindowAtt" Title="附件页面" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||||
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px" Height="500px">
|
||||||
</f:DropDownList>
|
</f:Window>
|
||||||
</PageItems>
|
<f:Menu ID="Menu1" runat="server">
|
||||||
</f:Grid>
|
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" Icon="Pencil" EnablePostBack="true"
|
||||||
</Items>
|
Hidden="true" runat="server" Text="编辑">
|
||||||
</f:Panel>
|
</f:MenuButton>
|
||||||
<f:Window ID="Window1" Title="编辑体检管理" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
</f:Menu>
|
||||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="1024px" Height="600px">
|
|
||||||
</f:Window>
|
<div id="imgID1" style="position: absolute; left: 0; top: 0; width: 200px; height: 200px; z-index: 99999999;">
|
||||||
<f:Window ID="WindowAtt" Title="附件页面" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
<img src="" alt="Alternate Text" style="width: 100%; height: auto;" />
|
||||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px" Height="500px">
|
</div>
|
||||||
</f:Window>
|
|
||||||
<f:Menu ID="Menu1" runat="server">
|
|
||||||
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" Icon="Pencil" EnablePostBack="true"
|
|
||||||
Hidden="true" runat="server" Text="编辑">
|
|
||||||
</f:MenuButton>
|
|
||||||
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
|
|
||||||
Hidden="true" Icon="Delete" ConfirmText="删除选中行?" ConfirmTarget="Parent" runat="server" Text="删除">
|
|
||||||
</f:MenuButton>
|
|
||||||
</f:Menu>
|
|
||||||
</form>
|
</form>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var menuID = '<%= Menu1.ClientID %>';
|
var menuID = '<%= Menu1.ClientID %>';
|
||||||
|
|
@ -115,5 +106,21 @@
|
||||||
__doPostBack(null, 'reloadGrid');
|
__doPostBack(null, 'reloadGrid');
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var imgID = '<%=Grid1.ClientID %>';
|
||||||
|
F.ready(function () {
|
||||||
|
var $wrap = $("#" + imgID)
|
||||||
|
$wrap.find('img').hover(function (e) {
|
||||||
|
console.log($(this).offset())
|
||||||
|
var top = $(this).offset().top;
|
||||||
|
var left = $(this).offset().left - 200;
|
||||||
|
var src = $(this).attr('src')
|
||||||
|
console.log('src', src, top, left)
|
||||||
|
$('#imgID1').css("left", left).css("top", top).show().find('img').attr('src', src)
|
||||||
|
}, function () {
|
||||||
|
$('#imgID1').hide()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,8 @@
|
||||||
using BLL;
|
using BLL;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Data;
|
|
||||||
using System.Data.SqlClient;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Web;
|
||||||
using AspNet = System.Web.UI.WebControls;
|
using AspNet = System.Web.UI.WebControls;
|
||||||
|
|
||||||
namespace FineUIPro.Web.HSSE.OccupationHealth
|
namespace FineUIPro.Web.HSSE.OccupationHealth
|
||||||
|
|
@ -24,7 +22,6 @@ namespace FineUIPro.Web.HSSE.OccupationHealth
|
||||||
Funs.DropDownPageSize(this.ddlPageSize);
|
Funs.DropDownPageSize(this.ddlPageSize);
|
||||||
////权限按钮方法
|
////权限按钮方法
|
||||||
this.GetButtonPower();
|
this.GetButtonPower();
|
||||||
this.btnNew.OnClientClick = Window1.GetShowReference("PhysicalExaminationEdit.aspx") + "return false;";
|
|
||||||
|
|
||||||
// 绑定表格
|
// 绑定表格
|
||||||
this.BindGrid();
|
this.BindGrid();
|
||||||
|
|
@ -38,47 +35,9 @@ namespace FineUIPro.Web.HSSE.OccupationHealth
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void BindGrid()
|
private void BindGrid()
|
||||||
{
|
{
|
||||||
string strSql = @"SELECT PhysicalExamination.FileId,PhysicalExamination.FileCode,PhysicalExamination.FileName,CompileManPerson.PersonName AS CompileManName,PhysicalExamination.CompileDate,Project.ProjectName,Project.ProjectCode"
|
var getData = PhysicalExaminationService.getListData(this.CurrUser.LoginProjectId, this.txtPersonName.Text.Trim(), Grid1);
|
||||||
+ @" ,(CASE WHEN PhysicalExamination.States = " + BLL.Const.State_0 + " OR PhysicalExamination.States IS NULL THEN '待['+OperatePerson.PersonName+']提交' WHEN PhysicalExamination.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperatePerson.PersonName+']办理' END) AS FlowOperateName"
|
Grid1.RecordCount = PhysicalExaminationService.count;
|
||||||
+ @" FROM OccupationHealth_PhysicalExamination AS PhysicalExamination"
|
Grid1.DataSource = getData;
|
||||||
+ @" LEFT JOIN Sys_FlowOperate AS FlowOperate ON PhysicalExamination.FileId=FlowOperate.DataId AND FlowOperate.IsClosed <> 1"
|
|
||||||
+ @" LEFT JOIN Person_Persons AS OperatePerson ON FlowOperate.OperaterId=OperatePerson.PersonId "
|
|
||||||
+ @" LEFT JOIN Sys_CodeRecords AS CodeRecords ON PhysicalExamination.FileId=CodeRecords.DataId "
|
|
||||||
+ @" LEFT JOIN Base_Project AS Project ON PhysicalExamination.ProjectId=Project.ProjectId "
|
|
||||||
+ @" LEFT JOIN Person_Persons AS CompileManPerson ON PhysicalExamination.CompileMan =CompileManPerson.PersonId WHERE 1=1 ";
|
|
||||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
|
||||||
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) ///总部查看
|
|
||||||
{
|
|
||||||
strSql += " AND PhysicalExamination.States = @States"; ///状态为已完成
|
|
||||||
listStr.Add(new SqlParameter("@States", BLL.Const.State_2));
|
|
||||||
if (this.drpProject.SelectedValue != null && this.drpProject.SelectedValue != BLL.Const._Null)
|
|
||||||
{
|
|
||||||
strSql += " AND PhysicalExamination.ProjectId = @ProjectId";
|
|
||||||
listStr.Add(new SqlParameter("@ProjectId", this.drpProject.SelectedValue));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else //现场查看
|
|
||||||
{
|
|
||||||
strSql += " AND PhysicalExamination.ProjectId = @ProjectId";
|
|
||||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
|
||||||
}
|
|
||||||
if (!string.IsNullOrEmpty(this.txtFileCode.Text.Trim()))
|
|
||||||
{
|
|
||||||
strSql += " AND FileCode LIKE @FileCode";
|
|
||||||
listStr.Add(new SqlParameter("@FileCode", "%" + this.txtFileCode.Text.Trim() + "%"));
|
|
||||||
}
|
|
||||||
if (!string.IsNullOrEmpty(this.txtFileName.Text.Trim()))
|
|
||||||
{
|
|
||||||
strSql += " AND PhysicalExamination.FileName LIKE @FileName";
|
|
||||||
listStr.Add(new SqlParameter("@FileName", "%" + this.txtFileName.Text.Trim() + "%"));
|
|
||||||
}
|
|
||||||
|
|
||||||
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();
|
Grid1.DataBind();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -160,47 +119,12 @@ namespace FineUIPro.Web.HSSE.OccupationHealth
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
string id = Grid1.SelectedRowID;
|
string id = Grid1.SelectedRowID;
|
||||||
var OccupationHealth = BLL.PhysicalExaminationService.GetPhysicalExaminationById(id);
|
if (!this.btnMenuEdit.Hidden) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面
|
||||||
if (OccupationHealth != null)
|
|
||||||
{
|
{
|
||||||
if (this.btnMenuEdit.Hidden || OccupationHealth.States == BLL.Const.State_2) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面
|
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("PhysicalExaminationEdit.aspx?SitePersonId={0}", id, "编辑 - ")));
|
||||||
{
|
|
||||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PhysicalExaminationView.aspx?FileId={0}", id, "查看 - ")));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PhysicalExaminationEdit.aspx?FileId={0}", id, "编辑 - ")));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 删除
|
|
||||||
/// <summary>
|
|
||||||
/// 右键删除事件
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="sender"></param>
|
|
||||||
/// <param name="e"></param>
|
|
||||||
protected void btnMenuDelete_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
if (Grid1.SelectedRowIndexArray.Length > 0)
|
|
||||||
{
|
|
||||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
|
||||||
{
|
|
||||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
|
||||||
var getD = BLL.PhysicalExaminationService.GetPhysicalExaminationById(rowID);
|
|
||||||
if (getD != null)
|
|
||||||
{
|
|
||||||
BLL.LogService.AddSys_Log(this.CurrUser, getD.FileCode, getD.FileId, BLL.Const.ServerPhysicalExaminationMenuId, BLL.Const.BtnDelete);
|
|
||||||
BLL.PhysicalExaminationService.DeletePhysicalExaminationById(rowID);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.BindGrid();
|
|
||||||
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region 获取按钮权限
|
#region 获取按钮权限
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -221,19 +145,11 @@ namespace FineUIPro.Web.HSSE.OccupationHealth
|
||||||
}
|
}
|
||||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, menuId);
|
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, menuId);
|
||||||
if (buttonList.Count() > 0)
|
if (buttonList.Count() > 0)
|
||||||
{
|
{
|
||||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
|
||||||
{
|
|
||||||
this.btnNew.Hidden = false;
|
|
||||||
}
|
|
||||||
if (buttonList.Contains(BLL.Const.BtnModify))
|
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||||
{
|
{
|
||||||
this.btnMenuEdit.Hidden = false;
|
this.btnMenuEdit.Hidden = false;
|
||||||
}
|
}
|
||||||
if (buttonList.Contains(BLL.Const.BtnDelete))
|
|
||||||
{
|
|
||||||
this.btnMenuDelete.Hidden = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -299,6 +215,26 @@ namespace FineUIPro.Web.HSSE.OccupationHealth
|
||||||
|
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取整改前图片(放于Img中)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="registrationId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
protected string ConvertImageUrlByImage(object personId)
|
||||||
|
{
|
||||||
|
string url = string.Empty;
|
||||||
|
if (personId != null)
|
||||||
|
{
|
||||||
|
var attach = BLL.AttachFileService.GetAttachFile(personId.ToString() + "#3", BLL.Const.PersonListMenuId);
|
||||||
|
if (attach != null)
|
||||||
|
{
|
||||||
|
url = HttpUtility.HtmlDecode(BLL.UploadAttachmentService.ShowImage("../../", attach.AttachUrl));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return url;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -7,11 +7,13 @@
|
||||||
// </自动生成>
|
// </自动生成>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace FineUIPro.Web.HSSE.OccupationHealth {
|
namespace FineUIPro.Web.HSSE.OccupationHealth
|
||||||
|
{
|
||||||
|
|
||||||
public partial class PhysicalExamination {
|
|
||||||
|
public partial class PhysicalExamination
|
||||||
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Head1 控件。
|
/// Head1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -20,7 +22,7 @@ namespace FineUIPro.Web.HSSE.OccupationHealth {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::System.Web.UI.HtmlControls.HtmlHead Head1;
|
protected global::System.Web.UI.HtmlControls.HtmlHead Head1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// form1 控件。
|
/// form1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -29,7 +31,7 @@ namespace FineUIPro.Web.HSSE.OccupationHealth {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// PageManager1 控件。
|
/// PageManager1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -38,7 +40,7 @@ namespace FineUIPro.Web.HSSE.OccupationHealth {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.PageManager PageManager1;
|
protected global::FineUIPro.PageManager PageManager1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Panel1 控件。
|
/// Panel1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -47,7 +49,7 @@ namespace FineUIPro.Web.HSSE.OccupationHealth {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Panel Panel1;
|
protected global::FineUIPro.Panel Panel1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Grid1 控件。
|
/// Grid1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -56,7 +58,7 @@ namespace FineUIPro.Web.HSSE.OccupationHealth {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Grid Grid1;
|
protected global::FineUIPro.Grid Grid1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Toolbar2 控件。
|
/// Toolbar2 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -65,25 +67,16 @@ namespace FineUIPro.Web.HSSE.OccupationHealth {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Toolbar Toolbar2;
|
protected global::FineUIPro.Toolbar Toolbar2;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// txtFileCode 控件。
|
/// txtPersonName 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// 自动生成的字段。
|
/// 自动生成的字段。
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.TextBox txtFileCode;
|
protected global::FineUIPro.TextBox txtPersonName;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// txtFileName 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.TextBox txtFileName;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// drpProject 控件。
|
/// drpProject 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -92,7 +85,7 @@ namespace FineUIPro.Web.HSSE.OccupationHealth {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.DropDownList drpProject;
|
protected global::FineUIPro.DropDownList drpProject;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ToolbarFill1 控件。
|
/// ToolbarFill1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -101,16 +94,7 @@ namespace FineUIPro.Web.HSSE.OccupationHealth {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// btnNew 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.Button btnNew;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// btnOut 控件。
|
/// btnOut 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -119,7 +103,7 @@ namespace FineUIPro.Web.HSSE.OccupationHealth {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Button btnOut;
|
protected global::FineUIPro.Button btnOut;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// lblNumber 控件。
|
/// lblNumber 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -128,7 +112,16 @@ namespace FineUIPro.Web.HSSE.OccupationHealth {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::System.Web.UI.WebControls.Label lblNumber;
|
protected global::System.Web.UI.WebControls.Label lblNumber;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// lbImageUrl 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.Label lbImageUrl;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ToolbarSeparator1 控件。
|
/// ToolbarSeparator1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -137,7 +130,7 @@ namespace FineUIPro.Web.HSSE.OccupationHealth {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ToolbarText1 控件。
|
/// ToolbarText1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -146,7 +139,7 @@ namespace FineUIPro.Web.HSSE.OccupationHealth {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ddlPageSize 控件。
|
/// ddlPageSize 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -155,16 +148,7 @@ namespace FineUIPro.Web.HSSE.OccupationHealth {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Window1 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.Window Window1;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// WindowAtt 控件。
|
/// WindowAtt 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -173,7 +157,7 @@ namespace FineUIPro.Web.HSSE.OccupationHealth {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Window WindowAtt;
|
protected global::FineUIPro.Window WindowAtt;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Menu1 控件。
|
/// Menu1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -182,7 +166,7 @@ namespace FineUIPro.Web.HSSE.OccupationHealth {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Menu Menu1;
|
protected global::FineUIPro.Menu Menu1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// btnMenuEdit 控件。
|
/// btnMenuEdit 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -191,14 +175,5 @@ namespace FineUIPro.Web.HSSE.OccupationHealth {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.MenuButton btnMenuEdit;
|
protected global::FineUIPro.MenuButton btnMenuEdit;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// btnMenuDelete 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.MenuButton btnMenuDelete;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,40 +14,26 @@
|
||||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" Title="体检管理" AutoScroll="true"
|
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" Title="体检管理" AutoScroll="true"
|
||||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||||
<Rows>
|
<Rows>
|
||||||
<f:FormRow>
|
|
||||||
<Items>
|
|
||||||
<f:TextBox ID="txtFileCode" runat="server" Label="编号" LabelAlign="Right" Readonly="true" Required="true" ShowRedStar="true" FocusOnPageLoad="true"
|
|
||||||
MaxLength="50">
|
|
||||||
</f:TextBox>
|
|
||||||
<f:TextBox ID="txtFileName" runat="server" Label="名称" Required="true" ShowRedStar="true"
|
|
||||||
LabelAlign="Right" MaxLength="200" >
|
|
||||||
</f:TextBox>
|
|
||||||
</Items>
|
|
||||||
</f:FormRow>
|
|
||||||
<f:FormRow>
|
|
||||||
<Items>
|
|
||||||
<f:HtmlEditor runat="server" Label="内容" ID="txtFileContent" ShowLabel="false"
|
|
||||||
Editor="UMEditor" BasePath="~/res/umeditor/" ToolbarSet="Basic" Height="250px" LabelAlign="Right">
|
|
||||||
</f:HtmlEditor>
|
|
||||||
</Items>
|
|
||||||
</f:FormRow>
|
|
||||||
<f:FormRow>
|
<f:FormRow>
|
||||||
<Items>
|
<Items>
|
||||||
<f:DropDownList ID="drpCompileMan" runat="server" Label="整理人" EnableEdit="true" LabelAlign="Right">
|
<f:TextBox ID="txtProjectName" runat="server" Label="项目" LabelAlign="Right" Readonly="true" >
|
||||||
</f:DropDownList>
|
</f:TextBox>
|
||||||
<f:DatePicker ID="txtCompileDate" runat="server" Label="整理时间" LabelAlign="Right"
|
|
||||||
EnableEdit="true">
|
|
||||||
</f:DatePicker>
|
|
||||||
</Items>
|
</Items>
|
||||||
</f:FormRow>
|
</f:FormRow>
|
||||||
|
<f:FormRow>
|
||||||
|
<Items>
|
||||||
|
<f:TextBox ID="txtUnitName" runat="server" Label="单位名称" LabelAlign="Right" Readonly="true" >
|
||||||
|
</f:TextBox>
|
||||||
|
</Items>
|
||||||
|
</f:FormRow>
|
||||||
<f:FormRow>
|
<f:FormRow>
|
||||||
<Items>
|
<Items>
|
||||||
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true"
|
<f:TextBox ID="txtCardNo" runat="server" Label="卡号" LabelAlign="Right" Readonly="true" >
|
||||||
BodyPadding="0px">
|
</f:TextBox>
|
||||||
<uc1:FlowOperateControl ID="ctlAuditFlow" runat="server" />
|
<f:TextBox ID="txtPersonName" runat="server" Label="姓名" LabelAlign="Right">
|
||||||
</f:ContentPanel>
|
</f:TextBox>
|
||||||
</Items>
|
</Items>
|
||||||
</f:FormRow>
|
</f:FormRow>
|
||||||
</Rows>
|
</Rows>
|
||||||
<Toolbars>
|
<Toolbars>
|
||||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||||
|
|
@ -55,13 +41,7 @@
|
||||||
<f:Button ID="btnAttachUrl" Text="附件" ToolTip="附件上传及查看" Icon="TableCell" runat="server"
|
<f:Button ID="btnAttachUrl" Text="附件" ToolTip="附件上传及查看" Icon="TableCell" runat="server"
|
||||||
OnClick="btnAttachUrl_Click" ValidateForms="SimpleForm1" MarginLeft="5px">
|
OnClick="btnAttachUrl_Click" ValidateForms="SimpleForm1" MarginLeft="5px">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
<f:ToolbarFill runat="server"> </f:ToolbarFill>
|
<f:ToolbarFill runat="server"> </f:ToolbarFill>
|
||||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ValidateForms="SimpleForm1"
|
|
||||||
OnClick="btnSave_Click">
|
|
||||||
</f:Button>
|
|
||||||
<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ValidateForms="SimpleForm1"
|
|
||||||
OnClick="btnSubmit_Click">
|
|
||||||
</f:Button>
|
|
||||||
<f:Button ID="btnClose" EnablePostBack="false" Text="关闭" runat="server" Icon="SystemClose">
|
<f:Button ID="btnClose" EnablePostBack="false" Text="关闭" runat="server" Icon="SystemClose">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
</Items>
|
</Items>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using BLL;
|
using BLL;
|
||||||
|
using Microsoft.Office.Core;
|
||||||
using System;
|
using System;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
|
|
||||||
|
|
@ -10,30 +11,27 @@ namespace FineUIPro.Web.HSSE.OccupationHealth
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 主键
|
/// 主键
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string FileId
|
public string PersonId
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return (string)ViewState["FileId"];
|
return (string)ViewState["PersonId"];
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
ViewState["FileId"] = value;
|
ViewState["PersonId"] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
public string SitePersonId
|
||||||
/// 项目主键
|
|
||||||
/// </summary>
|
|
||||||
public string ProjectId
|
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return (string)ViewState["ProjectId"];
|
return (string)ViewState["SitePersonId"];
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
ViewState["ProjectId"] = value;
|
ViewState["SitePersonId"] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
@ -49,115 +47,21 @@ namespace FineUIPro.Web.HSSE.OccupationHealth
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||||
BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(this.drpCompileMan, this.CurrUser.LoginProjectId, null, null, true);
|
|
||||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
this.SitePersonId = Request.Params["SitePersonId"];
|
||||||
this.FileId = Request.Params["FileId"];
|
var getPerson= SitePerson_PersonService.GetSitePersonById(this.SitePersonId);
|
||||||
if (!string.IsNullOrEmpty(this.FileId))
|
if (getPerson != null)
|
||||||
{
|
{
|
||||||
Model.OccupationHealth_PhysicalExamination PhysicalExamination = BLL.PhysicalExaminationService.GetPhysicalExaminationById(this.FileId);
|
this.txtProjectName.Text = ProjectService.GetProjectNameByProjectId(getPerson.ProjectId);
|
||||||
if (PhysicalExamination != null)
|
this.txtUnitName.Text = UnitService.GetUnitNameByUnitId(getPerson.UnitId);
|
||||||
{
|
this.PersonId = getPerson.PersonId;
|
||||||
this.ProjectId = PhysicalExamination.ProjectId;
|
this.txtCardNo.Text = getPerson.CardNo;
|
||||||
this.txtFileCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.FileId);
|
this.txtPersonName.Text = getPerson.PersonName;
|
||||||
this.txtFileName.Text = PhysicalExamination.FileName;
|
|
||||||
if (!string.IsNullOrEmpty(PhysicalExamination.CompileMan))
|
|
||||||
{
|
|
||||||
this.drpCompileMan.SelectedValue = PhysicalExamination.CompileMan;
|
|
||||||
}
|
|
||||||
this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", PhysicalExamination.CompileDate);
|
|
||||||
this.txtFileContent.Text = HttpUtility.HtmlDecode(PhysicalExamination.FileContent);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
////自动生成编码
|
|
||||||
this.txtFileCode.Text = BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(BLL.Const.PhysicalExaminationMenuId, this.ProjectId, this.CurrUser.UnitId);
|
|
||||||
this.drpCompileMan.SelectedValue = this.CurrUser.PersonId;
|
|
||||||
this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
|
||||||
this.txtFileName.Text = this.SimpleForm1.Title;
|
|
||||||
}
|
|
||||||
///初始化审核菜单
|
|
||||||
this.ctlAuditFlow.MenuId = BLL.Const.PhysicalExaminationMenuId;
|
|
||||||
this.ctlAuditFlow.DataId = this.FileId;
|
|
||||||
this.ctlAuditFlow.ProjectId = this.ProjectId;
|
|
||||||
this.ctlAuditFlow.UnitId = this.CurrUser.UnitId;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 提交按钮
|
|
||||||
/// <summary>
|
|
||||||
/// 提交按钮
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="sender"></param>
|
|
||||||
/// <param name="e"></param>
|
|
||||||
protected void btnSubmit_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
if (this.ctlAuditFlow.NextStep == BLL.Const.State_1 && this.ctlAuditFlow.NextPerson == BLL.Const._Null)
|
|
||||||
{
|
|
||||||
ShowNotify("请选择下一步办理人!", MessageBoxIcon.Warning);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.SaveData(BLL.Const.BtnSubmit);
|
|
||||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region 保存
|
|
||||||
/// <summary>
|
|
||||||
/// 保存按钮
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="sender"></param>
|
|
||||||
/// <param name="e"></param>
|
|
||||||
protected void btnSave_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
this.SaveData(BLL.Const.BtnSave);
|
|
||||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 保存数据
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="type"></param>
|
|
||||||
private void SaveData(string type)
|
|
||||||
{
|
|
||||||
Model.OccupationHealth_PhysicalExamination PhysicalExamination = new Model.OccupationHealth_PhysicalExamination
|
|
||||||
{
|
|
||||||
FileCode = this.txtFileCode.Text.Trim(),
|
|
||||||
FileName = this.txtFileName.Text.Trim()
|
|
||||||
};
|
|
||||||
if (this.drpCompileMan.SelectedValue != BLL.Const._Null)
|
|
||||||
{
|
|
||||||
PhysicalExamination.CompileMan = this.drpCompileMan.SelectedValue;
|
|
||||||
}
|
|
||||||
PhysicalExamination.CompileDate = Funs.GetNewDateTime(this.txtCompileDate.Text.Trim());
|
|
||||||
PhysicalExamination.FileContent = HttpUtility.HtmlEncode(this.txtFileContent.Text);
|
|
||||||
////单据状态
|
|
||||||
PhysicalExamination.States = BLL.Const.State_0;
|
|
||||||
if (type == BLL.Const.BtnSubmit)
|
|
||||||
{
|
|
||||||
PhysicalExamination.States = this.ctlAuditFlow.NextStep;
|
|
||||||
}
|
|
||||||
if (!string.IsNullOrEmpty(this.FileId))
|
|
||||||
{
|
|
||||||
PhysicalExamination.FileId = this.FileId;
|
|
||||||
BLL.PhysicalExaminationService.UpdatePhysicalExamination(PhysicalExamination);
|
|
||||||
BLL.LogService.AddSys_Log(this.CurrUser, PhysicalExamination.FileCode, PhysicalExamination.FileId, BLL.Const.PhysicalExaminationMenuId, BLL.Const.BtnModify);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this.FileId = SQLHelper.GetNewID(typeof(Model.OccupationHealth_PhysicalExamination));
|
|
||||||
PhysicalExamination.FileId = this.FileId;
|
|
||||||
PhysicalExamination.ProjectId = this.ProjectId;
|
|
||||||
BLL.PhysicalExaminationService.AddPhysicalExamination(PhysicalExamination);
|
|
||||||
BLL.LogService.AddSys_Log(this.CurrUser, PhysicalExamination.FileCode, PhysicalExamination.FileId, BLL.Const.PhysicalExaminationMenuId, BLL.Const.BtnAdd);
|
|
||||||
}
|
|
||||||
////保存流程审核数据
|
|
||||||
this.ctlAuditFlow.btnSaveData(this.ProjectId, BLL.Const.PhysicalExaminationMenuId, this.FileId, (type == BLL.Const.BtnSubmit ? true : false), this.txtFileName.Text.Trim(), "../OccupationHealth/PhysicalExaminationView.aspx?FileId={0}");
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region 附件上传
|
#region 附件上传
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 上传附件
|
/// 上传附件
|
||||||
|
|
@ -166,11 +70,8 @@ namespace FineUIPro.Web.HSSE.OccupationHealth
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void btnAttachUrl_Click(object sender, EventArgs e)
|
protected void btnAttachUrl_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(this.FileId))
|
string filePath = "FileUpLoad/PersonBaseInfo/" + DateTime.Now.ToString("yyyy-MM") + "/newfile/";
|
||||||
{
|
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=" + filePath + "&menuId={1}&strParam=3", this.PersonId, BLL.Const.PersonListMenuId)));
|
||||||
SaveData(BLL.Const.BtnSave);
|
|
||||||
}
|
|
||||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/PhysicalExaminationAttachUrl&menuId={1}", FileId, BLL.Const.PhysicalExaminationMenuId)));
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,11 +7,13 @@
|
||||||
// </自动生成>
|
// </自动生成>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace FineUIPro.Web.HSSE.OccupationHealth {
|
namespace FineUIPro.Web.HSSE.OccupationHealth
|
||||||
|
{
|
||||||
|
|
||||||
public partial class PhysicalExaminationEdit {
|
|
||||||
|
public partial class PhysicalExaminationEdit
|
||||||
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// form1 控件。
|
/// form1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -20,7 +22,7 @@ namespace FineUIPro.Web.HSSE.OccupationHealth {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// PageManager1 控件。
|
/// PageManager1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -29,7 +31,7 @@ namespace FineUIPro.Web.HSSE.OccupationHealth {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.PageManager PageManager1;
|
protected global::FineUIPro.PageManager PageManager1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// SimpleForm1 控件。
|
/// SimpleForm1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -38,70 +40,43 @@ namespace FineUIPro.Web.HSSE.OccupationHealth {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Form SimpleForm1;
|
protected global::FineUIPro.Form SimpleForm1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// txtFileCode 控件。
|
/// txtProjectName 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// 自动生成的字段。
|
/// 自动生成的字段。
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.TextBox txtFileCode;
|
protected global::FineUIPro.TextBox txtProjectName;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// txtFileName 控件。
|
/// txtUnitName 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// 自动生成的字段。
|
/// 自动生成的字段。
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.TextBox txtFileName;
|
protected global::FineUIPro.TextBox txtUnitName;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// txtFileContent 控件。
|
/// txtCardNo 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// 自动生成的字段。
|
/// 自动生成的字段。
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.HtmlEditor txtFileContent;
|
protected global::FineUIPro.TextBox txtCardNo;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// drpCompileMan 控件。
|
/// txtPersonName 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// 自动生成的字段。
|
/// 自动生成的字段。
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.DropDownList drpCompileMan;
|
protected global::FineUIPro.TextBox txtPersonName;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// txtCompileDate 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.DatePicker txtCompileDate;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// ContentPanel1 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.ContentPanel ContentPanel1;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// ctlAuditFlow 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.Web.Controls.FlowOperateControl ctlAuditFlow;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Toolbar1 控件。
|
/// Toolbar1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -110,7 +85,7 @@ namespace FineUIPro.Web.HSSE.OccupationHealth {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Toolbar Toolbar1;
|
protected global::FineUIPro.Toolbar Toolbar1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// btnAttachUrl 控件。
|
/// btnAttachUrl 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -119,25 +94,7 @@ namespace FineUIPro.Web.HSSE.OccupationHealth {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Button btnAttachUrl;
|
protected global::FineUIPro.Button btnAttachUrl;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// btnSave 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.Button btnSave;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// btnSubmit 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.Button btnSubmit;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// btnClose 控件。
|
/// btnClose 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -146,7 +103,7 @@ namespace FineUIPro.Web.HSSE.OccupationHealth {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Button btnClose;
|
protected global::FineUIPro.Button btnClose;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// WindowAtt 控件。
|
/// WindowAtt 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -319,20 +319,26 @@ namespace FineUIPro.Web
|
||||||
|
|
||||||
}
|
}
|
||||||
this.drpProject.DataValueField = "ProjectId";
|
this.drpProject.DataValueField = "ProjectId";
|
||||||
this.drpProject.DataTextField = "ShortName";
|
this.drpProject.DataTextField = "ShortName";
|
||||||
var projectlist =ProjectService.GetSortIndexProjectByUserIdDropDownList(this.CurrUser.PersonId);
|
var projectlist =ProjectService.GetSortIndexProjectByUserIdDropDownList(this.CurrUser.PersonId);
|
||||||
this.drpProject.DataSource = projectlist;
|
this.drpProject.DataSource = projectlist;
|
||||||
this.drpProject.DataBind();
|
this.drpProject.DataBind();
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(Request.Params["projectId"]))
|
if (!string.IsNullOrEmpty(Request.Params["projectId"]))
|
||||||
{
|
{
|
||||||
Model.Base_Project project = BLL.ProjectService.GetProjectByProjectId(Request.Params["projectId"]);
|
var getp = projectlist.FirstOrDefault(x => x.ProjectId == Request.Params["projectId"]);
|
||||||
if (!projectlist.Contains(project))
|
if (getp == null)
|
||||||
{
|
{
|
||||||
projectlist.Add(project);
|
Model.Base_Project project = BLL.ProjectService.GetProjectByProjectId(Request.Params["projectId"]);
|
||||||
this.drpProject.DataSource = projectlist;
|
if (project != null)
|
||||||
this.drpProject.DataBind();
|
{
|
||||||
|
projectlist.Add(project);
|
||||||
|
this.drpProject.Items.Clear();
|
||||||
|
this.drpProject.DataSource = projectlist;
|
||||||
|
this.drpProject.DataBind();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.drpProject.SelectedValue = Request.Params["projectId"];
|
this.drpProject.SelectedValue = Request.Params["projectId"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue