Пример #1
0
		public override MixAttributeSetData ParseModel(MixCmsContext _context = null, IDbContextTransaction _transaction = null)
		{
			if (string.IsNullOrEmpty(this.get_Id()))
			{
				this.set_Id(Guid.NewGuid().ToString());
				this.set_CreatedDateTime(DateTime.get_UtcNow());
			}
			stackVariable5 = this.get_Fields();
			if (stackVariable5 == null)
			{
				dummyVar0 = stackVariable5;
				stackVariable5 = new List<Mix.Cms.Lib.ViewModels.MixAttributeFields.UpdateViewModel>();
			}
			this.set_Fields(stackVariable5);
			this.set_Values(new List<Mix.Cms.Lib.ViewModels.MixAttributeSetValues.ImportViewModel>());
			V_1 = this.get_Fields().GetEnumerator();
			try
			{
				while (V_1.MoveNext())
				{
					V_2 = V_1.get_Current();
					stackVariable15 = new Mix.Cms.Lib.ViewModels.MixAttributeSetValues.ImportViewModel();
					stackVariable15.set_AttributeFieldId(V_2.get_Id());
					stackVariable15.set_AttributeFieldName(V_2.get_Name());
					stackVariable15.set_StringValue(V_2.get_DefaultValue());
					stackVariable15.set_Priority(V_2.get_Priority());
					stackVariable15.set_Field(V_2);
					V_3 = stackVariable15;
					V_3.set_Priority(V_2.get_Priority());
					V_3.set_DataType(V_2.get_DataType());
					V_3.set_AttributeSetName(V_2.get_AttributeSetName());
					if (this.get_Data().get_Item(V_3.get_AttributeFieldName()) != null && V_3.get_Field().get_DataType() != 23)
					{
						this.ParseModelValue(this.get_Data().get_Item(V_3.get_AttributeFieldName()), V_3);
					}
					this.get_Values().Add(V_3);
				}
			}
			finally
			{
				((IDisposable)V_1).Dispose();
			}
			return this.ParseModel(_context, _transaction);
		}