public WorksheetInfo ContributeDataContainer(string propertyName, object propertyValue) { try { WorksheetInfo worksheetInfo = null; if (Session["Worksheet"] != null && Session["Worksheet"] is WorksheetInfo) worksheetInfo = (WorksheetInfo)Session["Worksheet"]; else worksheetInfo = new WorksheetInfo(); PropertyInfo property = worksheetInfo.GetType().GetProperty(propertyName.Substring(3)); property.SetValue(worksheetInfo, GetPropertyValue(property, propertyValue), null); Worksheet worksheet = new Worksheet(worksheetInfo); worksheet.PerformCalculation(); Session["Worksheet"] = worksheetInfo; return worksheetInfo; } catch (Exception e) { int i; return null; } }
public Worksheet(WorksheetInfo info) { this.Info = info; }