关键事项、周进度、月度计划
This commit is contained in:
@@ -58,13 +58,12 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
|
||||
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
|
||||
,Base_Project.ProjectName,Base_Unit.unitname,a.CloseDate,a.state
|
||||
,case a.state when 2 then '正在进行' when 3 then '待办' when 0 then '已关闭' when 1 then '编辑中' end as stateStr
|
||||
,QuestionTypeName = STUFF((SELECT ',' + Base_QuestionType.QuestionTypeName FROM dbo.Base_QuestionType where PATINDEX('%,' + RTRIM(Base_QuestionType.QuestionTypeID) + ',%', ',' + a.QuestionTypeID + ',') > 0 FOR XML PATH('')), 1, 1,'')
|
||||
,GJSXTypeName = STUFF((SELECT ',' + Base_GJSXType.GJSXTypeName FROM dbo.Base_GJSXType where PATINDEX('%,' + RTRIM(Base_GJSXType.GJSXTypeID) + ',%', ',' + a.GJSXTypeID + ',') > 0 FOR XML PATH('')), 1, 1,'')
|
||||
,a.IsManypeople,a.CompleteDate,a.AttachUrl
|
||||
@@ -109,6 +108,7 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
strSql += " AND a.CsUsers like'%" + uid + "%' ";
|
||||
}
|
||||
|
||||
strSql += " order by a.GJSXID desc ";
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
@@ -116,11 +116,42 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
|
||||
try
|
||||
{
|
||||
for (int i = 0; i < Grid1.Rows.Count; i++)
|
||||
{
|
||||
var state = tb.Rows[i]["state"].ToString().Trim();
|
||||
var completeDate = tb.Rows[i]["CompleteDate"].ToString();
|
||||
DateTime dtCompleteDate = Convert.ToDateTime(completeDate);
|
||||
if (Grid1.Rows[i].DataKeys[0] != null && !string.IsNullOrWhiteSpace(state))
|
||||
{
|
||||
if (state == "0")
|
||||
{
|
||||
//Grid1.Rows[i].RowCssClass = "green";
|
||||
Grid1.Rows[i].CellCssClasses[5] = "green";
|
||||
}
|
||||
else if (state == "2" || state == "3")
|
||||
{
|
||||
if (DateTime.Now > dtCompleteDate.AddDays(1))
|
||||
{
|
||||
//Grid1.Rows[i].RowCssClass = "red";
|
||||
Grid1.Rows[i].CellCssClasses[5] = "red";
|
||||
//Grid1.Rows[i].Cells[5].Text = "red";
|
||||
}
|
||||
else
|
||||
{
|
||||
//Grid1.Rows[i].RowCssClass = "blue";
|
||||
Grid1.Rows[i].CellCssClasses[5] = "blue";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex) { }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#region 查询
|
||||
/// <summary>
|
||||
/// 查询
|
||||
@@ -179,6 +210,8 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length > 0)
|
||||
{
|
||||
int all = Grid1.SelectedRowIndexArray.Length;
|
||||
int succ = 0;
|
||||
string strShowNotify = string.Empty;
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
@@ -186,14 +219,22 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
var gjsx = BLL.GJSXService.GetGJSXById(rowID);
|
||||
if (gjsx != null)
|
||||
{
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, gjsx.Detail, gjsx.GJSXID, BLL.Const.GJSXMenuId, BLL.Const.BtnDelete);
|
||||
BLL.GJSXItemService.DeleteGJSXMXByGJSXID(rowID);
|
||||
BLL.GJSXProcessService.DeleteProcess(rowID);
|
||||
BLL.GJSXService.DeleteGJSXById(rowID);
|
||||
if (gjsx.State == "1")
|
||||
{
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, gjsx.Detail, gjsx.GJSXID, BLL.Const.GJSXMenuId, BLL.Const.BtnDelete);
|
||||
BLL.GJSXItemService.DeleteGJSXMXByGJSXID(rowID);
|
||||
BLL.GJSXProcessService.DeleteProcess(rowID);
|
||||
BLL.GJSXService.DeleteGJSXById(rowID);
|
||||
succ++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BindGrid();
|
||||
if (all != succ)
|
||||
{
|
||||
strShowNotify = "当前事项状态不可删除!";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(strShowNotify))
|
||||
{
|
||||
Alert.ShowInTop(strShowNotify, MessageBoxIcon.Warning);
|
||||
|
||||
Reference in New Issue
Block a user