private void assignHV(List<decimal> ip_lst_id_lop, decimal ip_so_luong_hv) { decimal v_id_lop = ip_lst_id_lop[0]; var v_lst = GetSelectedRows(m_grv); for (int i = 0; i < v_lst.Count; i++) { US_GD_DIEM v_us = new US_GD_DIEM(); var v_data_row = m_grv.GetDataRow(v_lst[i]); v_us.dcID_LOP_MON = ip_lst_id_lop[(int)(i / ip_so_luong_hv)]; v_us.dcID_NHAN_VIEN = CIPConvert.ToDecimal(v_data_row[0].ToString()); v_us.strQUA_MON = "N"; v_us.strHOC_XONG_YN = "N"; v_us.strDA_XOA = "N"; v_us.datNGAY_LAP = DateTime.Now.Date; v_us.datNGAY_SUA = DateTime.Now.Date; updateNhanVienMonHoc(v_us.dcID_NHAN_VIEN); v_us.Insert(); } }