Exemple #1
0
        public void TrinhBayToBoi()
        {
            if (View.ID <= 0)
            {
                return;
            }

            var toLotMoPhang = ToLotMoPhang.DocTheoId(View.ID);

            View.ID  = toLotMoPhang.ID;
            View.Ten = toLotMoPhang.Ten;

            View.MaNhaCungCap  = toLotMoPhang.MaNhaCungCap;
            View.TenNhaCungCap = toLotMoPhang.TenNhaCungCap;
            View.GiaMuaTo      = toLotMoPhang.GiaMuaTo;

            View.ThuTu = toLotMoPhang.ThuTu;
        }
        public decimal ThanhTien_ThPh()
        {
            decimal kq = 0;

            var dongCuon = DongCuonMoPhang.DocTheoId(View.IdThanhPhamChon);

            if (View.IdToLotChon <= 0)
            {
                return(0);//Không thể không có nhũ
            }
            var loXo = ToLotMoPhang.DocTheoId(View.IdToLotChon);


            var giaDongCuon = new GiaDongCuonMoPhang(View.SoLuong, View.SoToDoi,
                                                     dongCuon, loXo, this.TyLeMarkUp());

            kq = giaDongCuon.ThanhTienSales();

            return(kq);
        }