Пример #1
0
        private void bt_sua_Click(object sender, EventArgs e)
        {
            ThamSoDTO ts = new ThamSoDTO();

            ts.MaTS1      = textBox_MaTS.Text;
            ts.TenThamSo1 = textBox_TenTS.Text;
            ts.GiaTri1    = int.Parse(textBox_GiaTri.Text);
            tsbus         = new ThamSoBUS();
            bool kq = tsbus.sua(ts);

            if (kq == false)
            {
                MessageBox.Show("Sữa bệnh nhân thất bại. Vui lòng kiểm tra lại dũ liệu");
            }
            else
            {
                MessageBox.Show("Sữa bệnh nhân thành công");
            }
            bt_sua.Visible          = true;
            textBox_TenTS.ReadOnly  = true;
            textBox_GiaTri.ReadOnly = true;
            bt_luu.Visible          = false;
            bt_Huy.Visible          = false;
            dataGridView1.Enabled   = false;
        }