public bool insertUserInfo(DAO.UserInfoDao dao) { string sql = "insert into t_user(`name`,`password`,usertype,status) values " + " ('" + dao.Name + "','" + dao.Pwd + "',(select itemvalue from t_itemcollection where itemname='" + dao.Usertype + "'),0) "; return(this.InsertQuery(sql)); }
public bool updateUserInfo(string id, DAO.UserInfoDao dao) { string sql = "update t_user set `name`='" + dao.Name + "',usertype=(select itemvalue from t_itemcollection where itemname='" + dao.Usertype + "'),`status`=(select itemvalue from t_itemcollection where itemname='" + dao.State + "') where id=" + id + " "; return(this.updateQuery(sql)); }