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