コード例 #1
0
        public lichsugiatour find(int value)
        {
            lichsugiatour a = new lichsugiatour();

            a = lichsu.Find(c => c.idtour == value).OrderByDescending(c => c.id).FirstOrDefault();
            return(a);
        }
コード例 #2
0
        public void capnhatgiatour(tour tourcapnhatgia)
        {
            lichsugiatour lsgt = new lichsugiatour();

            lsgt = find(tourcapnhatgia.id);
            if (lsgt.giatour != tourcapnhatgia.giatour)
            {
                lsgt.ngayketthuc = tourcapnhatgia.ngaycapnhat;
                update(lsgt);
                lichsugiatour ls = new lichsugiatour();
                ls.idtour      = tourcapnhatgia.id;
                ls.giatour     = tourcapnhatgia.giatour;
                ls.ngaybatdau  = tourcapnhatgia.ngaycapnhat;
                ls.ngayketthuc = null;
                add(ls);
            }
        }
コード例 #3
0
 public bool update(lichsugiatour entity)
 {
     return(lichsu.Attach(entity));
 }
コード例 #4
0
 public bool add(lichsugiatour entity)
 {
     return(lichsu.Add(entity));
 }