补充公司级树

This commit is contained in:
夏菊 2025-04-13 20:44:26 +08:00
parent 96899ce306
commit f5344bddfb
34 changed files with 2330 additions and 1350 deletions

View File

@ -1,10 +1,12 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CheckFineList.aspx.cs" Inherits="FineUIPro.Web.CQMS.Check.CheckFineList" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="../../Controls/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
<title>质量罚款单</title>
@ -37,8 +39,9 @@
.Green {
background-color: Green;
color:white;
color: white;
}
.Yellow {
background-color: #FFFF93;
}
@ -50,6 +53,7 @@
.LightGreen {
background-color: LightGreen
}
.f-grid-colheader-text {
white-space: normal;
word-break: break-all;
@ -59,10 +63,21 @@
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<Items>
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
<Items>
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
BodyPadding="0px">
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
</f:ContentPanel>
</Items>
</f:Panel>
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" AutoScroll="true">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" EnableAjax="false" ShowHeader="false" Title="质量罚款单记录" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="CheckFineId" AllowCellEditing="true"
ClicksToEdit="2" DataIDField="CheckFineId" AllowSorting="true" SortField="CheckDate"
@ -87,16 +102,16 @@
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" Label="开始日期" ID="txtStartTime"
LabelAlign="right" >
LabelAlign="right">
</f:DatePicker>
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" Label="结束日期" ID="txtEndTime"
LabelAlign="right" >
LabelAlign="right">
</f:DatePicker>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnQuery" OnClick="btnQuery_Click" ToolTip="查询" Text="查询" Icon="SystemSearch" EnablePostBack="true" runat="server" >
<f:Button ID="btnQuery" OnClick="btnQuery_Click" ToolTip="查询" Text="查询" Icon="SystemSearch" EnablePostBack="true" runat="server">
</f:Button>
<f:Button ID="btnRset" OnClick="btnRset_Click" ToolTip="重置" Text="重置" Icon="ArrowUndo" EnablePostBack="true" runat="server" >
<f:Button ID="btnRset" OnClick="btnRset_Click" ToolTip="重置" Text="重置" Icon="ArrowUndo" EnablePostBack="true" runat="server">
</f:Button>
<f:Button ID="btnNew" ToolTip="新增" Icon="Add" EnablePostBack="false" runat="server" Text="新增"
Hidden="true">
@ -170,6 +185,8 @@
</f:Grid>
</Items>
</f:Panel>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="质量罚款单" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
Width="1000px" Height="450px">

View File

@ -51,30 +51,54 @@ namespace FineUIPro.Web.CQMS.Check
//FilterDataRowItem = FilterDataRowItemImplement;
if (!IsPostBack)
{
//Funs.DropDownPageSize(this.ddlPageSize);
this.ProjectId = this.CurrUser.LoginProjectId;
GetButtonPower();
//if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.ProjectId)
//{
// this.ProjectId = Request.Params["projectId"];
//}
//权限按钮方法
UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpSponsorUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true);
UnitWorkService.InitUnitWorkDownList(drpUnitWork, this.CurrUser.LoginProjectId, true);
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
{
this.ProjectId = Request.Params["projectId"];
}
this.InitDropDownList();
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.ProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
this.GetButtonPower();
}
btnNew.OnClientClick = Window1.GetShowReference("CheckFineListEdit.aspx") + "return false;";
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
// 绑定表格
BindGrid();
}
}
#endregion
private void InitDropDownList()
{
//权限按钮方法
UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpSponsorUnit, this.ProjectId, BLL.Const.ProjectUnitType_2, true);
UnitWorkService.InitUnitWorkDownList(drpUnitWork, this.ProjectId, true);
}
/// <summary>
/// 公司级树加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
this.InitDropDownList();
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
btnNew.Hidden = true;
}
this.GetButtonPower();
this.BindGrid();
}
public Task<DataTable> data()
{
@ -96,23 +120,21 @@ namespace FineUIPro.Web.CQMS.Check
left join sys_User u on u.userId = chec.CheckMan where chec.ProjectId=@ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
strSql += " AND (chec.CheckDate>=@startTime or @startTime='') and (chec.CheckDate<=@endTime or @endTime='') ";
listStr.Add(new SqlParameter("@startTime", !string.IsNullOrEmpty(txtStartTime.Text.Trim()) ? txtStartTime.Text.Trim() + " 00:00:00" : ""));
listStr.Add(new SqlParameter("@endTime", !string.IsNullOrEmpty(txtEndTime.Text.Trim()) ? txtEndTime.Text.Trim() + " 23:59:59" : ""));
if (drpSponsorUnit.SelectedValue != BLL.Const._Null)
if (this.drpSponsorUnit.SelectedValue != null && this.drpSponsorUnit.SelectedValue != BLL.Const._Null)
{
strSql += " AND chec.unitId=@unitId";
listStr.Add(new SqlParameter("@unitId", drpSponsorUnit.SelectedValue));
}
if (drpUnitWork.SelectedValue != Const._Null)
if (this.drpUnitWork.SelectedValue != null && this.drpUnitWork.SelectedValue != Const._Null)
{
strSql += " AND chec.unitworkId=@unitworkId";
listStr.Add(new SqlParameter("@unitworkId", drpUnitWork.SelectedValue));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
return tb;
@ -136,12 +158,13 @@ namespace FineUIPro.Web.CQMS.Check
{
IList<Model.AttachFile> sourlist = AttachFileService.GetBeforeFileList(registrationId.ToString(), BLL.Const.CheckFineListMenuId);
if (sourlist != null&& sourlist.Count>0)
if (sourlist != null && sourlist.Count > 0)
{
string AttachUrl = "";
foreach(var item in sourlist)
{ if(!string.IsNullOrEmpty(item.AttachUrl)&& item.AttachUrl.ToLower().EndsWith(".jpg")|| item.AttachUrl.ToLower().EndsWith(".jpeg")|| item.AttachUrl.ToLower().EndsWith(".png"))
AttachUrl += item.AttachUrl.TrimEnd(',')+",";
foreach (var item in sourlist)
{
if (!string.IsNullOrEmpty(item.AttachUrl) && item.AttachUrl.ToLower().EndsWith(".jpg") || item.AttachUrl.ToLower().EndsWith(".jpeg") || item.AttachUrl.ToLower().EndsWith(".png"))
AttachUrl += item.AttachUrl.TrimEnd(',') + ",";
}
url = BLL.UploadAttachmentService.ShowImage("../../", AttachUrl.TrimEnd(','));
}
@ -153,7 +176,7 @@ namespace FineUIPro.Web.CQMS.Check
string url = string.Empty;
if (registrationId != null)
{
IList<Model.AttachFile> sourlist = AttachFileService.Getfilelist(registrationId.ToString()+"r", BLL.Const.CheckListMenuId);
IList<Model.AttachFile> sourlist = AttachFileService.Getfilelist(registrationId.ToString() + "r", BLL.Const.CheckListMenuId);
if (sourlist != null && sourlist.Count > 0)
{
@ -178,6 +201,10 @@ namespace FineUIPro.Web.CQMS.Check
public void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
DataTable tb = ChecklistData();
// 2.获取当前分页数据
@ -992,7 +1019,7 @@ namespace FineUIPro.Web.CQMS.Check
}
IList<Model.AttachFile> reSourlist = AttachFileService.GetBeforeFileList(checks.CheckControlCode+"r", BLL.Const.CheckListMenuId);
IList<Model.AttachFile> reSourlist = AttachFileService.GetBeforeFileList(checks.CheckControlCode + "r", BLL.Const.CheckListMenuId);
if (reSourlist != null && reSourlist.Count > 0)
{

View File

@ -41,6 +41,42 @@ namespace FineUIPro.Web.CQMS.Check
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// panelLeftRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion;
/// <summary>
/// ContentPanel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel ContentPanel1;
/// <summary>
/// ucTree 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
/// <summary>
/// panelCenterRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelCenterRegion;
/// <summary>
/// Grid1 控件。
/// </summary>

View File

@ -65,9 +65,13 @@ namespace FineUIPro.Web.CQMS.Check
//FilterDataRowItem = FilterDataRowItemImplement;
if (!IsPostBack)
{
this.ProjectId = this.CurrUser.LoginProjectId;
this.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
{
this.ProjectId = Request.Params["projectId"];
}
this.InitDownList();
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
@ -77,27 +81,15 @@ namespace FineUIPro.Web.CQMS.Check
////权限按钮方法
this.GetButtonPower();
}
//if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.ProjectId)
//{
// this.ProjectId = Request.Params["projectId"];
//}
//权限按钮方法
btnNew.OnClientClick = Window1.GetShowReference("ChecklistEdit.aspx") + "return false;";
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
GetList();
// 绑定表格
BindGrid();
}
}
private void GetList()
private void InitDownList()
{
if (!string .IsNullOrEmpty(this.ProjectId))
if (!string.IsNullOrEmpty(this.ProjectId))
{
code = ProjectService.GetProjectByProjectId(this.ProjectId).ProjectCode + "-QC-TCC-XJ-";
}
@ -107,6 +99,24 @@ namespace FineUIPro.Web.CQMS.Check
QualityQuestionTypeService.InitQualityQuestionTypeDownList(drpQuestionType, true);
Funs.FineUIPleaseSelect(this.dpHandelStatus);
}
/// <summary>
/// 公司级树加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
this.InitDownList();
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
btnNew.Hidden = true;
}
this.GetButtonPower();
this.BindGrid();
}
#endregion
//public System.Web.UI.WebControls.ListItem[] GetHandelStatus()
//{
@ -145,7 +155,7 @@ namespace FineUIPro.Web.CQMS.Check
}
protected DataTable ChecklistData()
{
DataTable tb=new DataTable();
DataTable tb = new DataTable();
if (!string.IsNullOrEmpty(this.ProjectId))
{
string strSql = @"SELECT chec.CheckControlCode,chec.CheckSite,chec.ProjectId,chec.unitId,cNProfessional.ProfessionalName,"
@ -306,12 +316,13 @@ namespace FineUIPro.Web.CQMS.Check
{
IList<Model.AttachFile> sourlist = AttachFileService.GetBeforeFileList(registrationId.ToString(), BLL.Const.CheckListMenuId);
if (sourlist != null&& sourlist.Count>0)
if (sourlist != null && sourlist.Count > 0)
{
string AttachUrl = "";
foreach(var item in sourlist)
{ if(!string.IsNullOrEmpty(item.AttachUrl)&& item.AttachUrl.ToLower().EndsWith(".jpg")|| item.AttachUrl.ToLower().EndsWith(".jpeg")|| item.AttachUrl.ToLower().EndsWith(".png"))
AttachUrl += item.AttachUrl.TrimEnd(',')+",";
foreach (var item in sourlist)
{
if (!string.IsNullOrEmpty(item.AttachUrl) && item.AttachUrl.ToLower().EndsWith(".jpg") || item.AttachUrl.ToLower().EndsWith(".jpeg") || item.AttachUrl.ToLower().EndsWith(".png"))
AttachUrl += item.AttachUrl.TrimEnd(',') + ",";
}
url = BLL.UploadAttachmentService.ShowImage(httpUrl, AttachUrl.TrimEnd(','));
}
@ -329,7 +340,7 @@ namespace FineUIPro.Web.CQMS.Check
}
if (registrationId != null)
{
IList<Model.AttachFile> sourlist = AttachFileService.Getfilelist(registrationId.ToString()+"r", BLL.Const.CheckListMenuId);
IList<Model.AttachFile> sourlist = AttachFileService.Getfilelist(registrationId.ToString() + "r", BLL.Const.CheckListMenuId);
if (sourlist != null && sourlist.Count > 0)
{
@ -376,6 +387,10 @@ namespace FineUIPro.Web.CQMS.Check
public void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
DataTable tb = ChecklistData();
// 2.获取当前分页数据
@ -414,19 +429,6 @@ namespace FineUIPro.Web.CQMS.Check
}
}
}
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
GetList();
this.BindGrid();
this.GetButtonPower();
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
btnNew.Hidden = true;
}
}
#region
@ -918,9 +920,10 @@ namespace FineUIPro.Web.CQMS.Check
}
}
string []pics = AttachUrl.Split(',');
foreach(string item in pics)
{ switch (indexPic)
string[] pics = AttachUrl.Split(',');
foreach (string item in pics)
{
switch (indexPic)
{
case 1:
{
@ -1367,7 +1370,7 @@ namespace FineUIPro.Web.CQMS.Check
}
IList<Model.AttachFile> reSourlist = AttachFileService.GetBeforeFileList(checks.CheckControlCode+"r", BLL.Const.CheckListMenuId);
IList<Model.AttachFile> reSourlist = AttachFileService.GetBeforeFileList(checks.CheckControlCode + "r", BLL.Const.CheckListMenuId);
if (reSourlist != null && reSourlist.Count > 0)
{

View File

@ -1,10 +1,12 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="JointCheck.aspx.cs" Inherits="FineUIPro.Web.CQMS.Check.JointCheck" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="../../Controls/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
<title>质量共检</title>
@ -39,8 +41,20 @@
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<Items>
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
<Items>
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
BodyPadding="0px">
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
</f:ContentPanel>
</Items>
</f:Panel>
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" AutoScroll="true">
<Items>
<f:Grid ID="GvJoinCheck" ShowBorder="true" ShowHeader="false" Title="质量共检" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="JointCheckId" AllowCellEditing="true"
@ -70,7 +84,7 @@
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnQuery" OnClick="btnQuery_Click" ToolTip="查询" Icon="SystemSearch" EnablePostBack="true" runat="server" Text="查询">
</f:Button>
<f:Button ID="btnRset" OnClick="btnRset_Click" ToolTip="重置" Icon="ArrowUndo" EnablePostBack="true" runat="server" Text="重置" >
<f:Button ID="btnRset" OnClick="btnRset_Click" ToolTip="重置" Icon="ArrowUndo" EnablePostBack="true" runat="server" Text="重置">
</f:Button>
<f:Button ID="btnNew" ToolTip="新增" Icon="Add" EnablePostBack="false" runat="server" Text="新增"
Hidden="true">
@ -92,7 +106,7 @@
</f:RenderField>
<f:RenderField Width="230px" ColumnID="UnitName" DataField="UnitName"
SortField="UnitName" FieldType="String" HeaderText="受检施工单位" TextAlign="Center"
HeaderTextAlign="Center" >
HeaderTextAlign="Center">
</f:RenderField>
<f:TemplateField ColumnID="CheckType" Width="100px" HeaderText="检查类别" HeaderTextAlign="Center" TextAlign="Center"
EnableLock="true" Locked="False">
@ -120,7 +134,7 @@
</ItemTemplate>
</f:TemplateField>
<f:TemplateField ColumnID="JointCheckId" HeaderText="办理人" HeaderTextAlign="Center" TextAlign="Center"
EnableLock="true" Locked="False" >
EnableLock="true" Locked="False">
<ItemTemplate>
<asp:Label ID="Label3" runat="server" Text='<%# ConvertMan(Eval("JointCheckId")) %>'></asp:Label>
</ItemTemplate>
@ -149,6 +163,8 @@
</f:Grid>
</Items>
</f:Panel>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="质量共检" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
Width="1300px" Height="660px">

View File

@ -4,10 +4,6 @@ using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Windows.Forms;
namespace FineUIPro.Web.CQMS.Check
{
@ -62,21 +58,50 @@ namespace FineUIPro.Web.CQMS.Check
{
if (!IsPostBack)
{
ProjectId = CurrUser.LoginProjectId;
GetButtonPower();
this.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
{
this.ProjectId = Request.Params["projectId"];
}
this.InitDropDownList();
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.ProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
this.GetButtonPower();
}
btnNew.OnClientClick = Window1.GetShowReference("EditJointCheck.aspx") + "return false;";
//if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.ProjectId)
//{
// this.ProjectId = Request.Params["projectId"];
//}
//权限按钮方法
UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpSponsorUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true);
JointCheckService.Init(drpCheckType, true);
JointCheckService.InitState(drpState, true);
bindata();
BindGrid();
}
}
private void InitDropDownList()
{
UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpSponsorUnit, this.ProjectId, BLL.Const.ProjectUnitType_2, true);
}
/// <summary>
/// 公司级树加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
this.InitDropDownList();
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
btnNew.Hidden = true;
}
this.GetButtonPower();
this.BindGrid();
}
//<summary>
//获取办理人姓名
//</summary>
@ -192,9 +217,12 @@ namespace FineUIPro.Web.CQMS.Check
/// <summary>
/// 列表数据
/// </summary>
private void bindata()
private void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @"SELECT chec.JointCheckId,chec.JointCheckCode,chec.State,chec.CheckDate,chec.CheckName,chec.unitId,"
+ @" unit.UnitName,u.userName as CheckMan,chec.CheckType "
+ @" FROM Check_JointCheck chec"
@ -202,7 +230,7 @@ namespace FineUIPro.Web.CQMS.Check
+ @" left join sys_User u on u.userId = chec.CheckMan"
+ @" where chec.ProjectId=@ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
strSql += " AND (chec.CheckDate>=@startTime or @startTime='') and (chec.CheckDate<=@endTime or @endTime='') ";
listStr.Add(new SqlParameter("@startTime", !string.IsNullOrEmpty(txtStartTime.Text.Trim()) ? txtStartTime.Text.Trim() + " 00:00:00" : ""));
listStr.Add(new SqlParameter("@endTime", !string.IsNullOrEmpty(txtEndTime.Text.Trim()) ? txtEndTime.Text.Trim() + " 23:59:59" : ""));
@ -265,13 +293,13 @@ namespace FineUIPro.Web.CQMS.Check
protected void btnQuery_Click(object sender, EventArgs e)
{
bindata();
BindGrid();
}
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
GvJoinCheck.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
bindata();
BindGrid();
}
protected void GvJoinCheck_RowDoubleClick(object sender, GridRowClickEventArgs e)
@ -283,7 +311,7 @@ namespace FineUIPro.Web.CQMS.Check
protected void GvJoinCheck_PageIndexChange(object sender, GridPageEventArgs e)
{
bindata();
BindGrid();
}
protected void GvJoinCheck_FilterChange(object sender, EventArgs e)
@ -298,7 +326,7 @@ namespace FineUIPro.Web.CQMS.Check
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
bindata();
BindGrid();
}
protected void btnMenuModify_Click(object sender, EventArgs e)
@ -330,7 +358,7 @@ namespace FineUIPro.Web.CQMS.Check
JointCheckService.DeleteJointCheck(jointCheckId);
LogService.AddSys_Log(CurrUser, "001", jointCheckId, Const.JointCheckMenuId, "删除质量共检记录");
Alert.ShowInTop("删除成功!", MessageBoxIcon.Warning);
bindata();
BindGrid();
}
@ -399,7 +427,7 @@ namespace FineUIPro.Web.CQMS.Check
drpState.SelectedIndex = 0;
txtStartTime.Text = "";
txtEndTime.Text = "";
bindata();
BindGrid();
}
}
}

View File

@ -7,10 +7,12 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.CQMS.Check {
namespace FineUIPro.Web.CQMS.Check
{
public partial class JointCheck {
public partial class JointCheck
{
/// <summary>
/// form1 控件。
@ -39,6 +41,42 @@ namespace FineUIPro.Web.CQMS.Check {
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// panelLeftRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion;
/// <summary>
/// ContentPanel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel ContentPanel1;
/// <summary>
/// ucTree 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
/// <summary>
/// panelCenterRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelCenterRegion;
/// <summary>
/// GvJoinCheck 控件。
/// </summary>

View File

@ -38,16 +38,21 @@ namespace FineUIPro.Web.CQMS.Check
{
this.ProjectId = Request.Params["projectId"];
}
this.InitUnitDownList();
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
this.panelLeftRegion.Hidden = true;
// this.Grid1.Columns[0].Hidden = true;
////权限按钮方法
this.GetList();
}
QualityQuestionTypeService.InitQualityQuestionTypeDownList(drpQuestionType, true);
Funs.FineUIPleaseSelect(drpQuestionType);
this.drpCheckType.DataTextField = "Text";
this.drpCheckType.DataValueField = "Value";
this.drpCheckType.DataSource = BLL.JointCheckService.GetCheckTypeList2();
this.drpCheckType.DataBind();
Funs.FineUIPleaseSelect(drpState);
BindGrid();
}
@ -56,28 +61,24 @@ namespace FineUIPro.Web.CQMS.Check
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
this.GetList();
this.InitUnitDownList();
this.BindGrid();
}
private void GetList()
private void InitUnitDownList()
{
QualityQuestionTypeService.InitQualityQuestionTypeDownList(drpQuestionType, true);
UnitService.InitUnitDropDownList(drpSponsorUnit, this.ProjectId, true);//施工单位
UnitWorkService.InitUnitWorkDownList(drpUnitWork, this.ProjectId, true);//单位工程
CNProfessionalService.InitCNProfessionalDownList(drpCNProfessional, true);//专业
this.drpCheckType.DataTextField = "Text";
this.drpCheckType.DataValueField = "Value";
this.drpCheckType.DataSource = BLL.JointCheckService.GetCheckTypeList2();
this.drpCheckType.DataBind();
Funs.FineUIPleaseSelect(drpState);
Funs.FineUIPleaseSelect(drpQuestionType);
}
public void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
if (!string.IsNullOrEmpty(this.ProjectId))
{
string strSql = @"select * from View_Check_JointCheckDetail where 1=1";

View File

@ -41,6 +41,7 @@ namespace FineUIPro.Web.CQMS.Check {
{
this.ProjectId = Request.Params["projectId"];
}
this.GetButtonPower();
this.txtEndTime.Text = DateTime.Now.ToString("yyyy-MM-dd");
this.txtStartTime.Text = DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd");
this.ucTree.UnitId = this.CurrUser.UnitId;
@ -49,8 +50,6 @@ namespace FineUIPro.Web.CQMS.Check {
{
this.panelLeftRegion.Hidden = true;
// this.Grid1.Columns[0].Hidden = true;
////权限按钮方法
this.GetButtonPower();
}
BindGrid();
}
@ -59,8 +58,8 @@ namespace FineUIPro.Web.CQMS.Check {
{
this.ProjectId = this.ucTree.ProjectId;
this.BindGrid();
this.GetButtonPower();
this.BindGrid();
}
private void GetButtonPower()
{

View File

@ -1,10 +1,12 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RewardAndPunish.aspx.cs" Inherits="FineUIPro.Web.CQMS.Check.RewardAndPunish" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="../../Controls/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
<title>奖罚通知单(定稿)</title>
@ -13,10 +15,21 @@
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<Items>
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
<Items>
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
BodyPadding="0px">
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
</f:ContentPanel>
</Items>
</f:Panel>
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" AutoScroll="true">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" EnableAjax="false" ShowHeader="false" Title="奖罚通知单(定稿)" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="RewardAndPunishID" AllowCellEditing="true"
ClicksToEdit="2" DataIDField="RewardAndPunishID" AllowSorting="true" SortField="Date"
@ -85,7 +98,7 @@
<asp:Label ID="lbCreateMan" runat="server" Text='<%# ConvertMan(Eval("CreateMan")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left" >
<f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left">
<ItemTemplate>
<asp:LinkButton ID="lbtnFileUrl" runat="server" CssClass="ItemLink"
Text='<%# BLL.AttachFileService.GetBtnFileUrl(Eval("RewardAndPunishID")) %>' ToolTip="附件查看"></asp:LinkButton>
@ -115,6 +128,8 @@
</f:Grid>
</Items>
</f:Panel>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="奖罚通知单(定稿)" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
Width="700px" Height="360px">

View File

@ -11,7 +11,23 @@ using System.Web.UI.WebControls;
namespace FineUIPro.Web.CQMS.Check
{
public partial class RewardAndPunish : PageBase
{/// <summary>
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
/// <summary>
/// 项目id
/// </summary>
public string RewardAndPunishID
@ -25,17 +41,48 @@ namespace FineUIPro.Web.CQMS.Check
ViewState["RewardAndPunishID"] = value;
}
}
#endregion
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
GetButtonPower();
this.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
{
this.ProjectId = Request.Params["projectId"];
}
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.ProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
this.GetButtonPower();
}
btnNew.OnClientClick = Window1.GetShowReference("RewardAndPunishEdit.aspx") + "return false;";
// 绑定表格
BindGrid();
}
}
/// <summary>
/// 公司级树加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
btnNew.Hidden = true;
}
this.GetButtonPower();
this.BindGrid();
}
/// <summary>
/// 绑定数据
@ -43,6 +90,10 @@ namespace FineUIPro.Web.CQMS.Check
public void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
DataTable tb = ChecklistData();
// 2.获取当前分页数据
@ -72,7 +123,7 @@ namespace FineUIPro.Web.CQMS.Check
where ProjectId=@ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
if (drpType.SelectedValue != Const._Null)
{
@ -226,7 +277,7 @@ namespace FineUIPro.Web.CQMS.Check
{
return;
}
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.RewardAndPunishMenuId);
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.RewardAndPunishMenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(BLL.Const.BtnAdd))

View File

@ -41,6 +41,42 @@ namespace FineUIPro.Web.CQMS.Check
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// panelLeftRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion;
/// <summary>
/// ContentPanel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel ContentPanel1;
/// <summary>
/// ucTree 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
/// <summary>
/// panelCenterRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelCenterRegion;
/// <summary>
/// Grid1 控件。
/// </summary>

View File

@ -1,10 +1,12 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SpecialCheckList.aspx.cs" Inherits="FineUIPro.Web.CQMS.Check.SpecialCheckList" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="../../Controls/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
<title>专项检查</title>
@ -37,8 +39,9 @@
.Green {
background-color: Green;
color:white;
color: white;
}
.Yellow {
background-color: #FFFF93;
}
@ -50,6 +53,7 @@
.LightGreen {
background-color: LightGreen
}
.f-grid-colheader-text {
white-space: normal;
word-break: break-all;
@ -59,10 +63,21 @@
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<Items>
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
<Items>
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
BodyPadding="0px">
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
</f:ContentPanel>
</Items>
</f:Panel>
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" AutoScroll="true">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" EnableAjax="false" ShowHeader="false" Title="专项巡检记录" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="CheckSpecialId" AllowCellEditing="true"
ClicksToEdit="2" DataIDField="CheckSpecialId" AllowSorting="true" SortField="CheckTime"
@ -89,14 +104,14 @@
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" Label="开始日期" ID="txtStartTime"
LabelAlign="right" >
LabelAlign="right">
</f:DatePicker>
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" Label="结束日期" ID="txtEndTime"
LabelAlign="right" >
LabelAlign="right">
</f:DatePicker>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnQuery" OnClick="btnQuery_Click" ToolTip="查询" Text="查询" Icon="SystemSearch" EnablePostBack="true" runat="server" >
<f:Button ID="btnQuery" OnClick="btnQuery_Click" ToolTip="查询" Text="查询" Icon="SystemSearch" EnablePostBack="true" runat="server">
</f:Button>
@ -209,6 +224,8 @@
</f:Grid>
</Items>
</f:Panel>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="专项巡检详情" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
Width="1300px" Height="660px">

View File

@ -58,35 +58,64 @@ namespace FineUIPro.Web.CQMS.Check
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
// 表头过滤
//FilterDataRowItem = FilterDataRowItemImplement;
if (!IsPostBack)
{
code = ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId).ProjectCode + "-QC-TCC-XJ-";
Funs.DropDownPageSize(this.ddlPageSize);
this.ProjectId = this.CurrUser.LoginProjectId;
GetButtonPower();
//if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.ProjectId)
//{
// this.ProjectId = Request.Params["projectId"];
//}
//权限按钮方法
UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpSponsorUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true);
UnitWorkService.InitUnitWorkDownList(drpUnitWork, this.CurrUser.LoginProjectId, true);
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
{
this.ProjectId = Request.Params["projectId"];
}
this.InitDropDownList();
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.ProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
this.GetButtonPower();
}
CNProfessionalService.InitCNProfessionalDownList(drpCNProfessional, true);
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
// 绑定表格
BindGrid();
}
}
private void InitDropDownList()
{
if (!string.IsNullOrWhiteSpace(this.ProjectId))
{
code = ProjectService.GetProjectByProjectId(this.ProjectId).ProjectCode + "-QC-TCC-XJ-";
}
UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpSponsorUnit, this.ProjectId, BLL.Const.ProjectUnitType_2, true);
UnitWorkService.InitUnitWorkDownList(drpUnitWork, this.ProjectId, true);
}
/// <summary>
/// 公司级树加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
this.InitDropDownList();
//if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
//{
// btnNew.Hidden = true;
//}
this.GetButtonPower();
this.BindGrid();
}
#endregion
//public System.Web.UI.WebControls.ListItem[] GetHandelStatus()
//{
@ -129,7 +158,7 @@ namespace FineUIPro.Web.CQMS.Check
where chec.ProjectId=@ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
strSql += " AND (chec.CheckTime>=@startTime or @startTime='') and (chec.CheckTime<=@endTime or @endTime='') ";
listStr.Add(new SqlParameter("@startTime", !string.IsNullOrEmpty(txtStartTime.Text.Trim()) ? txtStartTime.Text.Trim() + " 00:00:00" : ""));
listStr.Add(new SqlParameter("@endTime", !string.IsNullOrEmpty(txtEndTime.Text.Trim()) ? txtEndTime.Text.Trim() + " 23:59:59" : ""));
@ -211,12 +240,13 @@ namespace FineUIPro.Web.CQMS.Check
{
IList<Model.AttachFile> sourlist = AttachFileService.GetBeforeFileList(registrationId.ToString(), BLL.Const.CheckListMenuId);
if (sourlist != null&& sourlist.Count>0)
if (sourlist != null && sourlist.Count > 0)
{
string AttachUrl = "";
foreach(var item in sourlist)
{ if(!string.IsNullOrEmpty(item.AttachUrl)&& item.AttachUrl.ToLower().EndsWith(".jpg")|| item.AttachUrl.ToLower().EndsWith(".jpeg")|| item.AttachUrl.ToLower().EndsWith(".png"))
AttachUrl += item.AttachUrl.TrimEnd(',')+",";
foreach (var item in sourlist)
{
if (!string.IsNullOrEmpty(item.AttachUrl) && item.AttachUrl.ToLower().EndsWith(".jpg") || item.AttachUrl.ToLower().EndsWith(".jpeg") || item.AttachUrl.ToLower().EndsWith(".png"))
AttachUrl += item.AttachUrl.TrimEnd(',') + ",";
}
url = BLL.UploadAttachmentService.ShowImage("../../", AttachUrl.TrimEnd(','));
}
@ -228,7 +258,7 @@ namespace FineUIPro.Web.CQMS.Check
string url = string.Empty;
if (registrationId != null)
{
IList<Model.AttachFile> sourlist = AttachFileService.Getfilelist(registrationId.ToString()+"r", BLL.Const.CheckListMenuId);
IList<Model.AttachFile> sourlist = AttachFileService.Getfilelist(registrationId.ToString() + "r", BLL.Const.CheckListMenuId);
if (sourlist != null && sourlist.Count > 0)
{
@ -275,6 +305,10 @@ namespace FineUIPro.Web.CQMS.Check
public void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
DataTable tb = ChecklistData();
// 2.获取当前分页数据
@ -286,9 +320,6 @@ namespace FineUIPro.Web.CQMS.Check
Grid1.DataSource = table;
Grid1.DataBind();
}
@ -391,7 +422,8 @@ namespace FineUIPro.Web.CQMS.Check
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SpecialCheckListView.aspx?CheckSpecialId={0}", codes, "查看 - ")));
return;
}
else {
else
{
Alert.ShowInTop("未查询到详情数据,请与管理员联系!", MessageBoxIcon.Warning);
return;
}
@ -468,7 +500,7 @@ namespace FineUIPro.Web.CQMS.Check
}
string codes = Grid1.SelectedRowID.Split(',')[0];
//var checks = BLL.CheckControlService.GetCheckControl(codes);
var spec= Funs.DB.Check_CheckSpecialDataIn.FirstOrDefault(x => x.CheckSpecialId == codes);
var spec = Funs.DB.Check_CheckSpecialDataIn.FirstOrDefault(x => x.CheckSpecialId == codes);
Funs.DB.Check_CheckSpecialDataIn.DeleteOnSubmit(spec);
Funs.DB.SubmitChanges();
//BLL.CheckControlApproveService.DeleteCheckControlApprovesByCheckControlCode(codes);
@ -786,9 +818,10 @@ namespace FineUIPro.Web.CQMS.Check
}
}
string []pics = AttachUrl.Split(',');
foreach(string item in pics)
{ switch (indexPic)
string[] pics = AttachUrl.Split(',');
foreach (string item in pics)
{
switch (indexPic)
{
case 1:
{
@ -1234,7 +1267,7 @@ namespace FineUIPro.Web.CQMS.Check
}
IList<Model.AttachFile> reSourlist = AttachFileService.GetBeforeFileList(checks.CheckControlCode+"r", BLL.Const.CheckListMenuId);
IList<Model.AttachFile> reSourlist = AttachFileService.GetBeforeFileList(checks.CheckControlCode + "r", BLL.Const.CheckListMenuId);
if (reSourlist != null && reSourlist.Count > 0)
{

View File

@ -41,6 +41,42 @@ namespace FineUIPro.Web.CQMS.Check
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// panelLeftRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion;
/// <summary>
/// ContentPanel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel ContentPanel1;
/// <summary>
/// ucTree 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
/// <summary>
/// panelCenterRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelCenterRegion;
/// <summary>
/// Grid1 控件。
/// </summary>

View File

@ -1,5 +1,7 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MajorPlanApproval.aspx.cs" Inherits="FineUIPro.Web.Comprehensive.MajorPlanApproval" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
@ -9,9 +11,21 @@
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="Panel1" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<Items>
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
<Items>
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
BodyPadding="0px">
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
</f:ContentPanel>
</Items>
</f:Panel>
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" AutoScroll="true">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="超过一定规模的危大施工方案" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="MajorPlanApprovalId" AllowCellEditing="true" EnableColumnLines="true"
@ -75,7 +89,7 @@
<f:RenderField ColumnID="ImplementationDeviation" DataField="ImplementationDeviation" FieldType="String" HeaderText="施工总结" TextAlign="Center"
HeaderTextAlign="Center" Width="220px">
</f:RenderField>
<f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left" >
<f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left">
<ItemTemplate>
<asp:LinkButton ID="lbtnFileUrl" runat="server" CssClass="ItemLink"
Text='<%# BLL.AttachFileService.GetBtnFileUrl(Eval("MajorPlanApprovalId")) %>' ToolTip="附件查看"></asp:LinkButton>
@ -99,6 +113,8 @@
</f:Grid>
</Items>
</f:Panel>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="超过一定规模的危大施工方案" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
Width="900px" Height="460px">

View File

@ -1,4 +1,5 @@
using BLL;
using FineUIPro.Web.DataShow;
using System;
using System.Collections.Generic;
using System.Data;
@ -9,6 +10,22 @@ namespace FineUIPro.Web.Comprehensive
{
public partial class MajorPlanApproval : PageBase
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
@ -19,18 +36,59 @@ namespace FineUIPro.Web.Comprehensive
{
if (!IsPostBack)
{
GetButtonPower();
BLL.UnitService.InitUnitDownList(this.sdrpUnitId, this.CurrUser.LoginProjectId, true);
this.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
{
this.ProjectId = Request.Params["projectId"];
}
this.InitDropDownList();
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.ProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
this.GetButtonPower();
}
BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNPr, true);
BindGrid();
}
}
private void InitDropDownList()
{
BLL.UnitService.InitUnitDownList(this.sdrpUnitId, this.ProjectId, true);
}
/// <summary>
/// 公司级树加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
this.InitDropDownList();
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
btnNew.Hidden = true;
}
this.GetButtonPower();
this.BindGrid();
}
/// <summary>
/// 数据绑定
/// </summary>
public void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @"select MajorPlanApprovalId, ProjectId, PlanCode, PlanName, ReviewMan, ApprovalDate,
AuditMan, ApprovalMan, ImplementationDeviation, AttachUrl, CompileMan, CompileDate,
UnitWorkId,CN.ProfessionalName,C.CNProfessionalId,C.UnitId,u.UnitName
@ -39,7 +97,7 @@ namespace FineUIPro.Web.Comprehensive
left join Base_Unit as u on u.UnitId = C.UnitId
where C.ProjectId = @ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
if (sdrpUnitId.SelectedValue != BLL.Const._Null)
{
strSql += " AND C.UnitId=@UnitId";
@ -232,7 +290,7 @@ namespace FineUIPro.Web.Comprehensive
{
return;
}
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.MajorPlanApprovalMenuId);
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.MajorPlanApprovalMenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(BLL.Const.BtnAdd))

View File

@ -7,10 +7,12 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.Comprehensive {
namespace FineUIPro.Web.Comprehensive
{
public partial class MajorPlanApproval {
public partial class MajorPlanApproval
{
/// <summary>
/// form1 控件。
@ -39,6 +41,42 @@ namespace FineUIPro.Web.Comprehensive {
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// panelLeftRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion;
/// <summary>
/// ContentPanel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel ContentPanel1;
/// <summary>
/// ucTree 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
/// <summary>
/// panelCenterRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelCenterRegion;
/// <summary>
/// Grid1 控件。
/// </summary>

View File

@ -1,5 +1,7 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QuarterlyProjectQuality.aspx.cs" Inherits="FineUIPro.Web.CQMS.ManageReport.QuarterlyProjectQuality" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
@ -11,8 +13,20 @@
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<Items>
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
<Items>
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
BodyPadding="0px">
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
</f:ContentPanel>
</Items>
</f:Panel>
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" AutoScroll="true">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="季度工程项目质量信息表" EnableCollapse="true"
runat="server" BoxFlex="1" EnableColumnLines="true" DataKeyNames="QuarterlyProjectQualityId"
@ -76,6 +90,8 @@
</f:Grid>
</Items>
</f:Panel>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="季度工程项目质量信息表" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="1100px" Height="560px">
</f:Window>

View File

@ -42,8 +42,15 @@ namespace FineUIPro.Web.CQMS.ManageReport
{
this.ProjectId = Request.Params["projectId"];
}
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.ProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
this.GetButtonPower();
}
BLL.ConstValue.InitConstValueDropDownList(this.drpYear, BLL.ConstValue.Group_0008, true);
BLL.ConstValue.InitConstValueDropDownList(this.drpQuarters, BLL.ConstValue.Group_0011, true);
@ -58,10 +65,30 @@ namespace FineUIPro.Web.CQMS.ManageReport
}
}
/// <summary>
/// 公司级树加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
btnNew.Hidden = true;
}
this.GetButtonPower();
this.BindGrid();
}
/// <summary>
/// 绑定数据
/// </summary>
private void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @"SELECT QuarterlyProjectQuality.QuarterlyProjectQualityId, "
+ @"QuarterlyProjectQuality.ProjectId,"
+ @"QuarterlyProjectQuality.UnitId,"

View File

@ -7,10 +7,12 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.CQMS.ManageReport {
namespace FineUIPro.Web.CQMS.ManageReport
{
public partial class QuarterlyProjectQuality {
public partial class QuarterlyProjectQuality
{
/// <summary>
/// form1 控件。
@ -39,6 +41,42 @@ namespace FineUIPro.Web.CQMS.ManageReport {
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// panelLeftRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion;
/// <summary>
/// ContentPanel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel ContentPanel1;
/// <summary>
/// ucTree 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
/// <summary>
/// panelCenterRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelCenterRegion;
/// <summary>
/// Grid1 控件。
/// </summary>

View File

@ -1,10 +1,12 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ConstructSolution.aspx.cs" Inherits="FineUIPro.Web.CQMS.Solution.ConstructSolution" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>施工组织设计及施工方案</title>
<style type="text/css">
@ -21,6 +23,7 @@
color: Red;
font-size: small;
}
.red {
background-color: red;
}
@ -56,10 +59,21 @@
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<Items>
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
<Items>
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
BodyPadding="0px">
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
</f:ContentPanel>
</Items>
</f:Panel>
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" AutoScroll="true">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" EnableAjax="false" ShowHeader="false" Title="施工方案" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="ConstructSolutionId" AllowCellEditing="true"
OnRowDataBound="Grid1_RowDataBound"
@ -87,10 +101,10 @@
</f:Toolbar>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DropDownList ID="drpState" runat="server" Label="审批状态" LabelAlign="Right" EnableEdit="true" >
<f:DropDownList ID="drpState" runat="server" Label="审批状态" LabelAlign="Right" EnableEdit="true">
<f:ListItem Text="全部" Value="null" />
<f:ListItem Text="已闭合" Value="1" />
<f:ListItem Text="未闭合" Value="0" Selected="true"/>
<f:ListItem Text="未闭合" Value="0" Selected="true" />
</f:DropDownList>
<f:ToolbarFill runat="server"></f:ToolbarFill>
@ -203,6 +217,8 @@
</f:Grid>
</Items>
</f:Panel>
</Items>
</f:Panel>
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
Height="500px">

View File

@ -15,52 +15,43 @@ namespace FineUIPro.Web.CQMS.Solution
{
public partial class ConstructSolution : PageBase
{
#region
#region
/// <summary>
/// 获取按钮权限
/// 项目主键
/// </summary>
/// <param name="button"></param>
/// <returns></returns>
private void GetButtonPower()
public string ProjectId
{
if (Request.Params["value"] == "0")
get
{
return;
return (string)ViewState["ProjectId"];
}
var buttonList = CommonService.GetAllButtonList(CurrUser.LoginProjectId, CurrUser.UserId, Const.CQMSConstructSolutionMenuId);
if (buttonList.Count() > 0)
set
{
if (buttonList.Contains(Const.BtnAdd))
{
btnNew.Hidden = false;
}
if (buttonList.Contains(Const.BtnModify) || buttonList.Contains(Const.BtnSubmit))
{
btnMenuModify.Hidden = false;
}
if (buttonList.Contains(Const.BtnDelete))
{
btnMenuDel.Hidden = false;
}
ViewState["ProjectId"] = value;
}
}
#endregion
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
GetButtonPower();
BLL.SolutionTempleteTypeService.InitSolutionTempleteDropDownList(drpSolutionType, true);
//Funs.FineUIPleaseSelect(drpState);
UnitWorkService.InitUnitWorkDownList(drpUnitWork, this.CurrUser.LoginProjectId, true);
CNProfessionalService.InitCNProfessionalDownList(drpCNProfessional, true);
UnitService.InitMainAndSubUnitDropDownList(drpProposeUnit, CurrUser.LoginProjectId, false);
btnNew.OnClientClick = window_tt.GetShowReference("EditConstructSolution.aspx") + "return false;";
if (this.CurrUser.UnitId != null && CommonService.GetProjectUnitType(this.CurrUser.LoginProjectId, this.CurrUser.UnitId) != BLL.Const.ProjectUnitType_1 && this.CurrUser.UnitId != Const.hfnbdId)
this.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
{
this.drpProposeUnit.Hidden = true;
this.ProjectId = Request.Params["projectId"];
}
this.InitDropDownList();
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.ProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
this.GetButtonPower();
}
CNProfessionalService.InitCNProfessionalDownList(drpCNProfessional, true);
btnNew.OnClientClick = window_tt.GetShowReference("EditConstructSolution.aspx") + "return false;";
BindGrid();
}
else
@ -93,6 +84,65 @@ namespace FineUIPro.Web.CQMS.Solution
}
}
private void InitDropDownList()
{
BLL.SolutionTempleteTypeService.InitSolutionTempleteDropDownList(drpSolutionType, true);
//Funs.FineUIPleaseSelect(drpState);
UnitWorkService.InitUnitWorkDownList(drpUnitWork, this.ProjectId, true);
UnitService.InitMainAndSubUnitDropDownList(drpProposeUnit, ProjectId, false);
if (this.CurrUser.UnitId != null && CommonService.GetProjectUnitType(this.ProjectId, this.CurrUser.UnitId) != BLL.Const.ProjectUnitType_1 && this.CurrUser.UnitId != Const.hfnbdId)
{
this.drpProposeUnit.Hidden = true;
}
}
/// <summary>
/// 公司级树加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
this.InitDropDownList();
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
btnNew.Hidden = true;
}
this.GetButtonPower();
this.BindGrid();
}
#region
/// <summary>
/// 获取按钮权限
/// </summary>
/// <param name="button"></param>
/// <returns></returns>
private void GetButtonPower()
{
if (Request.Params["value"] == "0")
{
return;
}
var buttonList = CommonService.GetAllButtonList(ProjectId, CurrUser.UserId, Const.CQMSConstructSolutionMenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(Const.BtnAdd))
{
btnNew.Hidden = false;
}
if (buttonList.Contains(Const.BtnModify) || buttonList.Contains(Const.BtnSubmit))
{
btnMenuModify.Hidden = false;
}
if (buttonList.Contains(Const.BtnDelete))
{
btnMenuDel.Hidden = false;
}
}
}
#endregion
protected string ConvertEdition(object edition)
{
return string.Format("{0:#0.#}",((int)edition)/10.0);
@ -136,8 +186,8 @@ namespace FineUIPro.Web.CQMS.Solution
+ @" where chec.ProjectId=@ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", CurrUser.LoginProjectId));
if (this.CurrUser.UnitId != null && CommonService.GetProjectUnitType(this.CurrUser.LoginProjectId, this.CurrUser.UnitId) != BLL.Const.ProjectUnitType_1 && this.CurrUser.UnitId != Const.hfnbdId)
listStr.Add(new SqlParameter("@ProjectId", ProjectId));
if (this.CurrUser.UnitId != null && CommonService.GetProjectUnitType(this.ProjectId, this.CurrUser.UnitId) != BLL.Const.ProjectUnitType_1 && this.CurrUser.UnitId != Const.hfnbdId)
{
strSql += " AND chec.UnitId='" + this.CurrUser.UnitId + "'";
}
@ -216,10 +266,14 @@ namespace FineUIPro.Web.CQMS.Solution
}
private void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
var list = ChecklistData();
Grid1.RecordCount = list.Rows.Count;
var CNProfessional = CNProfessionalService.GetCNProfessionalItem();
var uniWork = UnitWorkService.GetUnitWorkLists(CurrUser.LoginProjectId);
var uniWork = UnitWorkService.GetUnitWorkLists(ProjectId);
if (list.Rows.Count > 0)
{
for (int i = 0; i < list.Rows.Count; i++)
@ -835,7 +889,7 @@ namespace FineUIPro.Web.CQMS.Solution
return;
}
string id = Grid1.SelectedRowID.Split(',')[0];
if (CommonService.GetAllButtonPowerList(CurrUser.LoginProjectId, CurrUser.UserId, Const.CQMSConstructSolutionMenuId, Const.BtnDelete))
if (CommonService.GetAllButtonPowerList(ProjectId, CurrUser.UserId, Const.CQMSConstructSolutionMenuId, Const.BtnDelete))
{
var constructSolution = CQMSConstructSolutionService.GetConstructSolutionByConstructSolutionId(id);
CQMSConstructSolutionApproveService.DeleteConstructSolutionApprovesByConstructSolutionId(id);

View File

@ -41,6 +41,42 @@ namespace FineUIPro.Web.CQMS.Solution
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// panelLeftRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion;
/// <summary>
/// ContentPanel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel ContentPanel1;
/// <summary>
/// ucTree 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
/// <summary>
/// panelCenterRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelCenterRegion;
/// <summary>
/// Grid1 控件。
/// </summary>

View File

@ -42,7 +42,7 @@ namespace FineUIPro.Web.CQMS.Solution
{
return;
}
var buttonList = CommonService.GetAllButtonList(CurrUser.LoginProjectId, CurrUser.UserId, Const.CQMSConstructSolutionMenuId);
var buttonList = CommonService.GetAllButtonList(ProjectId, CurrUser.UserId, Const.CQMSConstructSolutionMenuId);
if (buttonList.Count() > 0)
{
@ -138,7 +138,7 @@ namespace FineUIPro.Web.CQMS.Solution
where ProjectId=@ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@ProjectId", ProjectId));
if (this.CurrUser.UnitId != null && CommonService.GetProjectUnitType(this.ProjectId, this.CurrUser.UnitId) != BLL.Const.ProjectUnitType_1 && this.CurrUser.UnitId != Const.hfnbdId)
{
strSql += " AND solution.UnitId='" + this.CurrUser.UnitId + "'";
@ -192,6 +192,10 @@ namespace FineUIPro.Web.CQMS.Solution
}
private void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
var list = ChecklistData();
Grid1.RecordCount = list.Rows.Count;
var CNProfessional = CNProfessionalService.GetCNProfessionalItem();
@ -661,7 +665,7 @@ namespace FineUIPro.Web.CQMS.Solution
return;
}
string id = Grid1.SelectedRowID.Split(',')[0];
if (CommonService.GetAllButtonPowerList(CurrUser.LoginProjectId, CurrUser.UserId, Const.CQMSConstructSolutionMenuId, Const.BtnDelete))
if (CommonService.GetAllButtonPowerList(ProjectId, CurrUser.UserId, Const.CQMSConstructSolutionMenuId, Const.BtnDelete))
{
var constructSolution = CQMSConstructSolutionFinalService.GetConstructSolutionByConstructSolutionId(id);
CQMSConstructSolutionFinalService.DeleteConstructSolution(id);

View File

@ -1,5 +1,7 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NDTPersonRegister.aspx.cs" Inherits="FineUIPro.Web.HJGL.PersonManage.NDTPersonRegister" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
@ -10,8 +12,20 @@
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<Items>
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
<Items>
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
BodyPadding="0px">
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
</f:ContentPanel>
</Items>
</f:Panel>
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" AutoScroll="true">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="无损检测人员登记表" EnableCollapse="true"
runat="server" BoxFlex="1" EnableColumnLines="true" DataKeyNames="WED_ID"
@ -23,7 +37,7 @@
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DropDownList ID="dpUnit" runat="server" Label="检测单位" LabelAlign="Right" AutoPostBack="true" OnSelectedIndexChanged="dpUnit_SelectedIndexChanged" ></f:DropDownList>
<f:DropDownList ID="dpUnit" runat="server" Label="检测单位" LabelAlign="Right" AutoPostBack="true" OnSelectedIndexChanged="dpUnit_SelectedIndexChanged"></f:DropDownList>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
@ -31,7 +45,6 @@
runat="server" OnClick="btnNew_Click">
</f:Button>
<f:Button ID="btnPrint" runat="server" Icon="Printer" EnablePostBack="true" Text="打印" ToolTip="打印" OnClick="btnPrint_Click" DisableControlBeforePostBack="false">
</f:Button>
</Items>
</f:Toolbar>
@ -80,6 +93,8 @@
</f:Grid>
</Items>
</f:Panel>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="无损检测人员登记" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Top" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
Width="1100px" Height="480px">

View File

@ -1,4 +1,5 @@
using BLL;
using FineUIPro.Web.DataShow;
using System;
using System.Collections.Generic;
using System.Data;
@ -9,6 +10,22 @@ namespace FineUIPro.Web.HJGL.PersonManage
{
public partial class NDTPersonRegister : PageBase
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
/// <summary>
/// 加载页面
/// </summary>
@ -18,7 +35,31 @@ namespace FineUIPro.Web.HJGL.PersonManage
{
if (!IsPostBack)
{
var cUnit = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_5);
this.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
{
this.ProjectId = Request.Params["projectId"];
}
this.InitDropDownList();
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.ProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
//this.GetButtonPower();
}
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
// 绑定表格
this.BindGrid();
}
}
private void InitDropDownList()
{
var cUnit = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.ProjectId, BLL.Const.ProjectUnitType_5);
if (cUnit != null)
{
this.dpUnit.DataTextField = "UnitName";
@ -27,11 +68,25 @@ namespace FineUIPro.Web.HJGL.PersonManage
this.dpUnit.DataBind();
Funs.FineUIPleaseSelect(dpUnit);
}
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
// 绑定表格
}
/// <summary>
/// 公司级树加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
this.InitDropDownList();
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
btnNew.Hidden = true;
}
//this.GetButtonPower();
this.BindGrid();
}
}
#region
/// <summary>
@ -39,6 +94,10 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// </summary>
private void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @"SELECT welder.WED_ID,
welder.WED_Code,
welder.WED_Name,
@ -52,7 +111,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
+ @" FROM View_PersonManageList AS welder"
+ @" WHERE welder.WederType ='2' AND welder.ProjectId=@projectId";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@projectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@projectId", this.ProjectId));
if (this.dpUnit.SelectedValue != BLL.Const._Null)
{
strSql += " AND welder.WED_Unit=@WED_Unit ";
@ -250,7 +309,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// <returns></returns>
private bool GetButtonPower(string button)
{
return BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HJGL_NDTPersonRegisterMenuId, button);
return BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.HJGL_NDTPersonRegisterMenuId, button);
}
#endregion
@ -281,7 +340,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
// string reportId = this.tvControlItem.SelectedNode.NodeID;
// var trust = BLL.TrustManageEditService.GetCH_TrustByID(reportId);
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
keyValuePairs.Add("ProjectName", ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId));
keyValuePairs.Add("ProjectName", ProjectService.GetProjectNameByProjectId(this.ProjectId));
string strSql = @"SELECT welder.WED_ID,
welder.WED_Code,
welder.WED_Name,
@ -294,7 +353,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
+ @" FROM View_PersonManageList AS welder"
+ @" WHERE welder.WederType ='2' AND welder.ProjectId=@projectId";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@projectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@projectId", this.ProjectId));
SqlParameter[] parameter = listStr.ToArray();
DataTable dt = SQLHelper.GetDataTableRunText(strSql, parameter);

View File

@ -41,6 +41,42 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// panelLeftRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion;
/// <summary>
/// ContentPanel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel ContentPanel1;
/// <summary>
/// ucTree 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
/// <summary>
/// panelCenterRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelCenterRegion;
/// <summary>
/// Grid1 控件。
/// </summary>

View File

@ -1,5 +1,7 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PersonManage.aspx.cs" Inherits="FineUIPro.Web.HJGL.PersonManage.PersonManage" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
@ -10,8 +12,20 @@
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<Items>
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
<Items>
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
BodyPadding="0px">
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
</f:ContentPanel>
</Items>
</f:Panel>
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" AutoScroll="true">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="人员管理" EnableCollapse="true"
runat="server" BoxFlex="1" EnableColumnLines="true" DataKeyNames="WED_ID"
@ -103,6 +117,8 @@
</f:Grid>
</Items>
</f:Panel>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="人员管理" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Top" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
Width="1000px" Height="700px">

View File

@ -8,6 +8,22 @@ namespace FineUIPro.Web.HJGL.PersonManage
{
public partial class PersonManage : PageBase
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
@ -19,12 +35,34 @@ namespace FineUIPro.Web.HJGL.PersonManage
if (!IsPostBack)
{
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.CurrUser.LoginProjectId, true);
//Funs.DropDownPageSize(this.ddlPageSize);
this.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
{
this.ProjectId = Request.Params["projectId"];
}
this.InitDropDownList();
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.ProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
//this.GetButtonPower();
}
Funs.FineUIPleaseSelect(drpTeamGroupId);
// 绑定表格
this.BindGrid();
}
}
private void InitDropDownList()
{
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, true);
var unit = BLL.UnitService.GetUnitByUnitId(this.CurrUser.UnitId);
if (unit == null || CommonService.GetProjectUnitType(this.CurrUser.LoginProjectId, this.CurrUser.UnitId) == BLL.Const.ProjectUnitType_1 || UnitService.IsSubUnitByProjectAndUnit(this.CurrUser.LoginProjectId, this.CurrUser.UnitId))
if (unit == null || CommonService.GetProjectUnitType(this.ProjectId, this.CurrUser.UnitId) == BLL.Const.ProjectUnitType_1 || UnitService.IsSubUnitByProjectAndUnit(this.ProjectId, this.CurrUser.UnitId))
{
drpUnitId.Enabled = true;
}
@ -32,14 +70,27 @@ namespace FineUIPro.Web.HJGL.PersonManage
{
drpUnitId.SelectedValue = this.CurrUser.UnitId;
drpUnitId.Enabled = false;
BLL.TeamGroupService.InitTeamGroupProjectUnitDropDownList(this.drpTeamGroupId, this.CurrUser.LoginProjectId, this.drpUnitId.SelectedValue, true);
BLL.TeamGroupService.InitTeamGroupProjectUnitDropDownList(this.drpTeamGroupId, this.ProjectId, this.drpUnitId.SelectedValue, true);
}
}
// 绑定表格
/// <summary>
/// 公司级树加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
this.InitDropDownList();
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
btnNew.Hidden = true;
}
//this.GetButtonPower();
this.BindGrid();
}
}
#region
/// <summary>
@ -47,6 +98,10 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// </summary>
private void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @"SELECT Welder.WED_ID,
Welder.ProjectId,
Welder.WED_Unit,
@ -66,7 +121,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
+ @" LEFT JOIN ProjectData_TeamGroup AS TeamGroup ON TeamGroup.TeamGroupId = Welder.TeamGroupId"
+ @" WHERE Welder.ProjectId=@projectId AND (Welder.WederType='1' OR Welder.WederType is null)";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@projectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@projectId", this.ProjectId));
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
{
strSql += " AND Welder.WED_Unit = @unitId";
@ -258,7 +313,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
}
}
}
Project_HJGLData_HJGLService.StatisticalData(this.CurrUser.LoginProjectId, Project_HJGLData_HJGLService.HJGLDateType.TotalNumberOfWelders);
Project_HJGLData_HJGLService.StatisticalData(this.ProjectId, Project_HJGLData_HJGLService.HJGLDateType.TotalNumberOfWelders);
BindGrid();
if (!string.IsNullOrEmpty(strShowNotify))
{
@ -345,7 +400,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
this.drpTeamGroupId.Items.Clear();
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
{
BLL.TeamGroupService.InitTeamGroupProjectUnitDropDownList(this.drpTeamGroupId, this.CurrUser.LoginProjectId, this.drpUnitId.SelectedValue, true);
BLL.TeamGroupService.InitTeamGroupProjectUnitDropDownList(this.drpTeamGroupId, this.ProjectId, this.drpUnitId.SelectedValue, true);
this.drpTeamGroupId.SelectedIndex = 0;
}
else
@ -364,7 +419,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// <returns></returns>
private bool GetButtonPower(string button)
{
return BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HJGL_WelderManageMenuId, button);
return BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.HJGL_WelderManageMenuId, button);
}
#endregion
}

View File

@ -7,10 +7,12 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HJGL.PersonManage {
namespace FineUIPro.Web.HJGL.PersonManage
{
public partial class PersonManage {
public partial class PersonManage
{
/// <summary>
/// form1 控件。
@ -39,6 +41,42 @@ namespace FineUIPro.Web.HJGL.PersonManage {
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// panelLeftRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion;
/// <summary>
/// ContentPanel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel ContentPanel1;
/// <summary>
/// ucTree 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
/// <summary>
/// panelCenterRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelCenterRegion;
/// <summary>
/// Grid1 控件。
/// </summary>

View File

@ -1,5 +1,7 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProcedureImageList.aspx.cs" Inherits="FineUIPro.Web.HJGL.WeldingManage.ProcedureImageList" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
@ -10,8 +12,20 @@
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<Items>
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
<Items>
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
BodyPadding="0px">
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
</f:ContentPanel>
</Items>
</f:Panel>
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" AutoScroll="true">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="工艺评定图片" EnableCollapse="true"
runat="server" BoxFlex="1" EnableColumnLines="true" DataKeyNames="ImageId"
@ -67,6 +81,8 @@
</f:Grid>
</Items>
</f:Panel>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="工艺图片管理" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Top" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
Width="800px" Height="340px">

View File

@ -8,6 +8,22 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
public partial class ProcedureImageList : PageBase
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
@ -18,18 +34,53 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
if (!IsPostBack)
{
//Funs.DropDownPageSize(this.ddlPageSize);
this.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
{
this.ProjectId = Request.Params["projectId"];
}
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.ProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
//this.GetButtonPower();
}
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
// 绑定表格
this.BindGrid();
}
}
/// <summary>
/// 公司级树加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
btnNew.Hidden = true;
}
//this.GetButtonPower();
this.BindGrid();
}
#region
/// <summary>
/// 绑定数据
/// </summary>
private void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @"SELECT Proce.ImageId,
Proce.ImageContent,
Proce.AttachUrl,
@ -46,7 +97,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
+ @" LEFT JOIN Base_GrooveType AS GrooveType ON GrooveType.GrooveTypeId=Proce.GrooveTypeId";
List<SqlParameter> listStr = new List<SqlParameter>();
strSql += " Where Proce.ProjectId = @ProjectId";
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
@ -238,7 +289,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
/// <returns></returns>
private bool GetButtonPower(string button)
{
return BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HJGL_ProcedureImageListMenuId, button);
return BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.HJGL_ProcedureImageListMenuId, button);
}
#endregion
}

View File

@ -7,10 +7,12 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HJGL.WeldingManage {
namespace FineUIPro.Web.HJGL.WeldingManage
{
public partial class ProcedureImageList {
public partial class ProcedureImageList
{
/// <summary>
/// form1 控件。
@ -39,6 +41,42 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// panelLeftRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion;
/// <summary>
/// ContentPanel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel ContentPanel1;
/// <summary>
/// ucTree 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
/// <summary>
/// panelCenterRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelCenterRegion;
/// <summary>
/// Grid1 控件。
/// </summary>