Exemplo n.º 1
0
		private RepositoryResponse<bool> SaveAttribute(int parentId, MixCmsContext context, IDbContextTransaction transaction)
		{
			stackVariable0 = new RepositoryResponse<bool>();
			stackVariable0.set_IsSucceed(true);
			V_0 = stackVariable0;
			this.get_AttributeData().set_ParentId(parentId.ToString());
			this.get_AttributeData().set_ParentType(2);
			ViewModelHelper.HandleResult<Mix.Cms.Lib.ViewModels.MixRelatedAttributeDatas.UpdateViewModel>(this.get_AttributeData().SaveModel(true, context, transaction), ref V_0);
			V_1 = this.get_SysCategories().GetEnumerator();
			try
			{
				while (V_1.MoveNext())
				{
					V_2 = V_1.get_Current();
					if (!V_0.get_IsSucceed())
					{
						continue;
					}
					V_2.set_ParentId(parentId.ToString());
					V_2.set_ParentType(2);
					V_2.set_Specificulture(this.get_Specificulture());
					ViewModelHelper.HandleResult<Mix.Cms.Lib.ViewModels.MixRelatedAttributeDatas.FormViewModel>(V_2.SaveModel(false, context, transaction), ref V_0);
				}
			}
			finally
			{
				((IDisposable)V_1).Dispose();
			}
			V_1 = this.get_SysTags().GetEnumerator();
			try
			{
				while (V_1.MoveNext())
				{
					V_3 = V_1.get_Current();
					if (!V_0.get_IsSucceed())
					{
						continue;
					}
					V_3.set_ParentId(parentId.ToString());
					V_3.set_ParentType(2);
					V_3.set_Specificulture(this.get_Specificulture());
					ViewModelHelper.HandleResult<Mix.Cms.Lib.ViewModels.MixRelatedAttributeDatas.FormViewModel>(V_3.SaveModel(false, context, transaction), ref V_0);
				}
			}
			finally
			{
				((IDisposable)V_1).Dispose();
			}
			return V_0;
		}