修改关键事项与沟通协调
This commit is contained in:
@@ -12,6 +12,21 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
{
|
||||
public partial class GJSXList : PageBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 类型
|
||||
/// </summary>
|
||||
public string classify
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["classify"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["classify"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
@@ -21,9 +36,14 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
classify = Request.Params["classify"];
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
if (classify != "0")
|
||||
{
|
||||
btnNew.Hidden = true;
|
||||
}
|
||||
this.btnNew.OnClientClick = Window1.GetShowReference("GJSXListEdit.aspx?EditType=add") + "return false;";
|
||||
if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
|
||||
{
|
||||
@@ -42,7 +62,33 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
private void BindGrid()
|
||||
{
|
||||
|
||||
string strSql = "";
|
||||
string strSql = @"select
|
||||
a.GJSXID
|
||||
,a.ProjectId
|
||||
,a.detail
|
||||
,a.Userid
|
||||
,b.username
|
||||
,a.createDate
|
||||
,User_ReceiveID = STUFF((SELECT ',' + p2.UserName FROM dbo.Sys_User as p2 where PATINDEX('%,' + RTRIM(p2.UserId) + ',%', ',' + a.User_ReceiveID + ',') > 0 FOR XML PATH('')), 1, 1,'')
|
||||
, CNProfessionalId = STUFF((SELECT ',' + Base_CNProfessional.ProfessionalName FROM dbo.Base_CNProfessional where PATINDEX('%,' + RTRIM(Base_CNProfessional.CNProfessionalId) + ',%', ',' + a.CNProfessional_ID + ',') > 0 FOR XML PATH('')), 1, 1,'')
|
||||
,Base_Project.ProjectName
|
||||
,Base_Unit.unitname
|
||||
,a.CloseDate
|
||||
,case a.state when 2 then '正在进行' when 3 then '待关闭' when 0 then '已关闭' when 1 then '开放' end as state
|
||||
,QuestionTypeName = STUFF((SELECT ',' + Base_QuestionType.QuestionTypeName FROM dbo.Base_QuestionType where PATINDEX('%,' + RTRIM(Base_QuestionType.QuestionTypeID) + ',%', ',' + a.QuestionTypeID + ',') > 0 FOR XML PATH('')), 1, 1,'')
|
||||
,a.IsManypeople
|
||||
,a.CompleteDate
|
||||
,a.AttachUrl
|
||||
,user_Acceptance = STUFF((SELECT ',' + p2.UserName FROM dbo.Sys_User as p2 where PATINDEX('%,' + RTRIM(p2.UserId) + ',%', ',' + a.user_Acceptance + ',') > 0 FOR XML PATH('')), 1, 1,'')
|
||||
from GJSX as a left join Sys_User as b on a.UserId = b.UserId
|
||||
|
||||
left join[dbo].[Base_Project] on a.ProjectId = Base_Project.ProjectId
|
||||
|
||||
left join[dbo].[Base_Unit] on a.UnitId = Base_Unit.UnitId
|
||||
|
||||
left join[dbo].[Base_QuestionType] on a.QuestionTypeID = Base_QuestionType.QuestionTypeID
|
||||
|
||||
where a.ProjectId = @ProjectId";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"])) ///是否文件柜查看页面传项目值
|
||||
@@ -53,11 +99,32 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
{
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
}
|
||||
|
||||
listStr.Add(new SqlParameter("@sql_where", strSql));
|
||||
var uid = CurrUser.UserId;
|
||||
//listStr.Add(new SqlParameter("@sql_where", strSql));
|
||||
//我创建的
|
||||
if (classify=="0")
|
||||
{
|
||||
strSql += " AND a.Userid='" + uid + "' ";
|
||||
}
|
||||
//待我处理
|
||||
else if (classify == "1")
|
||||
{
|
||||
strSql += " AND (a.state ='2' and a.User_Acceptance like'%"+ uid + "%' ) or (a.state ='3' and (a.Userid like'%" + uid + "%' or a.User_ReceiveID like'%" + uid + "%' ))";
|
||||
}
|
||||
//我已处理
|
||||
else if (classify == "2")
|
||||
{
|
||||
strSql += " AND (a.state ='0' and (a.Userid like'%" + uid + "%' or a.User_ReceiveID like'%" + uid + "%' ))";
|
||||
}
|
||||
//我参与的
|
||||
else if (classify == "3")
|
||||
{
|
||||
strSql += " AND a.CsUsers like'%" + uid + "%' ";
|
||||
}
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunProc("Sp_GJSX_getlist", parameter);
|
||||
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
|
||||
Reference in New Issue
Block a user