internal void Save() { ContacterMapper contacterMapper = new ContacterMapper(); Contacter c = new Contacter(); c.MAC = this.User.ID; c.IP = this.User.IP == null ? "0.0.0.0" : this.User.IP.ToString(); c.NickName = this.User.NickName; contacterMapper.Add(c); }
private void LoadContacters() { ContacterMapper mapper = new ContacterMapper(); List <Contacter> cs = mapper.Query(); foreach (Contacter contacter in cs) { LanUser user = new LanUser(); user.Contacter = contacter; _user.Contacters.Add(user); } }
private void label2_Click(object sender, EventArgs e) { ContacterMapper contacterMapper = new ContacterMapper(); Contacter c = new Contacter(); c.MAC = this._user.MAC; c.Memo = this.textBoxMemo.Text; contacterMapper.UpdateMemo(c); _user.Memo = textBoxMemo.Text; }
internal void Update() { ContacterMapper contacterMapper = new ContacterMapper(); contacterMapper.Update(this.User.Contacter); }