示例#1
0
        protected void grvQHNhanThan_InsertCommand(object sender, GridCommandEventArgs e)
        {
            GridEditableItem item   = e.Item as GridEditableItem;
            Hashtable        values = new Hashtable();

            item.ExtractValues(values);
            QuanHe tt = new QuanHe();

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