Exemple #1
0
 public static void getClassUse(CheckSchedule objc)
 {
     //objc.Calculate(1);
     Console.WriteLine("Enter the room type as general or icu");
     room_Type = Console.ReadLine().ToLower();
     if (room_Type.Equals("general"))
     {
         Console.WriteLine("Enter the duration in only hours");
         duration = Convert.ToInt32(Console.ReadLine());
         total    = (total + 30) * duration;
         Console.WriteLine("Enter the proced name as p1 or p2 can select only one");
         proced_Name = Console.ReadLine().ToLower();
         if (proced_Name.Equals("p1"))
         {
             total = total + objc.proced1();
             objc.Calculate(total);
         }
         else if (proced_Name.Equals("p2"))
         {
             total = total + objc.proced2();
             objc.Calculate(total);
         }
         else
         {
             Console.WriteLine("No Procdure");
         }
     }
     else if (room_Type.Equals("icu"))
     {
         Console.WriteLine("Enter the duration in only hours");
         duration = Convert.ToInt32(Console.ReadLine());
         total    = (total + 50) * duration;
         Console.WriteLine("Enter the proced name as p1 or p2 can select only one");
         proced_Name = Console.ReadLine().ToLower();
         if (proced_Name.Equals("p1"))
         {
             total = total + objc.proced1();
             objc.Calculate(total);
         }
         else if (proced_Name.Equals("p2"))
         {
             total = total + objc.proced2();
             objc.Calculate(total);
         }
         else
         {
             Console.WriteLine("No Procdure");
         }
     }
     else
     {
         Console.WriteLine("Not a room Type");
     }
 }