private void EditTitleType(string titleType, int id)
 {
     if (!string.IsNullOrEmpty(titleType))
     {
         using (EventOrganizerEntities db = new EventOrganizerEntities())
         {
             var item = db.EventTypeOnes.Where(x => x.Id == id).FirstOrDefault();
             db.Usp_UpdateCalendarEvents(titleType, item.EventTypeName, (int)Purpose.EditType);
             if (item != null)
             {
                 item.EventTypeName = titleType;
                 db.SaveChanges();
             }
         }
     }
 }
 private void EditGroupTitle(string groupTitle, int id)
 {
     if (!string.IsNullOrEmpty(groupTitle))
     {
         using (EventOrganizerEntities db = new EventOrganizerEntities())
         {
             var item = db.EventGroupTitles.Where(x => x.Id == id).FirstOrDefault();
             db.Usp_UpdateCalendarEvents(groupTitle, item.Title, (int)Purpose.EditGroupTitle);
             if (item != null)
             {
                 item.Title = groupTitle;
                 db.SaveChanges();
             }
         }
     }
 }