Пример #1
0
        public bool Update(ThuChi obj)
        {
            try
            {
                var thuChi = db.ThuChi.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(ThuChi obj)
 {
     db.ThuChi.Add(obj);
     db.SaveChanges();
     return(obj.ID);
 }