Пример #1
0
        public bool themPT(Phieu_thu th)
        {
            var t = (from a in db.Phieu_thus where a.soPH == th.soPH select a).SingleOrDefault();

            if (t == null)
            {
                db.Phieu_thus.InsertOnSubmit(t);
                db.SubmitChanges();
                return(true);
            }
            return(false);
        }
Пример #2
0
        public bool suaPT(Phieu_thu th)
        {
            var t = (from a in db.Phieu_thus where a.soPH == th.soPH select a).SingleOrDefault();

            if (t != null)
            {
                t.soPH      = th.soPH;
                t.ngayPH    = th.ngayPH;
                t.soHD      = th.soHD;
                t.hoTen     = th.hoTen;
                t.soTienThu = th.soTienThu;
                db.SubmitChanges();
                return(true);
            }
            return(false);
        }
 private void detach_Phieu_thus(Phieu_thu entity)
 {
     this.SendPropertyChanging();
     entity.Hop_Dong = null;
 }
 partial void DeletePhieu_thu(Phieu_thu instance);
 partial void UpdatePhieu_thu(Phieu_thu instance);
 partial void InsertPhieu_thu(Phieu_thu instance);