Created
August 30, 2020 07:39
-
-
Save Krishna-Ravi/52db05c083935b121f74cb2748351713 to your computer and use it in GitHub Desktop.
This is a solidity file containing smart contract of Medical store data.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity 0.4.18 <= 0.6.12; | |
contract MedicineData{ | |
string customerName; | |
string medicineName; | |
string medicineCompany; | |
int medicineCost; | |
int quantity; | |
function MedicineData(string newcustomerName, string newmedicineName, string newmedicineCompany, | |
int newmedicinecost, int newquantity) public { | |
customerName = newcustomerName; | |
medicineName = newmedicineName; | |
medicineCompany = newmedicineCompany; | |
medicineCost = newmedicinecost; | |
quantity = newquantity; | |
} | |
function getMedicineData() public view returns(string,string,string,int,int) { | |
return(customerName, medicineName, medicineCompany, medicineCost, quantity); | |
} | |
function setMedicineData(string newmedicineName,string newmedicineCompany, int newmedicinecost, int newquantity) public{ | |
medicineName = newmedicineName; | |
medicineCompany = newmedicineCompany; | |
medicineCost = newmedicinecost; | |
quantity = newquantity; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment