Example #1
0
        /// <summary>
        /// 生成药理作用DataView,用于根据父节点过虑子节点
        /// </summary>
        /// <returns></returns>
        private DataView CreateDataView()
        {
            Neusoft.HISFC.BizLogic.Pharmacy.Constant pharmacyConstant = new Neusoft.HISFC.BizLogic.Pharmacy.Constant();
            DataTable myDataTable = new DataTable("tbFunction");
            DataRow   myDataRow;

            myDataTable.Columns.Add("NODE_CODE", typeof(String));
            myDataTable.Columns.Add("PARENT_NODE", typeof(String));
            myDataTable.Columns.Add("NODE_NAME", typeof(String));
            myDataTable.Columns.Add("NODE_KIND", typeof(int));
            foreach (Neusoft.HISFC.Models.Pharmacy.PhaFunction phafun in pharmacyConstant.QueryPhaFunction())
            {
                myDataRow = myDataTable.NewRow();
                myDataRow["PARENT_NODE"] = phafun.ParentNode;
                myDataRow["NODE_CODE"]   = phafun.ID;
                myDataRow["NODE_NAME"]   = phafun.Name;
                myDataRow["NODE_KIND"]   = phafun.NodeKind;
                myDataTable.Rows.Add(myDataRow);
            }
            DataView custDV = new DataView(myDataTable);

            return(custDV);
        }