示例#1
0
        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);
        }
示例#2
0
        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);
            }
        }
示例#3
0
        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;
        }
示例#4
0
        internal void Update()
        {
            ContacterMapper contacterMapper = new ContacterMapper();

            contacterMapper.Update(this.User.Contacter);
        }