public decimal ThanhTien_ThPh()
        {
            decimal  result  = 0;
            var      idEpKim = this.ThanhPhamS().FirstOrDefault(x => x.Value == View.TenThPhChon).Key;
            var      epKim   = EpKim.DocTheoId(idEpKim);
            var      khuonEp = KhuonEpKim.DocTheoId(View.IdKhuonChon);
            NhuEpKim nhuEp   = null;

            nhuEp = NhuEpKim.DocTheoId(View.IdNhuEpKimChon);
            if (nhuEp == null)//không thể không có nhũ
            {
                return(0);
            }
            var mucLoiNhuan = TinhToanThanhPham.MucLoiNhuan(epKim.DaySoLuong, epKim.DayLoiNhuan, View.SoLuong);
            var giaEpKim    = new GiaEpKim(View.SoLuong, View.KhoEpRong, View.KhoEpCao,
                                           epKim, khuonEp, nhuEp, mucLoiNhuan);

            decimal tyLeMK = (decimal)this.TyLeMarkUp(View.IdHangKhachHang) / 100;



            result = giaEpKim.ThanhTienCoBan() +
                     giaEpKim.ThanhTienCoBan() * tyLeMK / (1 - tyLeMK);

            return(result);
        }
        public decimal ThanhTien_ThPh()
        {
            decimal result      = 0;
            var     idEpKim     = this.ThanhPhamS().FirstOrDefault(x => x.Value == View.TenThPhChon).Key;
            var     epKim       = EpKim.DocTheoId(idEpKim);
            var     khuonEp     = KhuonEpKim.DocTheoId(View.IdKhuonChon);
            var     nhuEp       = NhuEpKim.DocTheoId(View.IdNhuEpKimChon);
            var     mucLoiNhuan = TinhToanThanhPham.MucLoiNhuan(epKim.DaySoLuong, epKim.DaySoLuong, View.SoLuong);
            var     giaEpKim    = new GiaEpKim(View.SoLuong, View.KhoEpRong, View.KhoEpCao,
                                               epKim, nhuEp, mucLoiNhuan);

            var     idCanPhu = this.ThanhPhamS().FirstOrDefault(x => x.Value == View.TenThPhChon).Key;
            var     epKim    = EpKim.DocTheoId(idCanPhu);
            decimal tyLeMK   = (decimal)this.TyLeMarkUp(View.IdHangKhachHang) / 100;

            result = epKim.ThanhTienCoBan(View.SoLuong) +
                     epKim.ThanhTienCoBan(View.SoLuong) * tyLeMK / (1 - tyLeMK);

            return(result);
        }
        //Thêm ngoài Implement
        public List <KhuonEpKim> KhuonTheoEpKimS()
        {
            var idEpKim = this.ThanhPhamS().FirstOrDefault(x => x.Value == View.TenThPhChon).Key;

            return(KhuonEpKim.DocTheoIdEpKim(idEpKim));
        }