/// <summary> /// ���ڳ�ʼ���˵���� /// </summary> /// <param name="savelist">��¼���и��˵�ID</param> /// <returns></returns> public static purviewEntity[] getPanelida( ) { ArrayList list = new ArrayList(); purviewEntity purview = new purviewEntity(); string sql = "select * from enter_menu where parentid=0 "; using (SqlDataReader dr = SqlHelper.ExecuteReader(DataBll.conString.constr, CommandType.Text, sql)) { while (dr.Read()) { purview.Menuname = dr["menuname"].ToString(); purview.Id = Convert.ToInt32(dr["id"].ToString()); list.Add(purview); purview = new purviewEntity(); } } //(DataEntity.Ws_Data.Entity_Ws_Save[])array.ToArray(typeof(DataEntity.Ws_Data.Entity_Ws_Save)) return (purviewEntity[])list.ToArray(typeof(purviewEntity)); }
/// <summary> /// ���ڳ�ʼ���Ӳ˵���� /// </summary> /// <param name="pid"></param> /// <param name="savelist">��¼�����Ӳ˵�ID</param> /// <returns></returns> public static purviewEntity[] getChildida( string pid) { string sql = "select * from enter_menu where parentid=" + pid; ArrayList list = new ArrayList(); purviewEntity purview = new purviewEntity(); using (SqlDataReader dr = SqlHelper.ExecuteReader(DataBll.conString.constr, CommandType.Text, sql)) { while (dr.Read()) { purview.Id = Convert.ToInt32(dr["id"]); purview.Menuname = dr["menuname"].ToString(); list.Add(purview); purview = new purviewEntity(); } } return (purviewEntity[])list.ToArray(typeof(purviewEntity)); }