Пример #1
0
        private void btnThem_Click(object sender, EventArgs e)
        {
            FrLstTacGiaEdit frm = new FrLstTacGiaEdit();

            frm.Tag = ""; //Tín hiệu cho biết thêm mới
            frm.ShowDialog();
            HienThiLstTacGia(GrTG);
        }
Пример #2
0
        private void btnSua_Click(object sender, EventArgs e)
        {
            FrLstTacGiaEdit fr = new FrLstTacGiaEdit();

            fr     = new FrLstTacGiaEdit();
            fr.Tag = this.GrTG.CurrentRow.Cells["Ma_TacGia"].Value.ToString(); //Tín hiệu sửa
            fr.txtMaTacGia.Text  = this.GrTG.CurrentRow.Cells["Ma_TacGia"].Value.ToString();
            fr.txtTenTacGia.Text = this.GrTG.CurrentRow.Cells["Ten_TacGia"].Value.ToString();
            fr.txtDiaChi.Text    = this.GrTG.CurrentRow.Cells["Dia_Chi"].Value.ToString();
            fr.txtNS.Text        = this.GrTG.CurrentRow.Cells["Ngay_Sinh"].Value.ToString().Substring(0, 10);
            fr.ShowDialog();
            HienThiLstTacGia(GrTG);
        }