コード例 #1
0
ファイル: CanPhu.cs プロジェクト: DzungHg/TinhGiaDigi2
        public static string Sua(CanPhu canPhu)
        {
            var canPhuLogic = new CanPhuLogic();
            var itemBDO     = new CanPhuBDO();

            ChuyenDoiGiayDTOThanhBDO(canPhu, itemBDO);
            return(canPhuLogic.Sua(itemBDO));
        }
コード例 #2
0
ファイル: GiaCanPhu.cs プロジェクト: DzungHg/TinhGiaDigi2
 public GiaCanPhu(int soLuong, float toChayRong, float toChayDai,
                  int soMatCanTrenTo, int tyLeMarkUpSales, CanPhu canPhu)
 {
     this.SoLuong         = soLuong;
     this.ToChayRong      = toChayRong;
     this.ToChayDai       = toChayDai;
     this.SoMatCanTheoTo  = soMatCanTrenTo;
     this.TyLeMarkUpSales = tyLeMarkUpSales;
     this.CanPhu          = canPhu;
 }
コード例 #3
0
ファイル: CanPhu.cs プロジェクト: DzungHg/TinhGiaDigi2
 private static void ChuyenDoiGiayDTOThanhBDO(CanPhu canPhuDTO, CanPhuBDO canPhuBDO)
 {
     canPhuBDO.ID                = canPhuDTO.ID;
     canPhuBDO.Ten               = canPhuDTO.Ten;
     canPhuBDO.BHR               = canPhuDTO.BHR;
     canPhuBDO.TocDoMetGio       = canPhuDTO.TocDoMetGio;
     canPhuBDO.ThoiGianChuanBi   = canPhuDTO.ThoiGianChuanBi;
     canPhuBDO.DayLoiNhuan       = canPhuDTO.DayLoiNhuan;
     canPhuBDO.DaySoLuong        = canPhuDTO.DaySoLuong;
     canPhuBDO.PhiNgVLM2         = canPhuDTO.PhiNgVLM2;
     canPhuBDO.Ma_01             = canPhuDTO.Ma_01;
     canPhuBDO.DonViTinh         = canPhuDTO.DonViTinh;
     canPhuBDO.DaySoLuongNiemYet = canPhuDTO.DaySoLuongNiemYet;
     canPhuBDO.ThuTu             = canPhuDTO.ThuTu;
 }
コード例 #4
0
ファイル: CanPhu.cs プロジェクト: DzungHg/TinhGiaDigi2
        public static CanPhu DocTheoId(int iD)
        {
            var    canPhuLogic = new CanPhuLogic();;
            CanPhu canPhu      = new CanPhu();

            try
            {
                var canPhuBDO = canPhuLogic.LayTheoId(iD);
                //Chuyen
                ChuyenDoiGiayBDOThanhDTO(canPhuBDO, canPhu);
            }
            catch
            {
            }
            return(canPhu);
        }
コード例 #5
0
ファイル: MonThanhPham.cs プロジェクト: DzungHg/TinhGiaDigi2
        public static List <DichVuThanhPham> DocTatCaDichVuThanhPham()
        {
            var             lst = new List <DichVuThanhPham>();
            var             i   = 0;
            DichVuThanhPham dvTP;

            //Cán phủ
            foreach (CanPhu cp in CanPhu.DocTatCa())
            {
                i   += 1;
                dvTP = new DichVuThanhPham(i, cp.Ten, cp.ID, cp.DonViTinh,
                                           cp.DaySoLuongNiemYet, LoaiThanhPhamS.CanPhu);

                lst.Add(dvTP);
            }
            //Cân gấp
            foreach (CanGap cp in CanGap.DocTatCa())
            {
                i   += 1;
                dvTP = dvTP = new DichVuThanhPham(i, cp.Ten, cp.ID, cp.DonViTinh,
                                                  cp.DaySoLuongNiemYet, LoaiThanhPhamS.CanGap);
                lst.Add(dvTP);
            }
            //Đóng cuốn
            foreach (DongCuon cp in DongCuon.DocTatCa())
            {
                i   += 1;
                dvTP = dvTP = new DichVuThanhPham(i, cp.Ten, cp.ID, cp.DonViTinh,
                                                  cp.DaySoLuongNiemYet, LoaiThanhPhamS.DongCuon);
                lst.Add(dvTP);
            }
            //Ép kim
            foreach (EpKim cp in EpKim.DocTatCa())
            {
                i   += 1;
                dvTP = dvTP = new DichVuThanhPham(i, cp.Ten, cp.ID, cp.DonViTinh,
                                                  cp.DaySoLuongNiemYet, LoaiThanhPhamS.EpKim);
                lst.Add(dvTP);
            }

            return(lst.OrderBy(x => x.ID).ToList());
        }