/// <summary> /// 选择全部的工作流版本 /// </summary> /// <returns></returns> public List<SWFVersion> SelectWFVersionList() { Database db = DatabaseFactory.CreateDatabase(WorkFlowConnStr); string strSql = "SELECT VERSIONGUID,VERSIONNO,VERSIONNAME,CREATEDATE,ISENABLE,FORMURL,FUNDESCRIPTION,TABLEFLAG,TABLENAME,ADUSERIDLIST,ADUSERNAMELIST FROM OA_SWFVERSION WHERE IsDeleted<>'Y'"; DbCommand cmd = db.GetSqlStringCommand(strSql); DataView dv= db.ExecuteDataView(cmd); List<SWFVersion> WFVList = new List<SWFVersion>(); for (int i = 0; i < dv.Count; i++) { SWFVersion WFV = new SWFVersion(); WFV.CreateDate = Convert.ToDateTime(dv[i]["CREATEDATE"]); WFV.FormUrl = dv[i]["FORMURL"].ToString(); WFV.FunDescription = dv[i]["FUNDESCRIPTION"].ToString(); WFV.IsEnable = dv[i]["ISENABLE"].ToString() == "Y" ? true : false; WFV.VersionGuid = dv[i]["VERSIONGUID"].ToString(); WFV.VersionName = dv[i]["VERSIONNAME"].ToString(); WFV.VersionNo = dv[i]["VERSIONNO"].ToString(); WFV.TableFlag = dv[i]["TABLEFLAG"].ToString(); WFV.TableName = dv[i]["TABLENAME"].ToString(); WFV.ADUserIDList = dv[i]["ADUSERIDLIST"].ToString(); WFV.ADUserNameList = dv[i]["ADUSERNAMELIST"].ToString(); WFVList.Add(WFV); } return WFVList; }
/// <summary> /// 选择指定的工作流版本 /// </summary> /// <param name="?"></param> /// <returns></returns> public SWFVersion SelectWFVersion(string VersionGuid) { Database db = DatabaseFactory.CreateDatabase(WorkFlowConnStr); string strSql = "SELECT VERSIONGUID,VERSIONNO,VERSIONNAME,CREATEDATE,ISENABLE,FORMURL,FUNDESCRIPTION,TABLEFLAG,TABLENAME,ADUSERIDLIST,ADUSERNAMELIST FROM OA_SWFVERSION WHERE VERSIONGUID='" + VersionGuid + "'"; DbCommand cmd = db.GetSqlStringCommand(strSql); DataView dv = db.ExecuteDataView(cmd); SWFVersion WFV = new SWFVersion(); if (dv.Count > 0) { WFV.CreateDate = Convert.ToDateTime(dv[0]["CREATEDATE"]); WFV.FormUrl = dv[0]["FORMURL"].ToString(); WFV.FunDescription = dv[0]["FUNDESCRIPTION"].ToString(); WFV.IsEnable = dv[0]["ISENABLE"].ToString().ToUpper() == "Y" ? true : false; WFV.VersionGuid = VersionGuid; WFV.VersionName = dv[0]["VERSIONNAME"].ToString(); WFV.VersionNo = dv[0]["VERSIONNO"].ToString(); WFV.TableFlag = dv[0]["TABLEFLAG"].ToString(); WFV.TableName = dv[0]["TABLENAME"].ToString(); WFV.ADUserIDList = dv[0]["ADUSERIDLIST"].ToString(); WFV.ADUserNameList = dv[0]["ADUSERNAMELIST"].ToString(); } return WFV; }