using System;
using System.Data;
using BP.DA;
using BP.WF;
using BP.En;
namespace BP.WF
{
///
/// 普通工作
///
public class GEWorkAttr : WorkAttr
{
}
///
/// 普通工作
///
public class GEWork : Work
{
#region 与_SQLCache 操作有关
private SQLCache _SQLCache = null;
public override SQLCache SQLCache
{
get
{
if (_SQLCache == null)
{
_SQLCache = Cache.GetSQL(this.NodeFrmID.ToString());
if (_SQLCache == null)
{
_SQLCache = new SQLCache(this);
Cache.SetSQL(this.NodeFrmID.ToString(), _SQLCache);
}
}
return _SQLCache;
}
set
{
_SQLCache = value;
}
}
#endregion
#region 构造函数
///
/// 普通工作
///
public GEWork()
{
}
///
/// 普通工作
///
/// 节点ID
public GEWork(int nodeid, string nodeFrmID)
{
this.NodeFrmID = nodeFrmID;
this.NodeID = nodeid;
this.SQLCache = null;
}
///
/// 普通工作
///
/// 节点ID
/// OID
public GEWork(int nodeid, string nodeFrmID, Int64 _oid)
{
this.NodeFrmID = nodeFrmID;
this.NodeID = nodeid;
this.OID = _oid;
this.SQLCache = null;
}
#endregion
#region Map
///
/// 重写基类方法
///
public override Map EnMap
{
get
{
//if (this._enMap == null)
this._enMap = BP.Sys.MapData.GenerHisMap(this.NodeFrmID);
return this._enMap;
}
}
///
/// GEWorks
///
public override Entities GetNewEntities
{
get
{
if (this.NodeID == 0)
return new GEWorks();
return new GEWorks(this.NodeID, this.NodeFrmID);
}
}
#endregion
///
/// 重写tostring 返回fromID.
///
///
public override string ToString()
{
return this.NodeFrmID;
}
}
///
/// 普通工作s
///
public class GEWorks : Works
{
#region 重载基类方法
///
/// 节点ID
///
public int NodeID = 0;
#endregion
#region 方法
///
/// 得到它的 Entity
///
public override Entity GetNewEntity
{
get
{
if (this.NodeID == 0)
return new GEWork();
return new GEWork(this.NodeID, this.NodeFrmID);
}
}
///
/// 普通工作ID
///
public GEWorks()
{
}
///
/// 普通工作ID
///
///
public GEWorks(int nodeid, string nodeFrmID)
{
this.NodeID = nodeid;
this.NodeFrmID = nodeFrmID;
}
public string NodeFrmID = "";
#endregion
}
}