protected void CreateNewObject(string schemaType)
 {
     if (this.sceneAdapter == null)
     {
         this.sceneAdapter      = PropertyEditorSceneAdapter.Create(schemaType);
         this.sceneAdapter.Mode = SCObjectOperationMode.Add;
     }
 }
Exemplo n.º 2
0
        protected void LoadObject(string id)
        {
            this.Data = DESchemaObjectAdapter.Instance.Load(id);

            this.sceneAdapter            = PropertyEditorSceneAdapter.Create(this.Data.SchemaType);
            this.sceneAdapter.ObjectID   = this.Data.ID;
            this.sceneAdapter.Mode       = SCObjectOperationMode.Update;
            this.currentSchemaType.Value = this.Data.SchemaType;
        }
Exemplo n.º 3
0
        protected void CreateNewObject(string schemaType, string parentID)
        {
            this.sceneAdapter          = PropertyEditorSceneAdapter.Create(schemaType);
            this.sceneAdapter.ParentID = parentID;
            this.sceneAdapter.Mode     = SCObjectOperationMode.Add;

            this.CreateNewObject(schemaType);

            this.currentParentID.Value = parentID;
        }
Exemplo n.º 4
0
        protected void CreateAUSchema(string category)
        {
            category.CheckStringIsNullOrEmpty("category");

            this.sceneAdapter      = PropertyEditorSceneAdapter.Create(AUCommon.SchemaAUSchema);
            this.sceneAdapter.Mode = SCObjectOperationMode.Add;

            this.CreateNewObject(AUCommon.SchemaAUSchema);

            ((AUSchema)this.Data).CategoryID = category;

            this.currentParentID.Value = null;
        }
Exemplo n.º 5
0
        protected void LoadObject(string id)
        {
            AUCommon.DoDbAction(() =>
            {
                this.Data = SchemaObjectAdapter.Instance.Load(id);
            });

            this.sceneAdapter          = PropertyEditorSceneAdapter.Create(this.Data.SchemaType);
            this.sceneAdapter.ObjectID = this.Data.ID;
            this.sceneAdapter.Mode     = SCObjectOperationMode.Update;

            this.currentSchemaType.Value = this.Data.SchemaType;

            // this.CurrentSchemaType = this.Data.SchemaType;
            this.OperationMode = SCObjectOperationMode.Update;
        }
Exemplo n.º 6
0
        protected void CreateAdminUnit(string auSchemaID, string parentID)
        {
            parentID = parentID == string.Empty ? null : parentID;

            if (string.IsNullOrEmpty(auSchemaID))
            {
                throw new HttpException("auSchemaID不能为空");
            }
            this.sceneAdapter          = new AdminUnitsPropertyEditorSceneAdapter(DbUtil.GetEffectiveObject <AUSchema>(auSchemaID));
            this.sceneAdapter.ParentID = parentID;
            this.sceneAdapter.Mode     = SCObjectOperationMode.Add;

            this.CreateNewObject(AUCommon.SchemaAdminUnit);
            ((AdminUnit)this.Data).AUSchemaID = auSchemaID;

            this.currentParentID.Value = parentID;
        }
        protected void LoadObject(string id)
        {
            this.Data = SchemaObjectAdapter.Instance.Load(id);

            this.sceneAdapter = PropertyEditorSceneAdapter.Create(this.Data.SchemaType);
            this.sceneAdapter.ObjectID = this.Data.ID;
            this.sceneAdapter.Mode = SCObjectOperationMode.Update;

            this.currentSchemaType.Value = this.Data.SchemaType;

            // this.CurrentSchemaType = this.Data.SchemaType;
            this.OperationMode = SCObjectOperationMode.Update;
        }
        protected void CreateNewObject(string schemaType, string parentID)
        {
            this.sceneAdapter = PropertyEditorSceneAdapter.Create(schemaType);
            this.sceneAdapter.ParentID = parentID;
            this.sceneAdapter.Mode = SCObjectOperationMode.Add;

            this.CreateNewObject(schemaType);

            this.currentParentID.Value = parentID;
        }
        protected void CreateNewObject(string schemaType)
        {
            if (this.sceneAdapter == null)
            {
                this.sceneAdapter = PropertyEditorSceneAdapter.Create(schemaType);
                this.sceneAdapter.Mode = SCObjectOperationMode.Add;
            }

            this.CreateNewObjectBySchemaType(schemaType);

            this.OperationMode = SCObjectOperationMode.Add;
        }
Exemplo n.º 10
0
		protected void CreateAdminUnit(string auSchemaID, string parentID)
		{
			parentID = parentID == string.Empty ? null : parentID;

			if (string.IsNullOrEmpty(auSchemaID))
				throw new HttpException("auSchemaID不能为空");
			this.sceneAdapter = new AdminUnitsPropertyEditorSceneAdapter(DbUtil.GetEffectiveObject<AUSchema>(auSchemaID));
			this.sceneAdapter.ParentID = parentID;
			this.sceneAdapter.Mode = SCObjectOperationMode.Add;

			this.CreateNewObject(AUCommon.SchemaAdminUnit);
			((AdminUnit)this.Data).AUSchemaID = auSchemaID;

			this.currentParentID.Value = parentID;
		}
Exemplo n.º 11
0
		protected void CreateAUSchema(string category)
		{
			category.CheckStringIsNullOrEmpty("category");

			this.sceneAdapter = PropertyEditorSceneAdapter.Create(AUCommon.SchemaAUSchema);
			this.sceneAdapter.Mode = SCObjectOperationMode.Add;

			this.CreateNewObject(AUCommon.SchemaAUSchema);

			((AUSchema)this.Data).CategoryID = category;

			this.currentParentID.Value = null;
		}