示例#1
0
 public override void UpdateDatabaseAfterUpdateSchema()
 {
     base.UpdateDatabaseAfterUpdateSchema();
     DomainObject1 do1 = Session.FindObject<DomainObject1>(new BinaryOperator("Property1", "StartupObject"));
     if (do1 == null) {
         do1 = new DomainObject1(Session);
         do1.Property1 = "StartupObject";
         do1.Save();
     }
 }
示例#2
0
        public override void UpdateDatabaseAfterUpdateSchema()
        {
            base.UpdateDatabaseAfterUpdateSchema();
            DomainObject1 do1 = Session.FindObject <DomainObject1>(new BinaryOperator("Property1", "StartupObject"));

            if (do1 == null)
            {
                do1           = new DomainObject1(Session);
                do1.Property1 = "StartupObject";
                do1.Save();
            }
        }
示例#3
0
        void showNavigationItemController_CustomShowNavigationItem(object sender, CustomShowNavigationItemEventArgs e)
        {
            showNavigationItemController.CustomShowNavigationItem -= new EventHandler <CustomShowNavigationItemEventArgs>(showNavigationItemController_CustomShowNavigationItem);
            ObjectSpace   os  = Application.CreateObjectSpace();
            DomainObject1 do1 = os.FindObject <DomainObject1>(new BinaryOperator("Property1", "StartupObject"));

            if (do1 == null)
            {
                do1 = os.CreateObject <DomainObject1>();
            }
            DetailView view = Application.CreateDetailView(os, do1);

            e.ActionArguments.ShowViewParameters.CreatedView  = view;
            e.ActionArguments.ShowViewParameters.TargetWindow = TargetWindow.Current;
            e.Handled = true;
        }