/// <summary> /// 排序 - 向上 /// </summary> /// <param name="id"></param> /// <param name="ln">LINENO</param> public void sortUp(string id) { // ADOSystem_Menu.sortUp(id); //string sql = " SELECT TOP 1 menu_id,Menu_Order FROM system_menu WHERE Menu_Order<" + int.Parse(id.Split(',')[1]) + " AND Menu_Location='top' ORDER BY Menu_Order"; string[] ids = id.Split(','); if (ids.Count() > 0) { string filter = @"Menu_Order<{0} AND Menu_Location='top' ORDER BY Menu_Order "; List <System_Menu> list = instance.GetListByWhere(string.Format(filter, ids[1])); System_Menu firstModel = list[0]; System_Menu F1_Model = instance.GetByKey(int.Parse(ids[0])); //System_Menu F2_Model = instance.GetByKey(int.Parse(ids[1])); } }
/// <summary> /// 根据条件获取List /// </summary> /// <param name='strCondition'>条件(' AND Code='11'')</param> /// <returns>list</returns> public List <System_Menu> GetListByCode(string strCondition) { return(instance.GetListByWhere(strCondition)); }
/// <summary> /// 获取菜单数据 /// </summary> /// <param name="location"></param> /// <returns></returns> public List <System_Menu> GetMenu(string location) { List <System_Menu> list = instance.GetListByWhere(" AND Menu_Location='" + location + "' AND Menu_Enable='Enable' ORDER BY Menu_Order ASC "); return(list); }