Exemplo n.º 1
0
        public string UserRegistration(string userName, string transPassword, string email, string firstName, string lastName, string title, string countryId, string phone, string dob, string isSubscribed)
        {
            try
            {
                RegistrationBL objRegistrationBL = new RegistrationBL();

                RegistrationBO objRegistrationBO = new RegistrationBO();
                objRegistrationBO.UserName            = userName;
                objRegistrationBO.TransactionPassword = transPassword;
                objRegistrationBO.Email        = email;
                objRegistrationBO.FirstName    = firstName;
                objRegistrationBO.LastName     = lastName;
                objRegistrationBO.Title        = title;
                objRegistrationBO.CountryId    = countryId;
                objRegistrationBO.Phone        = phone;
                objRegistrationBO.DOB          = dob;
                objRegistrationBO.isSubscribed = isSubscribed;

                return(objRegistrationBL.Registration(objRegistrationBO));
            }
            catch (Exception ex)
            {
                HttpContext.Current.Session["Exception"] = ex;
                HttpContext.Current.Session["ExcSource"] = System.Web.HttpContext.Current.Request.Url.AbsolutePath;
                throw ex;
            }
            finally
            {
            }
        }
        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"));
        }
Exemplo n.º 3
0
        // Get the list of the LBC to fill the drop down
        public ActionResult GetLBCList(string PaCode)
        {
            RegistrationBL _regbl = new RegistrationBL();

            ViewBag.search = string.IsNullOrEmpty(PaCode) ? string.Empty : PaCode;
            List <ProfileModel> lstModel = _regbl.GetListProfileByPaCode(PaCode);


            if (lstModel != null && lstModel.Count > 0)
            {
                List <ProfileModel> lst = new List <ProfileModel>();
                for (int i = 0; i < lstModel.Count; i++)
                {
                    ProfileModel item = new ProfileModel()
                    {
                        STARS_ID   = lstModel.ElementAt(i).STARS_ID,
                        FIRST_NAME = lstModel.ElementAt(i).FIRST_NAME + " " + lstModel.ElementAt(i).LAST_NAME
                    };
                    lst.Add(item);
                }
                return(Json(new
                {
                    error = 0,
                    lstModel = lst,
                }, JsonRequestBehavior.AllowGet));
            }
            else
            {
                return(Json(new { error = 1 }, JsonRequestBehavior.AllowGet));
            }
        }
        public ActionResult Travel(string starsid = "")
        {
            ViewBag.homeid = "home";
            FlightInfoModel model     = new FlightInfoModel();
            FlightInfoBL    _flightBl = new FlightInfoBL();
            RegistrationBL  _regBl    = new RegistrationBL();

            if (Session["StarsIdProfile"] != null)
            {
                var _id = Session["StarsIdProfile"].ToString();

                if (_regBl.CheckRegistrationBy(_id) == true)
                {
                    decimal?eventid = _flightBl.GetEventIdByStarsId(_id);
                    model = _flightBl.GetFlightInfoByStarsId(_id, eventid);
                    // model.EVENT_ID =  _flightBl.GetEventIdByStarsId(_id);
                    // eventid; // Run a Query against Registration table to get only event id by Stars ID
                    if (model == null)
                    {
                        return(View(model));
                    }

                    return(View(model));
                }
                else
                {
                    return(RedirectToAction("Index", "Registration"));
                }
            }
            else
            {
                return(RedirectToAction("Welcome", "LBC"));
            }
        }
Exemplo n.º 5
0
 internal static bool Insert(RegistrationBL registrationBL)
 {
     var aa = OnlineExamHelper.Context.sp_OnlineRegistrationNewInsertCommand(registrationBL.Name, registrationBL.Mobile, registrationBL.Email, registrationBL.Date);
     foreach (var item in aa)
     {
         registrationBL.UserId = item.UserId;
     }
     return true;
 }
Exemplo n.º 6
0
        public ActionResult AddStoryAdmin(string search)
        {
            ViewBag.homeid = "story";
            RegistrationBL _regbl = new RegistrationBL();

            ViewBag.search = string.IsNullOrEmpty(search) ? string.Empty : search;
            List <ProfileModel> lstModel = _regbl.GetListProfileByPaCode(search);

            return(View(lstModel));
        }
        public ActionResult Index()
        {
            ViewBag.homeid = "home";

            EventBL           _evBl            = new EventBL();
            RegistrationBL    _reg             = new RegistrationBL();
            RegistrationModel regmodel         = new RegistrationModel();
            RegistrationModel regmodelCanceled = new RegistrationModel();

            List <EventModel> EventList = new List <EventModel>();

            if (Convert.ToInt32(Session["ROLE_ID"]) == 1)
            {
                if (Session["StarsIdProfile"] != null)
                {
                    if (!_reg.CheckIsSelectBy(Session["StarsIdProfile"].ToString()))
                    {
                        regmodel = _reg.GetRegistrationByStarsId(Session["StarsIdProfile"].ToString());
                    }
                    else
                    {
                        return(RedirectToAction("NoAuthorized", "HttpErrors"));
                    }
                }
                else
                {
                    return(RedirectToAction("Welcome", "LBC"));
                }
            }
            else
            {
                if (Session["StarsIdProfile"] != null)
                {
                    regmodel = _reg.GetRegistrationByStarsId(Session["StarsIdProfile"].ToString());
                }
                else
                {
                    return(RedirectToAction("Welcome", "LBC"));
                }
            }
            ViewBag.lbcCert   = regmodel.LBC_CERT;
            ViewBag.regStatus = regmodel.REGD_STATUS;
            if (regmodel.EVENT_ID != 0)
            {
                ViewBag.eventid    = regmodel.EVENT_ID;
                ViewBag.registered = 1;
            }
            else
            {
                ViewBag.eventid    = 0;
                ViewBag.registered = 0;
            }
            EventList = _evBl.GetAll(Session["StarsIdProfile"].ToString());
            return(View(EventList));
        }
Exemplo n.º 8
0
        public async Task <ActionResult> Create(User_Details u)
        {
            RegistrationBL reg     = new RegistrationBL();
            string         student = JsonConvert.SerializeObject(u);
            string         result  = await reg.Register(student);

            if (result == "true")
            {
                return(RedirectToAction("Index", "Home"));
            }
            return(View());
        }
        public ActionResult Register()
        {
            ViewBag.homeid = "home";
            List <RegistrationModel> regModel = new List <RegistrationModel>();
            RegistrationModel        model    = new RegistrationModel();
            RegistrationBL           _regbl   = new RegistrationBL();

            var _id = Session["StarsIdProfile"].ToString();

            if (Convert.ToDecimal(Session["EventId"]) != 0)
            {
                model = _regbl.GetRegistrationByStarsEventId(_id, Convert.ToDecimal(Session["EventId"]));
            }
            else
            {
                return(RedirectToAction("Index", "Registration"));
            }


            if (model.EVENT_ID != 0)
            {
                ViewBag.eventid    = model.EVENT_ID;
                ViewBag.registered = 1;
            }
            else
            {
                ViewBag.eventid    = 0;
                ViewBag.registered = 0;
            }

            model.EVENT_ID = Convert.ToDecimal(Session["EventId"]);


            if (model != null)
            {
                model.EVENT_ID = Convert.ToDecimal(Session["EventId"]);
                if (!String.IsNullOrWhiteSpace(model.DLR_PHONE))
                {
                    model.phone1 = model.DLR_PHONE.Substring(0, 3);
                    model.phone2 = model.DLR_PHONE.Substring(3, 3);
                    model.phone3 = model.DLR_PHONE.Substring(6, 4);
                }
                if (!String.IsNullOrWhiteSpace(model.PHONE))
                {
                    model.mobile1 = model.PHONE.Substring(0, 3);
                    model.mobile2 = model.PHONE.Substring(3, 3);
                    model.mobile3 = model.PHONE.Substring(6, 4);
                }
            }
            return(View(model));
        }
Exemplo n.º 10
0
        //protected override void OnLoad(EventArgs e)
        //{
        //    base.OnLoad(e);

        //}
        protected void GetAgents()
        {
            Agentstbl        ags      = new Agentstbl();
            List <Agentstbl> lstags   = new List <Agentstbl>();
            RegistrationBL   objRegBL = new RegistrationBL();

            lstags = objRegBL.GetAllAgents(ags).ToList();
            ddlAgency.Items.Clear();
            ddlAgency.Items.Add(new ListItem("--Select--", "0"));
            foreach (var ag in lstags)
            {
                ddlAgency.Items.Add(new ListItem(ag.AgencyName, ag.AgentID.ToString()));
            }
        }
Exemplo n.º 11
0
        public List <CountryBO> GetCountry()
        {
            RegistrationBL   objRegistrationBL = new RegistrationBL();
            List <CountryBO> objlstCountries   = new List <CountryBO>();

            try
            {
                return(objRegistrationBL.GetCountry());
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 12
0
        protected void GetAgency()
        {
            List <Agentstbl> lstAgents = new List <Agentstbl>();
            Agentstbl        agt       = new Agentstbl();
            RegistrationBL   objRegBL  = new RegistrationBL();

            lstAgents = objRegBL.GetAllAgents(agt).ToList();
            ddlAgency.Items.Clear();
            foreach (var el in lstAgents)
            {
                ListItem li = new ListItem();
                li.Text  = el.AgencyName;
                li.Value = el.AgentID.ToString();
                ddlAgency.Items.Add(li);
            }
        }
        public ActionResult CancelRegistration(FormCollection frm)
        {
            RegistrationBL    _regBl = new RegistrationBL();
            RegistrationModel Model  = new RegistrationModel();

            Model.REGD_STATUS         = "C";
            Model.STARS_ID            = frm["STARS_ID"];
            Model.EVENT_ID            = Convert.ToDecimal(frm["EVENT_ID"]);
            Model.TRANSPORTATION_MODE = frm["TRANSPORTATION_MODE"];
            Model.FIRST_NAME          = frm["FIRST_NAME"];
            Model.LAST_NAME           = frm["LAST_NAME"];
            Model.DLR_NAME            = frm["DLR_NAME"];
            Model.EMAIL_ID            = frm["EMAIL_ID"];
            Model.PHONE               = frm["PHONE"];
            Model.PA_CODE             = frm["PA_CODE"];
            Model.CANCEL_REASON       = frm["CancelReason"];
            Model.TRANSPORTATION_NEED = frm["TRANSPORTATION_NEED"];
            Model.NOTES               = frm["NOTES"];
            Model.ADMIN_NOTES         = frm["ADMIN_NOTES"];
            string eventname = "";

            Model.UPDATED_BY  = System.Web.HttpContext.Current.Session["w_user"].ToString();
            Model.UPDATE_DATE = DateTime.Now;
            bool flag = _regBl.UpdateRegistraion(Model);

            if (flag)
            {
                EventBL    evBL    = new EventBL();
                EventModel evmodel = new EventModel();

                evmodel = evBL.GetEventModelByID(Model.EVENT_ID);
                evBL.UpdateEventCountDecrease(evmodel);
                eventname = evmodel.EVENT_SESSION;
            }

            EmailHelper.SendCancelEMail(Model, eventname);

            return(Json(new
            {
                redirectUrl = Url.Action("Index", "Registration"),
                isRedirect = true
            }));

            //return Json(new { error = 1 }, JsonRequestBehavior.AllowGet);// RedirectToAction("Index", "Registration");
        }
Exemplo n.º 14
0
        public ActionResult Survey()
        {
            ViewBag.homeid = "survey";
            if (Convert.ToInt32(Session["ROLE_ID"]) == 1)
            {
                if (Session["StarsIdProfile"] != null)
                {
                    var            starsId  = Session["StarsIdProfile"].ToString();
                    string         pacode   = Session["w_pacode"].ToString();
                    decimal        surveyId = 1;
                    SurveyBL       _surBL   = new SurveyBL();
                    RegistrationBL _regBL   = new RegistrationBL();

                    if (_surBL.CheckSurveyTakenBy(pacode, surveyId))
                    {
                        return(RedirectToAction("Completed", "Resources"));
                    }
                    else if (_regBL.CheckRegistrationBy(starsId))
                    {
                        SurveyModel model = new SurveyModel();
                        model.STARS_ID                 = pacode;
                        model.surveyMasterList         = _surBL.getSurveyMaster(surveyId);
                        model.surveyQuestionList       = _surBL.getQuestions(surveyId);
                        model.surveyQuestionAnswerList = _surBL.getAnswers(surveyId);
                        return(View(model));
                    }
                    else
                    {
                        return(RedirectToAction("Register", "Resources"));
                    }
                }
                else
                {
                    return(RedirectToAction("Welcome", "LBC"));
                }
            }
            else
            {
                return(RedirectToAction("Welcome", "LBC"));
            }
        }
Exemplo n.º 15
0
        protected void GetAgencyReject()
        {
            Agentstbl        agt      = new Agentstbl();
            List <Agentstbl> lstAgent = new List <Agentstbl>();
            RegistrationBL   objagBL  = new RegistrationBL();

            agt.IsActive = 0;
            agt.Status   = 0;
            lstAgent     = objagBL.GetRejAgents(agt).ToList();
            if (lst.Count() >= 1)
            {
                gdvReject.DataSource = lstAgent;
                gdvReject.DataBind();
            }
            else
            {
                DataTable dt = new DataTable();
                gdvReject.DataSource = dt;
                gdvReject.DataBind();
            }
        }
Exemplo n.º 16
0
        public ActionResult PhysicalTool()
        {
            RegistrationBL _reg = new RegistrationBL();

            if (Session["StarsIdProfile"] != null)
            {
                ViewBag.IsSelect = false;
                if (_reg.CheckIsSelectBy(Session["StarsIdProfile"].ToString()))
                {
                    ViewBag.IsSelect = true;
                }
                if (Session["CheckId"].ToString() == "1")
                {
                    return(PartialView("_PhysicalTool"));
                }
                if (Session["CheckId"].ToString() == "2")
                {
                    return(PartialView("_PhysicalTool2"));
                }
            }
            return(RedirectToAction("Welcome", "LBC"));
        }
Exemplo n.º 17
0
    protected void btnsubmit_Click(object sender, EventArgs e)
    {

        using (OnlineExamDataContext obj1 = new OnlineExamDataContext())
        {
            var number = OnlineExamHelper.Context.OnlineRegistrations.Where(a => a.Name == Convert.ToString(txtname.Text) && a.Mobile == Convert.ToInt64(txtmobile.Text)).Select(a => a.UserId);
            if (number.Count() >= 1)
            {
                lbregister.Text = "Already exists";
            }
            else
            {
                RegistrationBL obj = new RegistrationBL(txtname.Text, Convert.ToInt64(txtmobile.Text), txtemail.Text, DateTime.Now);
                if (obj.Insert())
                {
                    Session["cadidatename"] = obj.Name;
                    Session["cadidate"] = obj.UserId;
                    Session["admin"] = null;
                    var dd = OnlineExamHelper.Context.OnlineAssignDetails.Select(a => a);
                    foreach (var item in dd)
                    {
                        Session["TimeLeft"] = item.TimeLeft;
                        Session["timeDuration"] = item.TimeDuration;
                        var ss = OnlineExamHelper.Context.OnlineCateCounts.Where(a => a.FK_AsDeID.Value == item.Id);
                        Dictionary<long, int> dic = new Dictionary<long, int>();
                        foreach (var item1 in ss)
                        {
                            dic.Add(item1.FK_CateId.Value, item1.Count.Value);
                        }
                        Session["cat"] = dic;
                    }

                    Response.Redirect("Instruction.aspx");
                }
            }
        }

    }
Exemplo n.º 18
0
 public RegistrationController(RegistrationBL Reg)
 {
     this.logic = Reg;
 }
 public RegisterController()
 {
     _RegistrationBL = new RegistrationBL(new RegistrationConcrete());
 }
Exemplo n.º 20
0
 internal static bool Update(RegistrationBL registrationBL)
 {
     OnlineExamHelper.Context.sp_OnlineRegistrationNewUpdateCommand(registrationBL.Name, registrationBL.Mobile, registrationBL.Email, registrationBL.Date, registrationBL.UserId, registrationBL.UserId);
     return true;
 }
Exemplo n.º 21
0
 internal static bool Delete(RegistrationBL registrationBL)
 {
     OnlineExamHelper.Context.sp_OnlineRegistrationNewDeleteCommand(registrationBL.UserId);
     return true;
 }
Exemplo n.º 22
0
 public RegistrationController(RegistrationBL RegistrationBL)
 {
     _RegistrationBL = RegistrationBL;
 }