Ejemplo n.º 1
0
        private void btnThem_Click(object sender, EventArgs e)
        {
            FormThoGiaCong_AddUpd form = new FormThoGiaCong_AddUpd();
            DialogResult          dr   = form.ShowDialog();

            dataGridView.DataSource = ThoGiaCong_bus.LayTatCa();
        }
Ejemplo n.º 2
0
        private void btnSua_Click(object sender, EventArgs e)
        {
            if (txtMaTho.Text.CompareTo("") == 0)
            {
                MessageBox.Show("Vui lòng chọn dòng dữ liệu muốn Sửa !");
            }
            else
            {
                ThoGiaCong_DTO tho = new ThoGiaCong_DTO();
                tho.MaTho  = Int16.Parse(txtMaTho.Text);
                tho.TenTho = txtTenTho.Text;
                tho.DiaChi = txtDiaChi.Text;
                tho.SDT    = txtSodt.Text;

                FormThoGiaCong_AddUpd form = new FormThoGiaCong_AddUpd(tho);
                DialogResult          dr   = form.ShowDialog();
                dataGridView.DataSource = ThoGiaCong_bus.LayTatCa();
            }
        }