public EyouSoft.Model.BackgroundServices.IPlugin GetPlugin(Guid pluginID) { EyouSoft.Model.BackgroundServices.IPlugin plugin = null; DbCommand dc = this.SystemStore.GetSqlStringCommand("SELECT * FROM tbl_SysPluging WHERE PluginID=@PluginID"); this.SystemStore.AddInParameter(dc, "PluginID", DbType.String, pluginID.ToString()); using (IDataReader dr = DbHelper.ExecuteReader(dc, this.SystemStore)) { while (dr.Read()) { plugin = new EyouSoft.Model.BackgroundServices.Plugin(); plugin.Enabled = dr["Enabled"].ToString() == "1" ? true : false; } } return(plugin); }
public IList <EyouSoft.Model.BackgroundServices.IPlugin> GetPlugins() { IList <EyouSoft.Model.BackgroundServices.IPlugin> list = new List <EyouSoft.Model.BackgroundServices.IPlugin>(); DbCommand dc = this.SystemStore.GetSqlStringCommand("SELECT * FROM tbl_SysPluging"); using (IDataReader dr = DbHelper.ExecuteReader(dc, this.SystemStore)) { EyouSoft.Model.BackgroundServices.IPlugin plugin = null; while (dr.Read()) { plugin = new EyouSoft.Model.BackgroundServices.Plugin(); plugin.Enabled = dr["Enabled"].ToString() == "1" ? true : false; list.Add(plugin); plugin = null; } } return(list); }