コード例 #1
0
        public static void xoaThamSo(BANGTHAMSO nv)
        {
            BANGTHAMSO old = DataProvider.ISCreated.DB.BANGTHAMSOes.Where(x => x.TenThamSo == nv.TenThamSo).SingleOrDefault();

            old.TinhTrang = true;
            capNhatCSDL();
        }
コード例 #2
0
        public static BANGTHAMSO themMoiThamSo(BANGTHAMSO nv)
        {
            nv.NgayTao = DateTime.Now;
            BANGTHAMSO res = new BANGTHAMSO();

            res = DataProvider.ISCreated.DB.BANGTHAMSOes.Add(nv);
            DataProvider.ISCreated.DB.SaveChanges();
            return(res);
        }
コード例 #3
0
        public static void capNhatThamSo(BANGTHAMSO nv)
        {
            BANGTHAMSO old = DataProvider.ISCreated.DB.BANGTHAMSOes.Where(x => x.MaThamSo == nv.MaThamSo).SingleOrDefault();

            old.GiaTri     = nv.GiaTri;
            old.KieuDuLieu = nv.KieuDuLieu;
            old.NgayTao    = nv.NgayTao;
            old.TenThamSo  = nv.TenThamSo;
            capNhatCSDL();
        }