示例#1
0
        private void btn_luu_Click(object sender, EventArgs e)
        {
            try
            {
                if ((txt_tuoilon.Text != "") && (txt_tuoinho.Text != ""))
                {
                    QLHS_BUS bus = new QLHS_BUS();
                    bus.CapNhatTuoi(Int32.Parse(txt_tuoinho.Text), Int32.Parse(txt_tuoilon.Text));
                    MessageBox.Show("Cập nhật thành công số tuổi quy định", "Thông báo");
                }
                else
                {
                    MessageBox.Show("Cập nhật không thành công! Mời bạn xem lại dữ liệu nhập! ", "Thông báo");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Mời nhập lại!");
            }

            txt_tuoinho.Text    = "";
            txt_tuoilon.Text    = "";
            txt_tuoinho.Enabled = false;
            txt_tuoilon.Enabled = false;
            btn_diem.Enabled    = true;
            btn_siso.Enabled    = true;
            btn_tuoi.Visible    = true;
            btn_luu.Visible     = false;
        }