Example #1
0
 public int update(yh_jinxiaocun_user user)
 {
     using (ServerEntities sen = new ServerEntities())
     {
         string sql = "update yh_jinxiaocun_user set name = '" + user.name + "',password = '******',gongsi = '" + user.gongsi + "',AdminIS = '" + user.AdminIS + "' where _id = '" + user._id + "'";
         return(sen.Database.ExecuteSqlCommand(sql));
     }
 }
Example #2
0
 public int add(yh_jinxiaocun_user user)
 {
     using (ServerEntities sen = new ServerEntities())
     {
         string sql = "insert into yh_jinxiaocun_user(name,password,_id,gongsi,AdminIS,Btype) values('" + user.name + "','" + user.password + "','" + user._id + "','" + user.gongsi + "','" + user.AdminIS + "','" + user.Btype + "')";
         return(sen.Database.ExecuteSqlCommand(sql));
     }
 }