private void init() { billBeanList = new BillBeanList(); settings = new JsonSerializerSettings(); settings.DateFormatString = BillConfig.timestring; settings.NullValueHandling = NullValueHandling.Ignore; errorDetail = ""; resultDT = new DataTable(); total = 0; }
/// <summary> /// 测试调用方法 /// </summary> /// <returns></returns> public static String execTest() { BillBean bb = new BillBean(); bb.bizDate = DateTime.Now; bb.adminOrgUnit = new BillObject("123"); bb.number = "456"; BillEntryToken bet = new BillEntryToken(); bet.material = new BillObject("789"); bet.qty = 10; bb.entry.Add(bet); BillBeanList bbl = new BillBeanList(); bbl.Add(bb); String result = JsonConvert.SerializeObject(bbl); return(result); }