コード例 #1
0
        private AddUpdatePurchaseDto.AddOrUpdatePurchaseMedicineDto ToPurchaseMedicineModel(PurchaseMedicine entity)
        {
            AddUpdatePurchaseDto.AddOrUpdatePurchaseMedicineDto purchaseMedicine = new AddUpdatePurchaseDto.AddOrUpdatePurchaseMedicineDto()
            {
                Id                 = entity.Id,
                MedicineId         = entity.MedicineId,
                BatchNo            = entity.BatchNo,
                ExpiryDate         = entity.ExpiryDate,
                BoxNo              = entity.BoxNo,
                UnitsPerStrip      = entity.UnitsPerStrip,
                NoOfStrips         = entity.NoOfStrips,
                PricePerStrip      = entity.PricePerStrip,
                MRPPerStrip        = entity.MRPPerStrip,
                FreeStrips         = entity.FreeStrips,
                DiscountPercentage = entity.DiscountPercentage,
                HSNCode            = entity.HSNCode,
                VAT                = entity.VAT,
                AdditionalTax      = entity.AdditionalTax,
                IGST               = entity.IGST,
                CGST               = entity.CGST,
                SGST               = entity.SGST,
            };

            return(purchaseMedicine);
        }
コード例 #2
0
        private PurchaseMedicine FromPurchaseMedicineModel(AddUpdatePurchaseDto.AddOrUpdatePurchaseMedicineDto model)
        {
            PurchaseMedicine purchaseMedicine = new PurchaseMedicine()
            {
                Id                 = model.Id,
                MedicineId         = model.MedicineId,
                BatchNo            = model.BatchNo,
                ExpiryDate         = model.ExpiryDate,
                BoxNo              = model.BoxNo,
                UnitsPerStrip      = model.UnitsPerStrip,
                NoOfStrips         = model.NoOfStrips,
                PricePerStrip      = model.PricePerStrip,
                MRPPerStrip        = model.MRPPerStrip,
                FreeStrips         = model.FreeStrips,
                DiscountPercentage = model.DiscountPercentage,
                HSNCode            = model.HSNCode,
                VAT                = model.VAT,
                AdditionalTax      = model.AdditionalTax,
                IGST               = model.IGST,
                CGST               = model.CGST,
                SGST               = model.SGST,
            };

            return(purchaseMedicine);
        }