// private string GetComno(HttpContext context) { try { SysLogBll.Create("出让/受让方", "返回上传指标类型combo数据操作", adminUser.AdminName); StringBuilder strb = new StringBuilder(); strb.Append("["); DataTable dataTable = null; int LiceTranId = 0; try { LiceTranId = int.Parse(context.Request.QueryString["LiceTranId"]); } catch { } dataTable = dal.GetComnoData(LiceTranId); for (int i = 0; i < dataTable.Rows.Count; i++) { strb.Append("{\"id\":\"" + dataTable.Rows[i]["Id"] + "\", \"text\":\"" + dataTable.Rows[i]["TypeIndicatorName"] + "\"}"); if (i < dataTable.Rows.Count - 1) { strb.Append(","); } } strb.Append("]"); return(strb.ToString()); } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return(string.Empty); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string strid = Request.QueryString["p"]; NCPEP.Dal.LiceTranDal dal = new LiceTranDal(); DataTable dt = dal.GetComnoData(int.Parse(strid)); this.txtFK_UploadTypeIndicatorId.DataSource = dt; this.txtFK_UploadTypeIndicatorId.DataTextField = "TypeIndicatorName"; this.txtFK_UploadTypeIndicatorId.DataValueField = "id"; this.txtFK_UploadTypeIndicatorId.DataBind(); } }