/// <summary> /// 绑定到单据 /// </summary> private void BindTypeCode() { DataTable dt = ApprovalFlowSetBus.GetBillTypeByTypeFlag(this.hf_typeflag.Value); if (dt.Rows.Count > 0) { drp_typecode.DataTextField = "TypeName"; drp_typecode.DataValueField = "TypeCode"; drp_typecode.DataSource = dt; drp_typecode.DataBind(); } }
private void BindTreeChildNodes(TreeNode node, string flag) { DataTable dt = ApprovalFlowSetBus.GetBillTypeByTypeFlag(flag); if (dt != null && dt.Rows.Count > 0) { foreach (DataRow Row in dt.Rows) { TreeNode nodes = new TreeNode(); nodes.Text = Row["TypeName"].ToString(); nodes.Value = Row["TypeCode"].ToString(); nodes.ShowCheckBox = true; node.ChildNodes.Add(nodes); } } }