/// <summary>
        /// 保存设置
        /// </summary>
        /// <returns></returns>
        private int Save()
        {
            //{FF5503FA-0057-413e-BF08-5A8C1DCF7ED8} 有效性校验  更改实体获取方式
            if (this.IsDataValid() == false)
            {
                return(-1);
            }

            //实体初始化
            this.functionObject = new Neusoft.HISFC.Models.Pharmacy.PhaFunction();

            this.GetPhaFunction();
            //{FF5503FA-0057-413e-BF08-5A8C1DCF7ED8}

            //判断是否有子节点
            ArrayList al = new ArrayList();

            al = pharmacyConstant.QueryFunctionByParentNode(functionObject.ID);
            if (al != null)
            {
                int ifleave = al.Count;
                if (ifleave > 0)                 //有子节点   用于排序
                {
                    functionObject.NodeKind = 1; //叶子节点
                }
                else
                {
                    functionObject.NodeKind = 0;//非叶子节点
                }
            }
            else
            {
                functionObject.NodeKind = 0;//非叶子节点
            }

            //判断是否重复
            if (this.operKind == "INSERT")//插入
            {
                int       i     = 0;
                ArrayList alfun = new ArrayList();
                alfun = pharmacyConstant.QueryFunctionByNode(functionObject.ID);
                if (alfun != null)
                {
                    i = alfun.Count;
                    if (i >= 1)
                    {
                        MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("该节点编号") + this.txtCode.Text.Trim() + Neusoft.FrameWork.Management.Language.Msg("已存在!"), "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);      //节点已存在的不能再插入
                        return(-1);
                    }
                }
            }
            ////增,删,改操作
            try
            {
                if (pharmacyConstant.SetFunction(functionObject, this.operKind) == -1)
                {
                    MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("更新药理作用信息失败"), "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return(-1);
                }
                return(0);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                return(-1);
            }
        }