public bool DeleteEntityByID(int ID) { return(CurrentDBSession.ExcuteSQL("DELETE Account WHERE ID=@ID", new SqlParameter("@ID", ID)) > 0); }
public bool DeleteRolePermissions(int RoleID) { string SQLString = "DELETE RoleActionURL_Mapping WHERE RoleID=@RoleID"; return(CurrentDBSession.ExcuteSQL(SQLString, new System.Data.SqlClient.SqlParameter("@RoleID", RoleID)) > 0); }
/// <summary> /// 添加角色权限对应 /// </summary> /// <param name="RoleID"></param> /// <param name="ActionURLID"></param> /// <returns></returns> public bool InsertRolePermissions(int RoleID, int ActionURLID) { string SQLString = "INSERT INTO RoleActionURL_Mapping(RoleID,ActionURLID) VALUES(@RoleID,@ActionURLID)"; return(CurrentDBSession.ExcuteSQL(SQLString, new SqlParameter[] { new SqlParameter("@RoleID", RoleID), new SqlParameter("@ActionURLID", ActionURLID) }) > 0); }