private void DataBindSheet(string modifyId) { List <int> list = new List <int>(); StringBuilder stringBuilder = new StringBuilder(); DataTable sheet = this.incometModifyBll.GetSheet(modifyId); foreach (DataRow dataRow in sheet.Rows) { int num = Convert.ToInt32(dataRow["TechnologyId"]); list.Add(num); string sheetNameById = this.incometModifyBll.GetSheetNameById(num); stringBuilder.Append(sheetNameById).Append(","); } ISerializable serializable = new cn.justwin.Serialize.JsonSerializer(); this.hfldSheetId.Value = serializable.Serialize <int[]>(list.ToArray()); this.txtSheetName.Value = stringBuilder.ToString(); }
public static string JsonSerializer <T>(T t) { cn.justwin.Serialize.JsonSerializer serializer = new cn.justwin.Serialize.JsonSerializer(); return(serializer.Serialize <T>(t)); }