using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using BP.DA;
using BP.En;
namespace BP.GPM
{
///
/// 流程待办
///
public class BarOfTodolist : BarBase
{
#region 系统属性.
///
/// 标记
///
override public string No
{
get
{
return this.ToString();
}
}
///
/// 名称
///
override public string Name
{
get
{
return "待办流程";
}
}
///
/// 权限控制-是否可以查看
///
override public bool IsCanView
{
get
{
if (BP.Web.WebUser.No.Equals("admin")==true)
return true; //任何人都可以看到.
else
return false;
}
}
#endregion 系统属性.
#region 外观行为.
///
/// 标题
///
override public string Title
{
get
{
return "待办";
}
}
///
/// 更多连接
///
override public string More
{
get
{
return "更多";
}
}
///
/// 内容信息
///
override public string Documents
{
get
{
string sql = "select A.WorkID, A.FK_Flow, A.FK_Node, A.Title , A.Sender, A.RDT FROM WF_GenerWorkFlow A , WF_GenerWorkerlist B WHERE A.WorkID=B.WorkID AND B.IsPass=0 AND B.FK_Emp='" + Web.WebUser.No + "' ";
DataTable dt = DBAccess.RunSQLReturnTable(sql);
if (dt.Rows.Count == 0)
return "无待办工作...";
string html = "
";
Int32 idx = 0;
foreach (DataRow dr in dt.Rows)
{
if (idx == 8)
break;
string fk_flow = dr["FK_Flow"].ToString();
string workID = dr["WorkID"].ToString();
string nodeID = dr["FK_Node"].ToString();
string title = dr["Title"].ToString();
string sender = dr["Sender"].ToString();
string rdt = dr["RDT"].ToString();
idx++;
html += "";
html += ""+idx+" | ";
html += "" + title + " | ";
html += "" + sender + " | ";
html += "
";
}
html += "
";
return html;
}
}
///
/// 宽度
///
override public string Width
{
get
{
return "300";
}
}
///
/// 高度
///
override public string Height
{
get
{
return "200";
}
}
public override bool IsLine
{
get
{
return false;
}
}
#endregion 外观行为.
}
}