Exemplo n.º 1
0
		private static List<Mix.Cms.Lib.ViewModels.MixAttributeSetDatas.ImportViewModel> LoadFileData(string culture, Mix.Cms.Lib.ViewModels.MixAttributeSets.ReadViewModel attributeSet, IFormFile file)
		{
			V_0 = new List<Mix.Cms.Lib.ViewModels.MixAttributeSetDatas.ImportViewModel>();
			V_1 = file.OpenReadStream();
			try
			{
				V_2 = new ExcelPackage(V_1);
				try
				{
					V_3 = V_2.get_Workbook().get_Worksheets().GetEnumerator();
					try
					{
						while (V_3.MoveNext())
						{
							V_4 = V_3.get_Current();
							V_5 = 2;
							while (V_5 <= V_4.get_Dimension().get_End().get_Row())
							{
								V_6 = new JObject();
								V_8 = V_4.get_Dimension().get_Start().get_Column();
								while (V_8 <= V_4.get_Dimension().get_End().get_Column())
								{
									V_6.Add(new JProperty(V_4.get_Cells().get_Item(1, V_8).get_Value().ToString(), V_4.get_Cells().get_Item(V_5, V_8).get_Value()));
									V_8 = V_8 + 1;
								}
								stackVariable47 = new Mix.Cms.Lib.ViewModels.MixAttributeSetDatas.ImportViewModel();
								stackVariable47.set_AttributeSetId(attributeSet.get_Id());
								stackVariable47.set_AttributeSetName(attributeSet.get_Name());
								stackVariable47.set_Specificulture(culture);
								stackVariable47.set_Data(V_6);
								V_0.Add(stackVariable47);
								V_5 = V_5 + 1;
							}
						}
					}
					finally
					{
						if (V_3 != null)
						{
							V_3.Dispose();
						}
					}
					V_9 = V_0;
				}
				finally
				{
					if (V_2 != null)
					{
						V_2.Dispose();
					}
				}
			}
			finally
			{
				if (V_1 != null)
				{
					((IDisposable)V_1).Dispose();
				}
			}
			return V_9;
		}