public string DeleteConfirmed(long id)
 {
     try
     {
         //Schedule objSchedule = db.Schedules.Find(id);
         //db.Schedules.Remove(objSchedule);
         //db.SaveChanges();
         ScheduleRepository objRep = new ScheduleRepository();
         if (objRep.DeleteSchedule(id))
         {
             return Convert.ToString(true);
         }
         return Convert.ToString(true);
     }
     catch (Exception ex)
     {
         return ex.Message.ToString();
     }
 }
        public string Create(Schedule objSchedule)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    objSchedule.InsertedBy = _userStatistics.UserId;
                    ScheduleRepository objRep = new ScheduleRepository();
                    if (objRep.CreateSchedule(objSchedule))
                    {
                        return Convert.ToString(true);
                    }
                    return Convert.ToString(false);
                }

                return Convert.ToString(false);
            }
            catch (Exception ex)
            {
                return ex.Message.ToString();
            }
        }
        //details
        public ActionResult Details(long id = 0)
        {
            ScheduleRepository objRep = new ScheduleRepository();
            Schedule objSchedule = objRep.GetSchedule(id);
            if (objSchedule == null)
            {
                return HttpNotFound();
            }

            return PartialView(objSchedule);
        }