Esempio n. 1
0
        protected void grvTonGiao_InsertCommand(object sender, GridCommandEventArgs e)
        {
            GridEditableItem item   = e.Item as GridEditableItem;
            Hashtable        values = new Hashtable();

            item.ExtractValues(values);
            TonGiao tg = new TonGiao();

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