Beispiel #1
0
        //Các hàm static
        public static List <ToChayDigi> DocTatCa()
        {
            var toChayDigiLogic = new ToChayDigiLogic();
            var nguon           = toChayDigiLogic.DocTatCa().Select(x => new ToChayDigi
            {
                ID                    = x.ID,
                Ten                   = x.Ten,
                Rong                  = (float)x.Rong,
                Cao                   = (float)x.Cao,
                VungInRong            = (float)x.VungInRong,
                VungInCao             = (float)x.VungInCao,
                KhoToChayCoTheIn      = x.KhoToChayCoTheIn,
                TocDo                 = (int)x.TocDo,
                InTuTro               = (bool)x.InTuTro,
                LaInKhoDai            = (bool)x.LaInKhoDai,
                LaHPIndigo            = (bool)x.LaHPIndigo,
                ClickA4MotMau         = (int)x.ClickA4MotMau,
                ClickBonMau           = (int)x.ClickA4BonMau,
                ClickSauMau           = (int)x.ClickA4SauMau,
                QuiA4                 = (int)x.QuiA4,
                IdMayIn               = (int)x.IdMayIn,
                BHR                   = (int)x.BHR,
                ThoiGianSanSang       = (float)x.ThoiGianSanSang,
                PhiPhePhamSanSang     = (int)x.PhiPhePhamSanSang,
                ThoiGianDuLieuBienDoi = (float)x.ThoiGianDuLieuBienDoi,
                DaySoLuong            = x.DaySoLuong,
                DayLoiNhuan           = x.DayLoiNhuan,
                ThuTu                 = (int)x.ThuTu
            }).OrderBy(x => x.ThuTu);

            return(nguon.ToList());
        }
Beispiel #2
0
        public static ToChayDigi DocTheoId(int idToDigi)
        {
            var toChayDigiLogic = new ToChayDigiLogic();
            //
            ToChayDigi toChayDTO = new ToChayDigi();

            try
            {
                var toChayBDO = toChayDigiLogic.DocTheoId(idToDigi);
                //Chuyen
                ToChayDigi.ChuyenBDOThanhDTO(toChayBDO, toChayDTO);
            }
            catch
            {
            }
            return(toChayDTO);
        }