public ActionResult AddEditStation(AddEditStationViewModel viewModel)
        {
            if (!CRCDataAccess.ValidateCallLettersIsUnique(viewModel.CopyInd.Equals("Y", StringComparison.OrdinalIgnoreCase) ? null : viewModel.StationId, viewModel.CallLetters, viewModel.BandId))
            {
                ModelState.AddModelError("CallLetters", "Call Letters: " + viewModel.CallLetters + " already exists.");
            }
            if (ModelState.IsValid)
            {
                long stationId;
                stationId = CRCDataAccess.SaveStation(
                    viewModel.CopyInd.Equals("Y", StringComparison.OrdinalIgnoreCase) ? null : viewModel.StationId,
                    viewModel.CallLetters,
                    viewModel.BandId,
                    viewModel.Frequency,
                    viewModel.RepeaterStatusId,
                    viewModel.FlagshipStationId,
                    viewModel.MemberStatusId,
                    viewModel.MinorityStatusId,
                    viewModel.StatusDate,
                    viewModel.LicenseeTypeId,
                    viewModel.LicenseeName,
                    viewModel.AddressLine1,
                    viewModel.AddressLine2,
                    viewModel.City,
                    viewModel.StateId,
                    viewModel.County,
                    viewModel.Country,
                    viewModel.ZipCode,
                    viewModel.Phone,
                    viewModel.Fax,
                    viewModel.Email,
                    viewModel.WebPage,
                    viewModel.TsaCume,
                    viewModel.Tsaaqh,
                    viewModel.MetroMarketId,
                    viewModel.MetroMarketRank,
                    viewModel.DmaMarketId,
                    viewModel.DmaMarketRank,
                    viewModel.TimeZoneId,
                    viewModel.HoursFromFlagship,
                    viewModel.MaxNumberOfUsers,
                    viewModel.EnabledInd ? (DateTime?)null : DateTime.UtcNow,
                    viewModel.EnabledInd ? (long?)null : CRCUser.UserId,
                    CRCUser.UserId);

                CRCDataAccess.DeleteStationAffiliates(stationId);
                if (viewModel.AffiliateIds != null)
                {
                    foreach (long affiliateId in viewModel.AffiliateIds)
                    {
                        CRCDataAccess.SaveStationAffiliate(0, stationId, affiliateId, CRCUser.UserId);
                    }
                }


                return(RedirectToAction("StationDetail", new { stationId = stationId }));

                /* if (viewModel.StationId.HasValue)
                *  {
                *   return RedirectToAction("StationDetail", new { stationId=viewModel.StationId});
                *  }
                *  return RedirectToAction("Index"); */
            }
            else
            {
                return(View(viewModel));
            }
        }