private string getDocument() { string code = Request.Form["code"]; DataTable dt = ReimbursementManage.findByCode(code); foreach (DataRow dr in dt.Rows) { dr["remark"] = SqlHelper.DesDecrypt(dr["remark"].ToString()); } return(JsonHelper.DataTable2Json(dt)); }
public string dataEchoed() { string docCode = Request.Form["docCode"]; DataTable dt = ReimbursementManage.findByCode(docCode); foreach (DataRow dr in dt.Rows) { dr["remark"] = SqlHelper.DesDecrypt(dr["remark"].ToString()); } // 再获取知悉人和图片 DataTable informerDt = MobileReimburseManage.findInformerByCode(docCode).Tables[0]; string informerId = informerDt.Rows[0]["userId"].ToString(); string informerName = informerDt.Rows[0]["userName"].ToString(); dt.Columns.Add("informerId", Type.GetType("System.String")); dt.Columns.Add("informerName", Type.GetType("System.String")); dt.Rows[0]["informerId"] = informerId; dt.Rows[0]["informerName"] = informerName; DataTable attachmentDt = MobileReimburseManage.findInformerByCode(docCode).Tables[1]; dt.Columns.Add("attachmentUrl", Type.GetType("System.String")); dt.Rows[0]["attachmentUrl"] = attachmentDt.Rows[0]["url"].ToString(); // 明细数据回调 DataTable tempDt = SqlHelper.Find(string.Format("select * from yl_reimburse_detail where code = '{0}'", docCode)).Tables[0]; dt.Columns.Add("reimburseDetail", Type.GetType("System.String")); dt.Rows[0]["reimburseDetail"] = JsonHelper.SerializeObject(tempDt); return(JsonHelper.DataTable2Json(dt)); }