public static void UpdateTraining(TrainingClass Tr)
 {
     Conn.Open();
     string Query = String.Format("Update [dbo].[Trainings] set Day='{0}', Hour='{1}' ,Trainer_id={2}, Name='{3}' where Id={4}", Tr.GetDay(), Tr.GetHour(), Tr.GetTrainerId(), Tr.GetTrainingName(), Tr.GetTrainingId());
     command = new SqlCommand(Query, Conn);
     command.ExecuteNonQuery();
     Conn.Close();
 }
 public static void InsertNewTraining(TrainingClass Tr)
 {
     Conn.Open();
     string Query = String.Format("Insert into [dbo].[Trainings](Day,Hour,Trainer_id,Name) values ('{0}','{1}',{2},'{3}')", Tr.GetDay(), Tr.GetHour(), Tr.GetTrainerId(),Tr.GetTrainingName());
     command = new SqlCommand(Query, Conn);
     command.ExecuteNonQuery();
     Conn.Close();
 }