Ejemplo n.º 1
0
        private void dgvkm_Click(object sender, EventArgs e)
        {
            DTO_KhuyenMai km = busKM.curKM(dataGridView1.CurrentRow.Cells["TenKM"].Value.ToString());

            txtMaKM.Text      = km.MaKM;
            txtTenKM.Text     = km.TenKM;
            txtChietKhau.Text = km.ChietKhau.ToString();

            dtpNgBD.Text = km.NgayBD.ToString();
            dtpNgKT.Text = km.NgayKT.ToString();

            txtMaKM.Enabled      = true;
            txtTenKM.Enabled     = true;
            txtChietKhau.Enabled = true;
            dtpNgBD.Enabled      = true;
            dtpNgKT.Enabled      = true;
            btCapNhat.Enabled    = true;
            btXoa.Enabled        = true;
            btLuu.Enabled        = false;
        }
Ejemplo n.º 2
0
        private void cbKhuyenMai_SelectedIndexChanged(object sender, EventArgs e)
        {
            km = busKM.curKM(cbTenKM.SelectedItem.ToString());

            lbChietKhau.Text = km.ChietKhau.ToString() + "%";
        }