void dgvEditCt_CellValidated(object sender, DataGridViewCellEventArgs e) { //Cai dat cac ham tinh toan dgvVoucher dgvEditCt = (dgvVoucher)sender; if (this.ActiveControl != dgvEditCt) { return; } drCurrent = ((DataRowView)bdsEditCt.Current).Row; DataGridViewCell dgvCell = ((dgvVoucher)sender).CurrentCell; string strColumnName = dgvCell.OwningColumn.Name.ToUpper(); if (Common.Inlist(strColumnName, "SO_LUONG9")) { Update_Gia_Vt(drCurrent); } if (Common.Inlist(strColumnName, "SO_LUONG9,GIA_NT9,TIEN_NT9,TIEN")) { Voucher.Calc_So_Luong(drCurrent); Voucher.Update_TTien(this); } else if (Common.Inlist(strColumnName, "TIEN")) { Voucher.Calc_Tien(drCurrent); Voucher.Update_TTien(this); } bdsEditCt.EndEdit(); //Cap nhat lai DataSource }