Exemplo n.º 1
0
 public Drug(string name, TypeDrug type, double price, int count) : this()
 {
     Name     = name;
     TypeName = type;
     Price    = price;
     Count    = count;
 }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            //HomeTask DeleteDrug Methodu yazmaliyiq.Id qebul edecek int tipinden.
            //Eger bu Id-li Drug varsa onu silecek, eger yoxdursa ekrana yazilacaq ki,
            //bu Id -li derman yoxdur onu sile bilmersiniz.


            TypeDrug type1 = new TypeDrug("HeadAche");
            TypeDrug type2 = new TypeDrug("HeartAche");
            Drug     drug1 = new Drug("Analgin", type1, 0.80, 100);
            Drug     drug2 = new Drug("Valerian", type2, 0.20, 1000);
            //Console.WriteLine(drug1);
            //Console.WriteLine(drug2);

            Pharmacy zeferan = new Pharmacy("Zeferan");

            zeferan.AddDrug(drug1);
            zeferan.AddDrug(drug2);

            //zeferan.DrugList();
            zeferan.SaleDrug(0, 105, 100);
        }