public void ShareSchedules(Schedule sche1, Schedule sche2)
        {
            bool exist = false;
    
            foreach (Schedule s in sche1.SharedSchedules)
                if (s.Id == sche2.Id)
                    exist = true;

            if (exist == false)
            {
                sche1.SharedSchedules.Add(sche2);
                sche1.Save();
            }
            else
                System.Console.WriteLine("Ya estaba compartida");
        }
        public void SaveSchedule([ARFetch ("Id", Create = false)] User user)
        {
            if (user != null)
            {
                if (Schedule.FindByUser(user) == null)
                {
                    Schedule schedule = new Schedule();
                    schedule.Owner = user;
                    schedule.Save();
                }
            }

            PropertyBag["user"] = user;
            Hashtable parameters = new Hashtable();
            parameters["id"] = user.Id;
            RedirectToAction("showschedule", parameters);
        }