public List <SQLAutoDocLib.BLL.Procedure> ListAllProceduresInDatabase(Guid DBID, string VersionID, bool ChangedOnly) { List <SQLAutoDocLib.BLL.Procedure> oList = new List <SQLAutoDocLib.BLL.Procedure>(); DataTable oIDs = m_DBFactory.AllProcedures(DBID: DBID, VersionID: VersionID, ChangedOnly: ChangedOnly); foreach (DataRow oID in oIDs.Rows) { BLL.Procedure oProcedure = new BLL.Procedure(DBID: DBID, ProcedureID: (Guid)oID["ProcedureID"]); oProcedure.LoadFromRow(oID); oList.Add(oProcedure); } return(oList); }
public void LoadSingleProcedure(BLL.Procedure oProcedure) { StringBuilder sSQL = new StringBuilder(); sSQL.AppendLine("select") .AppendLine(" *") .AppendLine(" from") .AppendLine(" [dbProcedure] a") .AppendLine(" where") .AppendFormat(" a.[ProcedureID]='{0}'", oProcedure.ProcedureID); DataTable oDT = base.ExecuteSQLToDatatable(sSQL.ToString()); if (oDT.Rows.Count > 0) { oProcedure.LoadFromRow(oDT.Rows[0]); } else { oProcedure = null; } }