示例#1
0
        // 物理删除由主键userID指定的一条记录 DeleteUsers
        public bool Delete(int userID)
        {
            UsersDelete exec = new UsersDelete();

            try
            {
                exec.UserID = userID;
                exec.ExecNoQuery();
                return(true);
            }
            catch (Exception ex)
            {
                //throw ex;
                return(false);
            }
            finally
            {
                exec = null;
            }
        }
示例#2
0
        // 公用静态方法,删除一条记录 DeleteUsers
        public static bool DeleteEntity(UsersBusEntity obj)
        {
            if (obj == null || obj.IsEmpty)
            {
                return(false);
            }
            UsersDelete exec = new UsersDelete();

            try
            {
                exec.ReceiveParameter(obj);
                exec.ExecNoQuery();
                return(true);
            }
            catch (Exception ex)
            {
                //throw ex;
                return(false);
            }
            finally
            {
                obj = null;
            }
        }