Beispiel #1
0
        public static CAIDATTHUCDON GetQueryNoTracking(Transit transit)
        {
            CAIDATTHUCDON item = FrameworkRepository <CAIDATTHUCDON> .QueryNoTracking(transit.KaraokeEntities.CAIDATTHUCDONs).FirstOrDefault();

            if (item == null)
            {
                item = new CAIDATTHUCDON();
                item.NhomTextFontSize        = 12;
                item.NhomTextFontStyle       = (int)SomeEnum.FontStyles.Normal;
                item.NhomTextFontWeights     = (int)SomeEnum.FontWeights.Normal;
                item.MonTextFontSize         = 12;
                item.MonTextFontStyle        = (int)SomeEnum.FontStyles.Normal;
                item.MonTextFontWeights      = (int)SomeEnum.FontWeights.Normal;
                item.LoaiNhomTextFontSize    = 12;
                item.LoaiNhomTextFontStyle   = (int)SomeEnum.FontStyles.Normal;
                item.LoaiNhomTextFontWeights = (int)SomeEnum.FontWeights.Normal;
            }
            return(item);
        }
Beispiel #2
0
        public CAIDATTHUCDON GetAll(Data.Transit transit)
        {
            CAIDATTHUCDON item = mKaraokeEntities.CAIDATTHUCDONs.FirstOrDefault();

            if (item == null)
            {
                item = new CAIDATTHUCDON();
                item.NhomTextFontSize        = 12;
                item.NhomTextFontStyle       = (int)SomeEnum.FontStyles.Normal;
                item.NhomTextFontWeights     = (int)SomeEnum.FontWeights.Normal;
                item.MonTextFontSize         = 12;
                item.MonTextFontStyle        = (int)SomeEnum.FontStyles.Normal;
                item.MonTextFontWeights      = (int)SomeEnum.FontWeights.Normal;
                item.LoaiNhomTextFontSize    = 12;
                item.LoaiNhomTextFontStyle   = (int)SomeEnum.FontStyles.Normal;
                item.LoaiNhomTextFontWeights = (int)SomeEnum.FontWeights.Normal;
                mKaraokeEntities.CAIDATTHUCDONs.AddObject(item);
                mKaraokeEntities.SaveChanges();
            }
            return(item);
        }