Example #1
0
        private void btnThem_Click(object sender, EventArgs e)
        {
            FormLoaiDichVu_AddUpd form = new FormLoaiDichVu_AddUpd();
            DialogResult          dr   = form.ShowDialog();

            dataGridView.DataSource = loaidichvu_bus.LayTatCa();
        }
Example #2
0
        private void btnSua_Click(object sender, EventArgs e)
        {
            if (txtMaLoaidv.Text.CompareTo("") == 0)
            {
                MessageBox.Show("Vui lòng chọn dòng dữ liệu muốn Sửa !");
            }
            else
            {
                LoaiDichVu_DTO loaidv = new LoaiDichVu_DTO();
                loaidv.MaLoaiDV  = Int16.Parse(txtMaLoaidv.Text);
                loaidv.TenLoaiDV = txtTenLoaidv.Text;
                loaidv.DonGia    = Decimal.Parse(txtDonGia.Text);


                FormLoaiDichVu_AddUpd form = new FormLoaiDichVu_AddUpd(loaidv);
                DialogResult          dr   = form.ShowDialog();
                dataGridView.DataSource = loaidichvu_bus.LayTatCa();
            }
        }