public ActionResult savePersonalAppt(Personal_Appointment modelAppt)
 {
     try
     {
         if (ModelState.IsValid)
         {
             modelAppt.SalApptUserEntered = User.Identity.Name;
             if (AppointmentsDAL.SaveAppointment(modelAppt))
             {
                 return(RedirectToAction("index", "calendar"));
             }
             else
             {
                 LoadPersonalAppointmentCombos();
                 ModelState.AddModelError(String.Empty, BusinessConstants.duplicateRecord);
                 return(View("personal", modelAppt));
             }
         }
         else
         {
             LoadPersonalAppointmentCombos();
             ModelState.AddModelError(String.Empty, BusinessConstants.ValidateEntries);
             return(View("personal", modelAppt));
         }
     }
     catch (Exception ex)
     {
         LoadPersonalAppointmentCombos();
         ModelState.AddModelError(String.Empty, BusinessConstants.contactAdmin);
         return(View("personal", modelAppt));
     }
 }
        public ActionResult Create(SAL03_ResAppointments modelAppt)
        {
            try
            {
                ModelState.Remove("SalApptId");
                if (!modelAppt.EmailExists)
                {
                    modelAppt.SalApptEmail = BusinessConstants.NA;
                    ModelState.Remove("SalApptEmail");
                }

                if (ModelState.IsValid)
                {
                    modelAppt.SalApptUserEntered = User.Identity.Name;
                    if (AppointmentsDAL.SaveAppointment(modelAppt))
                    {
                        return(RedirectToAction("index", "calendar"));
                    }
                    else
                    {
                        LoadAppointmentCombos();
                        ModelState.AddModelError(String.Empty, BusinessConstants.duplicateRecord);
                        return(View(modelAppt));
                    }
                }
                else
                {
                    LoadAppointmentCombos();
                    ModelState.AddModelError(String.Empty, BusinessConstants.ValidateEntries);
                    return(View(modelAppt));
                }
            }
            catch (Exception ex)
            {
                LoadAppointmentCombos();
                ModelState.AddModelError(String.Empty, BusinessConstants.contactAdmin);
                return(View(modelAppt));
            }
        }