public User.UserData getCurUser() { User.UserData data = null; //p_get_user_of_device try { using (MySqlConnection conn = new MySqlConnection(App.setting.connectString)) { conn.Open(); string query = "`p_get_user_of_device`"; using (MySqlCommand cmd = new MySqlCommand(query, conn)) { cmd.Parameters.Add(new MySqlParameter("@_device_id", MySqlDbType.Int32) { Direction = System.Data.ParameterDirection.Input, Value = this.ID }); cmd.CommandType = System.Data.CommandType.StoredProcedure; cmd.ExecuteScalar(); using (MySqlDataReader reader = cmd.ExecuteReader()) { data = reader.toUser(); } }; conn.Close(); }; } catch (Exception) { } return(data); }
public TreeViewItem(string fileName, string FullPath, User.UserData udata) { this.fileName = this.Header = fileName; this.FullPath = FullPath; this.isDir = false; this.udata = udata; Items = new List <Foundation.NSObject>(); }
protected override XElement[] Do(WebContext context) { User.UserData newData = new User.UserData { location = context.httprequest.Form["location"].Trim(), title = context.httprequest.Form["title"].Trim(), signatureUbb = context.httprequest.Form["signature"].Trim(), biographyUbb = context.httprequest.Form["biography"].Trim(), }; context.account.user.UpdateData(newData); return new XElement[0]; }
protected override XElement[] Do(WebContext context) { User.UserData newData = new User.UserData { location = context.httprequest.Form["location"].Trim(), title = context.httprequest.Form["title"].Trim(), signatureUbb = context.httprequest.Form["signature"].Trim(), biographyUbb = context.httprequest.Form["biography"].Trim(), }; context.account.user.UpdateData(newData); return(new XElement[0]); }