Ejemplo n.º 1
0
        public static bool Update(YF.Mode.User user)
        {
            bool result = false;

            string strsql = "update _user set rename='" + user.Rename + "',sex=" + user.Sex + ",email='" + user.Email + "',phone='" + user.Phone + "',address='" + user.Address + "',password='******' where id=" + user.Id + "";

            int i = YF.MsSqlHelper.YFMsSqlHelper.ExecuteSql(strsql);//执行删除语句,失败返回0

            if (i > 0)
            {
                result = true;
            }

            return(result);
        }
Ejemplo n.º 2
0
        //添加用户
        public static bool add(YF.Mode.User user)
        {
            bool result = false;

            string strsql = "insert into _user (name,rename,sex,email,phone,address,password) values ('" + user.Name + "','" + user.Rename + "'," + user.Sex + ",'" + user.Email + "','" + user.Phone + "','" + user.Address + "','" + user.Password + "')";

            int i = YF.MsSqlHelper.YFMsSqlHelper.ExecuteSql(strsql);//执行插入语句,失败返回0

            if (i > 0)
            {
                result = true;
            }

            return(result);
        }
Ejemplo n.º 3
0
 public static bool Update(YF.Mode.User user)//修改用户系信息
 {
     return(YF.DAL.User.Update(user));
 }
Ejemplo n.º 4
0
 public static bool add(YF.Mode.User user)//添加
 {
     return(YF.DAL.User.add(user));
 }