Example #1
0
        private void AddDashboard(Assembly assembly, string title, string embeddedResourceName)
        {
#if EasyTest
            DashboardsModule.AddDashboardDataFromResources <DashboardData>(objectSpace, title, assembly, embeddedResourceName);
#else
            DashboardsModule.AddDashboardData <DashboardData>(objectSpace, title, "NULL");
#endif
        }
        public override void UpdateDatabaseAfterUpdateSchema()
        {
            base.UpdateDatabaseAfterUpdateSchema();
            Contact contactMary = ObjectSpace.FindObject <Contact>(CriteriaOperator.Parse("FirstName == 'Mary' && LastName == 'Tellitson'"));

            if (contactMary == null)
            {
                contactMary           = ObjectSpace.CreateObject <Contact>();
                contactMary.FirstName = "Mary";
                contactMary.LastName  = "Tellitson";
                contactMary.Email     = "*****@*****.**";
                contactMary.Birthday  = new DateTime(1980, 11, 27);
            }
            Contact contactJohn = ObjectSpace.FindObject <Contact>(CriteriaOperator.Parse("FirstName == 'John' && LastName == 'Nilsen'"));

            if (contactJohn == null)
            {
                contactJohn           = ObjectSpace.CreateObject <Contact>();
                contactJohn.FirstName = "John";
                contactJohn.LastName  = "Nilsen";
                contactJohn.Email     = "*****@*****.**";
                contactJohn.Birthday  = new DateTime(1981, 10, 3);
            }
            Contact contactAndrew = ObjectSpace.FindObject <Contact>(CriteriaOperator.Parse("FirstName == 'Andrew' && LastName == 'Fuller'"));

            if (contactAndrew == null)
            {
                contactAndrew           = ObjectSpace.CreateObject <Contact>();
                contactAndrew.FirstName = "Andrew";
                contactAndrew.LastName  = "Fuller";
                contactAndrew.Email     = "*****@*****.**";
                contactAndrew.Birthday  = new DateTime(1952, 3, 19);
            }
            Contact contactRobert = ObjectSpace.FindObject <Contact>(CriteriaOperator.Parse("FirstName == 'Robert' && LastName == 'King'"));

            if (contactRobert == null)
            {
                contactRobert           = ObjectSpace.CreateObject <Contact>();
                contactRobert.FirstName = "Robert";
                contactRobert.LastName  = "King";
                contactRobert.Email     = "*****@*****.**";
                contactRobert.Birthday  = new DateTime(1975, 4, 25);
            }
            Assembly assembly = Assembly.GetExecutingAssembly();

            DashboardsModule.AddDashboardDataFromResources <DashboardData>(ObjectSpace, "Contacts", assembly, "ShowDetailViewFromDashboard.Module.Dashboards.Contacts.xml");

            ObjectSpace.CommitChanges();
        }
Example #3
0
        private void InitializeDashboards()
        {
            Assembly assembly = Assembly.GetExecutingAssembly();

            DashboardsModule.AddDashboardDataFromResources <DevExpress.Persistent.BaseImpl.DashboardData>(ObjectSpace, "Medição de Spool", assembly, "WinCTB_CTS.Module.Dashboards.MedicaoSpool.xml");
        }