protected void grvDanTocs_InsertCommand(object sender, GridCommandEventArgs e) { GridEditableItem item = e.Item as GridEditableItem; Hashtable values = new Hashtable(); item.ExtractValues(values); DanToc dt = new DanToc(); dt.NguoiTao = dt.NguoiCapNhat = idNhanVien; dt.NgayTao = dt.NgayCapNhat = DateTime.Now; item.UpdateValues(dt); _entities.AddToDanTocs(dt); _entities.SaveChanges(); }