예제 #1
0
        private void button_ok1_Click(object sender, EventArgs e)
        {
            string str;

            if (radioButton_yes1.Checked == true)
            {
                str = radioButton_yes1.Text;
            }
            else
            {
                str = radioButton_no1.Text;
            }
            string sql = "insert into 签到 (姓名,签到日期,签到时间,是否在校,寝室)values('" + comboBox_roomname.SelectedValue.ToString() + "','" + dateTimePicker1 + "','" + textBox_datetime0.Text + "','" + str + "','" + comboBox_roomno.SelectedValue.ToString() + "')";

            conn.Open();
            SqlCommand cmd = new SqlCommand(sql, conn);
            int        i   = cmd.ExecuteNonQuery();

            conn.Close();
            if (i > 0)
            {
                MessageBox.Show("提交信息成功!");
                room rm = new room();
                rm.roombind();
                @class cs = new @class();
                cs.classbind();
            }
        }
예제 #2
0
        private void linkLabel_class_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            @class cs = new @class();

            cs.Show();
        }