示例#1
0
文件: Program.cs 项目: iprog8/G8M3
        static void Main(string[] args)
        {
            Angajat angajat1 = new Angajat();

            angajat1.Nume   = "Vasilescu Petre";
            angajat1.Sectia = Sectia.Productie;
            angajat1.FinalizeazaPiese(20);

            Angajat angajat2 = new Angajat();

            angajat2.Nume   = "Popa George";
            angajat2.Sectia = Sectia.Productie;
            angajat2.FinalizeazaPiese(30);

            Angajat angajat3 = new Angajat();

            angajat3.Nume   = "Cristea Vasile";
            angajat3.Sectia = Sectia.Productie;
            angajat3.FinalizeazaPiese(15);

            Muncitor muncitor1 = new Muncitor();

            muncitor1.Nume   = "Ionescu Iulian";
            muncitor1.Sectia = Sectia.Productie;
            muncitor1.FinalizeazaPiese(15);
            muncitor1.IncarcaMarfa("cherestea");
        }
示例#2
0
文件: Angajat.cs 项目: iprog8/G8M3
 internal double AflaSalariu(Angajat angajat)
 {
     if (angajat is Contabil || angajat is ContabilSef)
     {
         return(Salariu);
     }
     //throw new Exception("Nu poti sa vezi salariul acestei persoane");
     return(0);
 }