示例#1
0
 /// <summary>
 /// private static cstor that is used to init an
 /// instance of this class as a singleton
 /// </summary>
 static DataProvider()
 {
     instance = (DataProvider)Reflection.CreateObject("data", "YourCompany.Demo.Components", "");
 }
示例#2
0
 /// <summary>
 /// Get an info object from the database
 /// </summary>
 /// <param name="moduleId"></param>
 /// <param name="itemId"></param>
 /// <returns></returns>
 public DemoInfo GetDemo(int moduleId, int itemId)
 {
     return((DemoInfo)CBO.FillObject(DataProvider.Instance().GetDemo(moduleId, itemId), typeof(DemoInfo)));
 }
示例#3
0
 /// <summary>
 /// Delete a given item from the database
 /// </summary>
 /// <param name="moduleId"></param>
 /// <param name="itemId"></param>
 public void DeleteDemo(int moduleId, int itemId)
 {
     DataProvider.Instance().DeleteDemo(moduleId, itemId);
 }
示例#4
0
 /// <summary>
 /// Gets all the DemoInfo objects for items matching the this moduleId
 /// </summary>
 /// <param name="moduleId"></param>
 /// <returns></returns>
 public List <DemoInfo> GetDemos(int moduleId)
 {
     return(CBO.FillCollection <DemoInfo>(DataProvider.Instance().GetDemos(moduleId)));
 }