Ejemplo n.º 1
0
        private void rdomale_Load(object sender, EventArgs e)
        {
            StudentInfoDate data = new StudentInfoDate();

            data.Sno = txtSno.Text;
            if (rdoman.Checked)
            {
                data.Sex = rdoman.Text;
            }
            else
            {
                data.Sex = rdowoman.Text;
            }
            data.Brithday = txtBirthday.Text;
            data.Classid  = txtSno.Text;
            data.Tel      = txtTel.Text;
            data.Address  = txtAddress.Text;

            if (txtSno.Text == "" || txtSno.Text == null)
            {
                MessageBox.Show("学号不能为空");
                txtSno.Focus();
                return;
            }
            Classes.StudentInfoOperation op = new Classes.StudentInfoOperation();
            if (op.InertStudentInfo(data))
            {
                MessageBox.Show("插入成功");
            }
            else
            {
                MessageBox.Show("插入失败");
            }
        }
Ejemplo n.º 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            StudentInfoDate data = new StudentInfoDate();

            data.Sno     = txtSno1.Text;
            data.Sname   = txtSname1.Text;
            data.Sex     = txtSex.Text;
            data.Classid = txtClassid1.Text;
            data.Address = txtAddress1.Text;
            data.Tel     = txtTel1.Text;
        }
Ejemplo n.º 3
0
        DataSet Bind()
        {
            StudentInfoDate data = new StudentInfoDate();

            data.Sno     = txtSno.Text;
            data.Sname   = txtSname.Text;
            data.Sex     = txtSex.Text;
            data.Classid = txtClass.Text;
            Classes.StudentInfoOperation op = new Classes.StudentInfoOperation();
            ds = op.GetStudentInfo(data);
            return(ds);
        }