Exemplo n.º 1
0
        private void btnupdate_Click(object sender, EventArgs e)
        {
            //资料更新
            UserInfo u = new UserInfo();

            u.Uid      = _uid;
            u.Name     = this.labname.Text;
            u.Sex      = this.comboxsex.SelectedIndex;
            u.Birthday = this.labbirth.Text;
            u.Qq       = this.labqq.Text;
            u.Phone    = this.labphone.Text;
            u.Address  = this.labaddress.Text;
            u.Enable   = this.comboxEnable.SelectedIndex;
            u.Jobid    = _listjobid[this.comboxjobs.SelectedIndex];
            if (UserBLL.updateJobByUid(u) == 1)
            {
                MessageBox.Show("修改成功");
                _f.bind();
                this.Close();
            }
        }
Exemplo n.º 2
0
        private void btnadd_Click(object sender, EventArgs e)
        {
            //添加按钮点击
            UserInfo u = new UserInfo();

            u.Name      = txtName.Text;
            u.Sex       = comboxsex.SelectedIndex;
            u.Jobid     = _listJobs[comboxJob.SelectedIndex];
            u.Password  = txtPwd.Text;
            u.IsManager = comboxISadmin.SelectedIndex;
            u.Qq        = txtQQ.Text;
            u.Address   = txtAddress.Text;
            u.IdCard    = txtIDCARD.Text;
            u.Phone     = txtphone.Text;
            u.Birthday  = skinDateTimePicker1.Text;

            if (UserBLL.reg(u) == 1)
            {
                MessageBox.Show("添加成功");
                _f.bind();    //刷新
                this.Close();
            }
        }