예제 #1
0
        protected void grvQuocTich_InsertCommand(object sender, GridCommandEventArgs e)
        {
            GridEditableItem item   = e.Item as GridEditableItem;
            Hashtable        values = new Hashtable();

            item.ExtractValues(values);
            QuocTich qt = new QuocTich();

            qt.NgayTao  = qt.NgayCapNhat = DateTime.Now;
            qt.NguoiTao = qt.NguoiCapNhat = idNhanVien;
            item.UpdateValues(qt);
            _entities.AddToQuocTiches(qt);
            _entities.SaveChanges();
        }