Esempio n. 1
0
 public static void DisplayEmployeeDetails()
 {
     try {
         DatabaseLinking DbCall = new DatabaseLinking();
         Console.WriteLine("Please enter the name of the employee");
         string    name = Console.ReadLine();
         DataTable ds   = DbCall.RetriveEmployeeDetails(name);
         foreach (DataRow dr in ds.Rows)
         {
             Console.WriteLine("Employe Name=" + dr["EmpName"].ToString());
             Console.WriteLine("Employe Adress=" + dr["EmpAddress"].ToString());
             Console.WriteLine("Employe Designation=" + dr["Designation"].ToString());
             Console.WriteLine("Employe salary=" + dr["Salary"].ToString());
             Console.WriteLine("Employe Active or not=" + dr["Active"].ToString());
             Console.WriteLine("Employe project name=" + dr["ProjectName"].ToString());
             Console.WriteLine("Employe project starting from=" + dr["Projectstarting"].ToString());
             Console.WriteLine("Employe Ending =" + dr["Projectending"].ToString());
             Console.WriteLine();
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
 }