Beispiel #1
0
        /// <summary>
        /// 批量删除方法
        /// </summary>
        /// <param name="list"></param>
        /// <returns></returns>
        public static bool DelMovie(List <UserInfoModel> list)
        {
            string sql = "";

            foreach (UserInfoModel model in list)
            {
                sql += "delete from Product where ProductID=" + model.ProductID + ";";
            }
            return(DBHelper.ExcuteSql(sql));
        }
Beispiel #2
0
        /// <summary>
        /// 根据Id删除
        /// </summary>
        /// <param name="Pid"></param>
        /// <returns></returns>
        public static bool DeleteById(int Pid)
        {
            string sql = string.Format("delete from Product where ProductID={0}", Pid);

            return(DBHelper.ExcuteSql(sql));
        }