Ejemplo n.º 1
0
 private void CallEmployee(object sender, NewEmployeeEventArgs e)
 {
     Console.WriteLine("Sender of event: " + sender.ToString());
     Console.WriteLine("Cusomer Info: " + e.Name +
                       "," + e.Sex + "," + e.Age.ToString());
     //do call Employee stuff
 }
Ejemplo n.º 2
0
 protected virtual void OnNewEmployee(NewEmployeeEventArgs e)
 {
     if (NewEmployee != null)
     {
         NewEmployee(this, e);
     }
 }
Ejemplo n.º 3
0
        public void RegisterEmployee(string name, string sex, int age)
        {
            NewEmployeeEventArgs e = new NewEmployeeEventArgs(name, sex, age);

            OnNewEmployee(e);
        }