/// <summary> /// Add/Update SubMenu /// </summary> /// <returns></returns> public static bool AddUpdateSubMenu(SubMenu entity) { var sqlSubMenu = new SqlSubMenu(); bool isAddUpdated = sqlSubMenu.AddUpdateSubMenu(entity); return(isAddUpdated); }
/// <summary> /// Deletes an SubMenu from the database based on SubMenu Id. /// </summary> /// <param name="dtSubMenuId"></param> /// <returns>Returns true if delete is successful, else false.</returns> /// <remarks>Deletes based on primary key(s).</remarks> public static bool DeleteSubMenu(DataTable dtSubMenuId) { if (dtSubMenuId.Rows.Count > 0) { SqlSubMenu sqlSubMenu = new SqlSubMenu(); return(sqlSubMenu.DeleteSubMenu(dtSubMenuId)); } return(false); }
/// <summary> /// Get the Sub Menus by Role . /// </summary> /// <returns>Collection of SubMenu.</returns> public static IList <SubMenu> GetSubMenusByRole(int id, int roleId) { var sqlSubMenu = new SqlSubMenu(); return(sqlSubMenu.GetSubMenusByRole(id, roleId)); }
/// <summary> /// Get the SubMenu. /// </summary> /// <returns>Collection of SubMenu.</returns> public static SubMenu GetSubMenu(int id, bool?isAddPage = null) { var sqlSubMenu = new SqlSubMenu(); return(sqlSubMenu.GetSubMenu(id, isAddPage)); }
/// <summary> /// Get the SubMenu. /// </summary> /// <returns>Collection of SubMenu.</returns> public static IList <SubMenu> GetSubMenus() { var sqlSubMenu = new SqlSubMenu(); return(sqlSubMenu.GetSubMenus()); }