Пример #1
0
        protected virtual void Init()
        {
            person = Neusoft.FrameWork.Management.Connection.Operator as Neusoft.HISFC.Models.Base.Employee;
            if (person == null)
            {
                return;
            }
            curGroup = new Neusoft.HISFC.Models.Admin.SysGroup();
            if (person.IsManager)
            {
                curGroup.ID               = "ROOT";
                curGroup.Name             = "系统组";
                curGroup.ParentGroup.ID   = "ROOT";
                curGroup.ParentGroup.Name = "ROOT";
            }
            else
            {
                curGroup.ID   = person.CurrentGroup.ID;
                curGroup.Name = person.CurrentGroup.Name;
            }

            this.HideSelection = false;

            TreeNode node = new TreeNode(curGroup.Name);

            node.ImageIndex         = 2;
            node.SelectedImageIndex = 3;
            node.Tag = curGroup;
            this.Nodes.Add(node);
        }
Пример #2
0
        private string[] mySetInfo(object obj)
        {
            string[] s = new string[8];
            Neusoft.HISFC.Models.Admin.SysGroup o = obj as Neusoft.HISFC.Models.Admin.SysGroup;
            try
            {
                s[0] = o.ID;               //id
            }
            catch {}
            try
            {
                s[1] = o.Name;               //name
            }
            catch {}
            try
            {
                s[2] = o.ParentGroup.ID;              //
            }
            catch {}
            try
            {
                s[3] = o.ParentGroup.Name;
            }
            catch {}
            try
            {
                s[4] = o.Memo;
            }
            catch {}
            try
            {
                s[5] = o.SortID.ToString();
            }
            catch {}
            try
            {
                s[6] = this.Operator.ID;               //
            }
            catch {}
            try
            {
                s[7] = this.Operator.Name;              //operator naem
            }
            catch {}
//			try
//			{
//				s[8]=this.Operator.Name ;//operator name
//			}
//			catch{}
//			try
//			{
//				//s[9] = this.GetSysDate();//operator time
//			}
//			catch{}
            return(s);
        }
Пример #3
0
        private void SearchParentNode(TreeNode rootNode, object obj, ref TreeNode rtnNode)
        {
            foreach (TreeNode node in rootNode.Nodes)
            {
                Neusoft.HISFC.Models.Admin.SysGroup o = node.Tag as Neusoft.HISFC.Models.Admin.SysGroup;

                this.SearchParentNode(node, obj, ref rtnNode);

                if (o != null)
                {
                    try
                    {
                        if (o.ID == ((Neusoft.HISFC.Models.Admin.SysGroup)obj).ParentGroup.ID)
                        {
                            rtnNode = node;
                        }
                    }
                    catch { }
                }
            }
        }
Пример #4
0
        /// <summary>
        /// 获得人员的组
        /// </summary>
        /// <param name="PersonID"></param>
        /// <returns></returns>
        public ArrayList GetPersonGroupList(string PersonID)
        {
            string sql = "";

            //接口说明 0 id ,1 name
            if (this.Sql.GetSql("Manager.UserManager.GetPersonGroupList", ref sql) == -1)
            {
                return(null);
            }
            sql = string.Format(sql, PersonID);

            if (this.ExecQuery(sql) == -1)
            {
                return(null);
            }

            ArrayList al = new ArrayList();

            while (this.Reader.Read())
            {
                Neusoft.HISFC.Models.Admin.SysGroup obj = new Neusoft.HISFC.Models.Admin.SysGroup();
                try
                {
                    obj.ID               = this.Reader[0].ToString();
                    obj.Name             = this.Reader[1].ToString();
                    obj.Memo             = this.Reader[3].ToString();
                    obj.ParentGroup.ID   = this.Reader[4].ToString();
                    obj.ParentGroup.Name = this.Reader[5].ToString();
                }
                catch
                {}
                al.Add(obj);
            }

            this.Reader.Close();
            return(al);
        }
Пример #5
0
        /// <summary>
        /// 获得列表
        /// </summary>
        /// <param name="sql"></param>
        /// <returns></returns>
        private ArrayList myList(string sql)
        {
            if (this.ExecQuery(sql) == -1)
            {
                return(null);
            }
            ArrayList al = new ArrayList();

            #region "接口"
            //接口名称Manager.SysGroup.Select
            //<!--0 id, 1 name, 2 groupid, 3 groupname, 4 memo, 5 sortid,6 operator id,
            //	 7 name,8 operator time -->
            #endregion
            try
            {
                while (this.Reader.Read())
                {
                    Neusoft.HISFC.Models.Admin.SysGroup obj = new Neusoft.HISFC.Models.Admin.SysGroup();

                    try
                    {
                        obj.ID = this.Reader[0].ToString();                      //id
                    }
                    catch
                    {}
                    try
                    {
                        obj.Name = this.Reader[1].ToString();                       //name
                    }
                    catch
                    {}
                    try
                    {
                        obj.ParentGroup.ID = this.Reader[2].ToString();                       //parent id
                    }
                    catch
                    {}
                    try
                    {
                        obj.ParentGroup.Name = this.Reader[3].ToString();                       //parent name
                    }
                    catch
                    {}
                    try
                    {
                        obj.Memo = this.Reader[4].ToString();                        //备注
                    }
                    catch
                    {}

                    try
                    {
                        obj.SortID = Neusoft.FrameWork.Function.NConvert.ToInt32(this.Reader[5]);                      //sortid
                    }
                    catch
                    {}
                    try
                    {
                        obj.User01 = this.Reader[6].ToString();                       //operator id
                    }
                    catch
                    {}
                    try
                    {
                        obj.User02 = this.Reader[7].ToString();                       //operator name
                    }
                    catch
                    {}
                    try
                    {
                        obj.User03 = this.Reader[8].ToString();                       //operator time
                    }
                    catch
                    {}
                    al.Add(obj);
                }
                this.Reader.Close();
                return(al);
            }
            catch { return(null); }
        }