Пример #1
0
        public bool Update(ThuChiCSDL obj)
        {
            try
            {
                var thuChi = db.ThuChiCSDLs.Find(obj.ID);
                thuChi.Ten    = obj.Ten;
                thuChi.Sotien = obj.Sotien;
                thuChi.Ngay   = obj.Ngay;

                db.SaveChanges();
                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }
Пример #2
0
 public long Insert(ThuChiCSDL obj)
 {
     db.ThuChiCSDLs.Add(obj);
     db.SaveChanges();
     return(obj.ID);
 }