Example #1
0
        protected void btnForgotPwd_Click(object sender, EventArgs e)
        {
            try
            {
                if (ValidateForgotPwd() == true)
                {
                    using (CustomerLoginViewModel _custLoginViewModel = new CustomerLoginViewModel())
                    {
                        string pwd = GenerateRandomCode();

                        string retvalstr = _custLoginViewModel.UpdateForgotPassword(txtUserName.Text, pwd);

                        if (retvalstr.Contains("Email ID"))
                        {
                            ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "Login Validation", "<script type='text/javascript'>CheckValidation('Email ID does not exits.','User Registration');</script>", false);
                            //ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Duty Updation", "javascript:alert('CheckValidation()');", true);
                        }
                        else if (retvalstr.Contains("User Added"))
                        {
                            SendEmail(txtUserName.Text, pwd);
                            ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "Login Validation", "<script type='text/javascript'>CheckValidation('Password has been sent to your email ID.','User Registration');</script>", false);
                        }
                        else
                        {
                            ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "Login Validation", "<script type='text/javascript'>CheckValidation('Server is busy. Please try after sometime.','User Registration');</script>", false);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                ErrHandler.WriteError(ex.Message);
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Error", "javascript:alert('Server is busy.Please try after sometime.');", true);
            }
        }
Example #2
0
        protected void btnLogin_Click(object sender, EventArgs e)
        {
            try
            {
                bool IsAuthenticate = false;
                string userName;
                if (IsValdateLoginUser() == true)
                {
                    using (CustomerLoginViewModel _custLoginViewModel = new CustomerLoginViewModel())
                    {
                        IsAuthenticate = _custLoginViewModel.CustomerLogin(txtUserName.Text, txtPwd.Text, out userName);
                    }

                    if (IsAuthenticate == true)
                    {
                        Session["UserName"] = txtUserName.Text;
                        Session["FullName"] = userName;
                        toggle.Attributes["class"] = "displayNone";
                        toggleLogin.Attributes["class"] = "display";

                        if (userName != "")
                        {
                            lblusername.InnerText = "Hi," + userName;
                        }
                        else
                        {
                            lblusername.InnerText = "Hi , Guest ";
                        }

                        //if (userName != "")
                        //{
                        //    lblUsrNm.Text = "Hi , " + userName;
                        //}
                        //else
                        //{
                        //    lblUsrNm.Text = "Hi , Guest ";
                        //}

                        if (acc.Value == "T") //value from account login
                        {
                            ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "Login Validation", "<script type='text/javascript'>javascript:LoadPage('WebSite/CustAccountDetails.aspx',this);</script>", false);
                        }
                        else if (acc.Value != "") //Value comming form checkout form
                        {
                            ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "Login Validation", "<script type='text/javascript'>javascript:LoadPage('events-List.aspx?ID=" + acc.Value + "',this);</script>", false);
                            //ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "Login Validation", "<script type='text/javascript'>javascript:Checkout();</script>", false);
                        }
                    }
                    else
                    {
                        ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "Login Validation", "<script type='text/javascript'>CheckValidation('Invalid Email ID or password.','User Registration');</script>", false);
                    }
                }
            }
            catch (Exception ex)
            {
                ErrHandler.WriteError(ex.Message);
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Error", "javascript:alert('Server is busy.Please try after sometime.');", true);
            }
        }
        protected void GetCustDetails()
        {
            try
            {
                if (Session["UserName"] != null)
                {

                    CustomerLoginViewModel customerLoginViewModel = new CustomerLoginViewModel();
                    List<CustomerModel> custModel = new List<CustomerModel>();
                    string uid = Session["UserName"].ToString();
                    custModel = customerLoginViewModel.GetCustomerDetails(uid);
                    customerLoginViewModel = null;

                    firstname.Value = custModel[0].firstname;
                    lastname.Value = custModel[0].lastname;
                    address1.Value = custModel[0].address1;
                    address2.Value = custModel[0].address2;
                    city.Value = custModel[0].city;
                    state.Value = custModel[0].state;
                    zip.Value = custModel[0].zip;
                    mobileno.Value = custModel[0].mobileno;
                }
            }
            catch (Exception ex)
            {
                ErrHandler.WriteError(ex.Message);
            }
        }
 protected void bchangepassword_ServerClick(object sender, EventArgs e)
 {
     try
     {
         if (Session["UserName"] != null)
         {
             if (ValidateChangePassword() == true)
             {
                 CustomerLoginViewModel customerLoginViewModel = new CustomerLoginViewModel();
                 string uid = Session["UserName"].ToString();
                 string retval = customerLoginViewModel.CustomerChangePassword(uid, newpassword.Value.Trim(), currentpassword.Value.Trim());
                 customerLoginViewModel = null;
                 ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "Add Event Validation", "<script type='text/javascript'>CheckValidation('Your password has been changed.','Account Details');</script>", false);
             }
         }
         else
         {
             ScriptManager.RegisterStartupScript(this, GetType(), "Login", "ShowProcessing('T')", true);
         }
     }
     catch (Exception ex)
     {
         ErrHandler.WriteError(ex.Message);
     }
 }
        protected void accountdetails_ServerClick(object sender, EventArgs e)
        {
            try
            {
                if (ValidateAccountDetails() == true)
                {
                    if (Session["UserName"] != null)
                    {
                        CustomerLoginViewModel customerLoginViewModel = new CustomerLoginViewModel();
                        CustomerModel custModel = new CustomerModel();

                        custModel.firstname = firstname.Value.Trim();
                        custModel.lastname = lastname.Value.Trim();
                        custModel.address1 = address1.Value.Trim();
                        custModel.address2 = address2.Value.Trim();
                        custModel.city = city.Value.Trim();
                        custModel.state = state.Value.Trim();
                        custModel.zip = zip.Value.Trim();
                        custModel.mobileno = mobileno.Value.Trim();
                        string uid = Session["UserName"].ToString();

                        customerLoginViewModel.UpdateCustomerDetails(custModel, uid);

                        ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "Add Event Validation", "<script type='text/javascript'>CheckValidation('Account Details updated','Account Details');</script>", false);

                    }
                }
            }
            catch (Exception ex)
            {
                ErrHandler.WriteError(ex.Message);
            }
        }
Example #6
0
        protected void CountCustomerList(int VenueID, string searchBy)
        {
            try
            {
                CustomerLoginViewModel _customerLoginViewModel = new CustomerLoginViewModel();
                int EventListCount = _customerLoginViewModel.CountCustomerDetails(searchBy);
                BindDataToDropDown(EventListCount);

                _customerLoginViewModel = null;

            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #7
0
        private void GetCustomerList(int VenueID, int PageSize, int PageNumber, string searchBy)
        {
            try
            {
                CustomerLoginViewModel _customerLoginViewModel = new CustomerLoginViewModel();
                List<CustomerModel> _eventMasterModel = new List<CustomerModel>();

                //ToDo Get Venue ID of Admin LogedIn
                _eventMasterModel = _customerLoginViewModel.GetAllCustomerDetails(VenueID, PageSize, PageNumber, searchBy);
                EventList.DataSource = _eventMasterModel;
                EventList.DataBind();
                _customerLoginViewModel = null;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #8
0
        private bool CreateUser()
        {
            try
            {
                bool IsAuthenticate = false;

                string retvalstr = "";

                using (CustomerLoginViewModel _custLoginViewModel = new CustomerLoginViewModel())
                {
                    //BINU
                    // retvalstr = _custLoginViewModel.CustomerRegistration(txtEmail.Value.Trim(), txtPassword.Value.Trim(), "1111111111", txtFullName.Value.Trim());
                }

                if (retvalstr.Contains("Email ID"))
                {
                    ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "Login Validation", "<script type='text/javascript'>Msg('Email ID already exits.','User Registration');</script>", false);
                    IsAuthenticate = false;
                }
                else if (retvalstr.Contains("User Added"))
                {
                    Session["UserName"] = txtEmail.Value;
                    Session["FullName"] = txtFullName.Value;

                    IsAuthenticate = true;
                }
                else
                {
                    //ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "Login Validation", "<script type='text/javascript'>CheckValidation('Email ID already exits.');</script>", false);
                }

                return IsAuthenticate;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #9
0
        private void AuthenticateAndTicket()
        {
            try
            {
                bool IsAuthenticate = false;

                if (IsValdateLoginUser() == true)
                {
                    using (CustomerLoginViewModel _custLoginViewModel = new CustomerLoginViewModel())
                    {
                        //BINU
                        //IsAuthenticate = _custLoginViewModel.CustomerLogin(txtEmail.Value, txtPassword.Value);
                    }

                    if (IsAuthenticate == true)
                    {
                        Session["UserName"] = txtEmail.Value;
                        Session["FullName"] = txtFullName.Value;
                        TicketCarting();
                    }
                    else
                    {
                        ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "Event Checkout", "<script type='text/javascript'>EMsg('Invalid EmailID or Password.','Event Checkout: Validation','txtEmail');</script>", false);
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #10
0
        protected void btnRegister_Click(object sender, EventArgs e)
        {
            try
            {
                //bool IsAuthenticate = false;
                string retvalstr = "";

                if (IsValdateRegisterUser() == true)
                {
                    string pwd = GenerateRandomCode();

                    using (CustomerLoginViewModel _custLoginViewModel = new CustomerLoginViewModel())
                    {
                        retvalstr = _custLoginViewModel.CustomerRegistration(txtREmailID.Text, pwd, txtMobileNo.Text, txtFirstName.Text.Trim(), txtLastName.Text.Trim());
                    }

                    if (retvalstr.Contains("Email ID"))
                    {
                        ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "Login Validation", "<script type='text/javascript'>CheckValidation('Email ID already Registered.','User Registration');</script>", false);
                        //ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Duty Updation", "javascript:alert('CheckValidation()');", true);
                    }
                    else if (retvalstr.Contains("User Added"))
                    {

                        SendEmail(txtREmailID.Text, pwd);

                        Session["UserName"] = txtREmailID.Text;
                        Session["FullName"] = txtFirstName.Text;

                        ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "Login Validation", "<script type='text/javascript'>CheckValidation('Password has been sent to your email ID.','User Registration');</script>", false);

                        txtFirstName.Text = "";
                        txtLastName.Text = "";
                        txtREmailID.Text = "";
                        txtMobileNo.Text = "";
                    }
                    else
                    {
                        //ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "Login Validation", "<script type='text/javascript'>CheckValidation('Email ID already exits.');</script>", false);
                    }
                }
                else
                {
                    ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "Login Validation", "<script type='text/javascript'>CheckValidation('Please enter valid data.','User Registration');</script>", false);
                }
            }
            catch (Exception ex)
            {
                ErrHandler.WriteError(ex.Message);
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Error", "javascript:alert('Server is busy.Please try after sometime.');", true);
            }
        }
        private void GetCustTransaction()
        {
            try
            {
                if (Session["UserName"] != null)
                {
                    CustomerLoginViewModel customerLoginViewModel = new CustomerLoginViewModel();
                    List<CustTransactionModel> custTransModel = new List<CustTransactionModel>();

                    string uid = Session["UserName"].ToString();
                    custTransModel = customerLoginViewModel.GetCustTransactionDetails(uid);
                    grdTransaction.DataSource = custTransModel;
                    grdTransaction.DataBind();
                }
            }
            catch (Exception ex)
            {
                ErrHandler.WriteError(ex.Message);
            }
        }