Ejemplo n.º 1
0
 public User GetUser(string nickName)
 {
     DataTable dt=new DBSqlHelper().ExecuteDataTable("select * from [user] where nickname='"+nickName+"'");
        return new User {
         ID=Convert.ToInt32(dt.Rows[0]["ID"]),
          Name=dt.Rows[0]["Name"].ToString(),
          NickName=dt.Rows[0]["NickName"].ToString()
        };
 }
Ejemplo n.º 2
0
 public ResponseMessageUser GetUser(RequestMessageUser id)
 {
     DataTable dt= new DBSqlHelper().ExecuteDataTable("select * from [user] where id='"+id.ID+"'");
     return new ResponseMessageUser
     {
         Index = 0,
       user=  new User { Name = dt.Rows[0]["Name"].ToString() }
     };
 }