public ActionResult Register(RegistrationModel Model)
        {
            ProfileModel _prModel = new ProfileModel();

            _prModel.STARS_ID            = Model.STARS_ID;
            _prModel.PA_CODE             = Model.PA_CODE;
            _prModel.DLR_NAME            = Model.DLR_NAME;
            _prModel.FIRST_NAME          = Model.FIRST_NAME;
            _prModel.LAST_NAME           = Model.LAST_NAME;
            _prModel.BADGE_NAME          = CultureInfo.CurrentCulture.TextInfo.ToTitleCase(Model.BADGE_NAME.ToLower());
            _prModel.TITLE               = Model.TITLE;
            _prModel.EMAIL_ID            = Model.EMAIL_ID;
            _prModel.DLR_ADDRESS         = Model.DLR_ADDRESS;
            _prModel.DLR_CITY            = Model.DLR_CITY;
            _prModel.DLR_STATE           = Model.DLR_STATE;
            _prModel.DLR_ZIP             = Model.DLR_ZIP;
            _prModel.PROFILE_NOTE        = Model.PROFILE_NOTE;
            _prModel.PROFILE_TYPE        = Model.PROFILE_TYPE;
            _prModel.DIETARY_RESTRICTION = Model.DIETARY_RESTRICTION;
            _prModel.DLR_PHONE           = Model.phone1 + Model.phone2 + Model.phone3;
            _prModel.PHONE               = Model.mobile1 + Model.mobile2 + Model.mobile3;
            _prModel.BIOGRAPHY           = Model.BIOGRAPHY;
            _prModel.DEPARTMENT          = Model.DEPARTMENT;
            _prModel.SHIRT_SIZE          = Model.SHIRT_SIZE;
            _prModel.WSLX_ID             = Model.WSLX_ID;
            _prModel.UPDATED_BY          = System.Web.HttpContext.Current.Session["w_user"].ToString();
            ProfileBL  profile = new ProfileBL();
            EventBL    evBL    = new EventBL();
            EventModel evmodel = new EventModel();

            profile.UpdateProfileByStarsId(_prModel);
            evmodel            = evBL.GetEventModelByID(Model.EVENT_ID);
            Model.WSLX_ID      = String.IsNullOrWhiteSpace(Model.WSLX_ID) ? System.Web.HttpContext.Current.Session["w_user"].ToString() : Model.WSLX_ID;//removed the Session. it has to be the user that is Log
            Model.CREATED_DATE = DateTime.Now;
            Model.CREATED_BY   = System.Web.HttpContext.Current.Session["w_user"].ToString();


            RegistrationBL _regBl = new RegistrationBL();

            if (_regBl.CheckRegistrationBy(Model.STARS_ID))
            {
                Model.REGD_STATUS  = "A";
                Model.UPDATE_DATE  = DateTime.Now;
                Model.UPDATED_BY   = System.Web.HttpContext.Current.Session["w_user"].ToString();
                ViewBag.registered = 1;
                _regBl.UpdateRegistraion(Model);
            }
            else
            {
                ViewBag.registered = 1;
                _regBl.SaveRegistration(Model);
                evBL.UpdateEventCount(evmodel);

                EmailHelper.SendConfEMail(Model.EMAIL_ID);
            }



            return(RedirectToAction("Confirmation"));
        }