Exemple #1
0
        /// <summary>
        /// 修改:修改登录时间
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public int UpdateCustomerID(int id)
        {
            string sql = "update CustomerMusic set LastLoginTime=default where ID=" + id + "";

            if (id != 0)
            {
                return(Dbhelper.ExecQuery(sql));
            }
            else
            {
                return(0);
            }
        }
        /// <summary>
        /// 修改歌单背景图片
        /// </summary>
        /// <param name="pic">修改图片路径</param>
        /// <param name="id">歌单ID</param>
        /// <returns></returns>
        public int UpdateAlbu(string pic, int id)
        {
            string sql = "update Albummusic set ImageUrl='" + pic + "' where AlbumID='" + id + "'";

            if (id != 0)
            {
                return(Dbhelper.ExecQuery(sql));
            }
            else
            {
                return(0);
            }
        }
Exemple #3
0
 /// <summary>
 /// 方法:添加用户数据
 /// </summary>
 /// <param name="cus">操作对象</param>
 /// <returns>受影响行数</returns>
 public int InsterRegist(Model.CustomerMusic cus)
 {
     return(Dbhelper.ExecQuery("insert into CustomerMusic(UserName,UserPwd,Phone,Birthday,Sex,Email,LastLoginTime,Remark,[State],RankID) values('" + cus.UserName + "','" + cus.UserPwd + "','" + cus.Phone + "','" + cus.Birthday + "','" + cus.Sex + "','" + cus.Email + "',default,'',1,1)"));
 }
 /// <summary>
 /// 添加方法:创建新歌单
 /// </summary>
 /// <param name="cs"></param>
 /// <returns></returns>
 public int Insertalbudata(Model.Albummusic cs)
 {
     return(Dbhelper.ExecQuery("insert into Albummusic values('" + cs.AlbumName + "','" + cs.Albumabstract + "'," + cs.ID + ",default,0,default)"));
 }