Beispiel #1
0
        // Method to Bind The User Details if User Want to make the payment
        protected void GetUserDetails(string courseId, string userId)
        {
            var objCrypto = new ClsCrypto(ClsSecurity.GetPasswordPhrase(Common.PassPhraseOne, Common.PassPhraseTwo));

            _objCommon = new Common();
            var objSecurePage = new SecurePage();

            try
            {
                courseId            = objCrypto.Decrypt(courseId);
                userId              = objCrypto.Decrypt(userId);
                _objCommon.CourseId = Convert.ToInt16(courseId);
                var userDetails = UserManagerProvider.Instance.GetUserListById(Convert.ToInt32(userId)).FirstOrDefault();
                if (userDetails != null)
                {
                    objSecurePage.LoggedInUserEmailId = userDetails.UserEmailid;
                    objSecurePage.LoggedInUserId      = userDetails.UserId;
                    objSecurePage.LoggedInUserMobile  = userDetails.MobileNo;
                    objSecurePage.LoggedInUserName    = userDetails.UserFullName;
                    objSecurePage.LoggedInUserType    = userDetails.UserCategoryId;
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing GetUserDetails in PaymentOptions.aspx for user :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
        }
Beispiel #2
0
        public override int ChangePassword(int userId, string oldPassword, string newPassword, out string errmsg)
        {
            _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
            errmsg          = "";
            string Password  = "";
            var    objCrypto = new ClsCrypto(ClsSecurity.GetPasswordPhrase(Common.PassPhraseOne, Common.PassPhraseTwo));

            try
            {
                _objDataWrapper.AddParameter("@UserId", userId);
                _objDataWrapper.AddParameter("@UserOldPassword", objCrypto.Encrypt(oldPassword));
                _objDataWrapper.AddParameter("@UserNewPassword", objCrypto.Encrypt(newPassword));
                var ObjErrMsg =
                    (SqlParameter)(_objDataWrapper.AddParameter("@ErrMsg", "", SqlDbType.VarChar, ParameterDirection.Output, 128));

                _i = _objDataWrapper.ExecuteNonQuery("Aj_UserChangePassword");
                if (ObjErrMsg != null && ObjErrMsg.Value != null)
                {
                    errmsg = Convert.ToString(ObjErrMsg.Value);
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing GetUserPassword in UserManager.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(_i);
        }
Beispiel #3
0
        private void UpdateUserTransctionalDetails(string euserEmailId, string efrmNumber, string euserId)
        {
            var objCrypto        = new ClsCrypto(ClsSecurity.GetPasswordPhrase(Common.PassPhraseOne, Common.PassPhraseTwo));
            var objConsulling    = new Consulling();
            var objMailTemplates = new MailTemplates();
            var objSecure        = new SecurePage();

            euserEmailId = euserEmailId.Replace(" ", "+");
            string emailId = Convert.ToString(objCrypto.Decrypt(euserEmailId));

            try
            {
                euserId = euserId.Replace(" ", "+");
                string userId    = Convert.ToString(objCrypto.Decrypt(euserId));
                string frmNumber = efrmNumber.Replace(" ", "+");
                frmNumber = Convert.ToString(objCrypto.Decrypt(frmNumber));
                int i;
                i = objConsulling.InsertUpdateUserTransctionalDetails(Convert.ToInt32(userId), frmNumber, true, "online", "PNB", Convert.ToString(frmNumber +
                                                                                                                                                  DateTime.Now.ToString(
                                                                                                                                                      "hh:mm:ss")), Request.QueryString["Amount"] != null ? objCrypto.Decrypt(Request.QueryString["Amount"]) : "26100");
                if (i > 0)
                {
                    var userDetails = UserManagerProvider.Instance.GetUserListById(Convert.ToInt32(userId));
                    var sp          = userDetails.First();
                    objSecure.LoggedInUserEmailId = emailId;
                    objSecure.LoggedInUserId      = sp.UserId;
                    objSecure.LoggedInUserName    = Common.GetStringProperCase(sp.UserFullName);
                    objSecure.LoggedInUserType    = sp.UserCategoryId;
                    objSecure.LoggedInUserMobile  = sp.MobileNo;
                    lblName.Text = Common.GetStringProperCase(sp.UserFullName);
                    var mail = new MailMessage
                    {
                        From    = new MailAddress(ApplicationSettings.Instance.Email),
                        Subject = "AdmissionJankari:Direct Admission Payment confirmation for form number:" + frmNumber
                    };
                    var body = objMailTemplates.MailBodyForPaymentConformation("http://www.admissionjankari.com/", sp.UserFullName, frmNumber, "Online", Convert.ToString(frmNumber + DateTime.Now.ToString("hh:mm:ss")));
                    mail.Body = body;
                    mail.To.Add(emailId);
                    mail.Bcc.Add(ClsSingelton.bccDirectAdmission);
                    Utils.SendMailMessageAsync(mail);
                    sucessMsg.Visible = true;
                }
                else
                {
                    failureMsg.Visible = true;
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                failureMsg.Visible = true;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing UpdateUserTransctionalDetails in PaymentConformation.aspx for user :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
        }
Beispiel #4
0
        private List <UserRegistrationProperty> BindUserListObject(DataTable datatable)
        {
            var userListObject = new List <UserRegistrationProperty>();
            var objCrypto      = new ClsCrypto(ClsSecurity.GetPasswordPhrase(Common.PassPhraseOne, Common.PassPhraseTwo));

            try
            {
                if (datatable.Rows.Count > 0)
                {
                    for (var j = 0; j < datatable.Rows.Count; j++)
                    {
                        var objUserProperty = new UserRegistrationProperty
                        {
                            CityId                    = (datatable.Rows[j]["AjCityId"] is DBNull)?0:Convert.ToInt32(datatable.Rows[j]["AjCityId"]),
                            CityName                  = (datatable.Rows[j]["AjCityName"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjCityName"]),
                            CountryCode               = (datatable.Rows[j]["AjCountryId"] is DBNull) ? 0 : Convert.ToInt32(datatable.Rows[j]["AjCountryId"]),
                            CountryName               = (datatable.Rows[j]["AjCountryName"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjCountryName"]),
                            PhoneNo                   = (datatable.Rows[j]["AjUserPhoneNo"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjUserPhoneNo"]),
                            MobileNo                  = (datatable.Rows[j]["AjUserMobile"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjUserMobile"]),
                            StateId                   = (datatable.Rows[j]["AjStateId"] is DBNull) ? 0 : Convert.ToInt32(datatable.Rows[j]["AjStateId"]),
                            StateName                 = (datatable.Rows[j]["AjStateName"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjStateName"]),
                            UserCategoryId            = (datatable.Rows[j]["AjUserCategoryId"] is DBNull) ? 0 : Convert.ToInt32(datatable.Rows[j]["AjUserCategoryId"]),
                            UserCategoryName          = (datatable.Rows[j]["AjUserCategoryName"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjUserCategoryName"]),
                            UserCorrespondenceAddress = (datatable.Rows[j]["AjUserMailingAddress"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjUserMailingAddress"]),
                            UserEmailid               = (datatable.Rows[j]["AjUserEmail"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjUserEmail"]),
                            UserFullName              = (datatable.Rows[j]["AjUserFullName"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjUserFullName"]),
                            UserId                    = (datatable.Rows[j]["AjUserId"] is DBNull) ? 0 : Convert.ToInt32(datatable.Rows[j]["AjUserId"]),
                            UserPermanentAddress      = (datatable.Rows[j]["AjUserPermanentAddress"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjUserPermanentAddress"]),
                            UserPincode               = (datatable.Rows[j]["AjUserPincode"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjUserPincode"]),
                            CourseId                  = (datatable.Rows[j]["AjCourseId"] is DBNull) ? 0 : Convert.ToInt32(datatable.Rows[j]["AjCourseId"]),
                            CourseName                = (datatable.Rows[j]["AjCourseName"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjCourseName"]),
                            UserGender                = (datatable.Rows[j]["AjUserGender"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjUserGender"]),
                            UserDOB                   = (datatable.Rows[j]["AjUserDOB"] is DBNull) ? System.DateTime.Now : Convert.ToDateTime(datatable.Rows[j]["AjUserDOB"]),
                            UserPassword              = objCrypto.Decrypt((datatable.Rows[j]["AjUserPassword"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjUserPassword"])),

                            UserImage             = (datatable.Rows[j]["AjUserImage"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjUserImage"]),
                            ApplicationFormNumber = datatable.Columns.Contains("AjStudentFormNumber")?((datatable.Rows[j]["AjStudentFormNumber"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjStudentFormNumber"])):null,

                            StudentPaymentStatus = datatable.Columns.Contains("AjStudentPaymentStatus") ? ((datatable.Rows[j]["AjStudentPaymentStatus"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjStudentPaymentStatus"])) : null,
                            UserStatus           = datatable.Columns.Contains("AjUserStatus") ? ((datatable.Rows[j]["AjUserStatus"] is DBNull) ? false : Convert.ToBoolean(datatable.Rows[j]["AjUserStatus"])) : false,
                        };
                        userListObject.Add(objUserProperty);
                    }
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing BindUserCategoryListObject in UserManager.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(userListObject);
        }
Beispiel #5
0
        public override int UpdateUserInfo(UserRegistrationProperty objUserRegistrationProperty, int modifiedBy, out string errmsg)
        {
            _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
            errmsg          = "";
            var objCrypto = new ClsCrypto(ClsSecurity.GetPasswordPhrase(Common.PassPhraseOne, Common.PassPhraseTwo));

            try
            {
                _objDataWrapper.AddParameter("@UserCityId", objUserRegistrationProperty.CityId);
                _objDataWrapper.AddParameter("@UserCountryId", objUserRegistrationProperty.CountryCode);
                _objDataWrapper.AddParameter("@UserPhone", objUserRegistrationProperty.PhoneNo);
                _objDataWrapper.AddParameter("@UserStateId", objUserRegistrationProperty.StateId);
                _objDataWrapper.AddParameter("@UserCatId", objUserRegistrationProperty.UserCategoryId);
                _objDataWrapper.AddParameter("@UserCorssAddrs", objUserRegistrationProperty.UserCorrespondenceAddress);
                _objDataWrapper.AddParameter("@UserEmailId", objUserRegistrationProperty.UserEmailid);
                _objDataWrapper.AddParameter("@UserFullName", objUserRegistrationProperty.UserFullName);
                _objDataWrapper.AddParameter("@UserPassword", objCrypto.Encrypt(objUserRegistrationProperty.UserPassword));
                _objDataWrapper.AddParameter("@UserMobileNo", objUserRegistrationProperty.MobileNo);
                _objDataWrapper.AddParameter("@UserPerAddrs", objUserRegistrationProperty.UserPermanentAddress);
                _objDataWrapper.AddParameter("@UserPincode", objUserRegistrationProperty.UserPincode);
                _objDataWrapper.AddParameter("@UserStatus", objUserRegistrationProperty.UserStatus);
                _objDataWrapper.AddParameter("@SubUserId", objUserRegistrationProperty.UserSubId);
                _objDataWrapper.AddParameter("@UserCourseId", objUserRegistrationProperty.CourseId);
                _objDataWrapper.AddParameter("@UserGender", objUserRegistrationProperty.UserGender);
                _objDataWrapper.AddParameter("@UserDOB", objUserRegistrationProperty.UserDOB);
                _objDataWrapper.AddParameter("@UserFatherName", objUserRegistrationProperty.UserFatherName);
                _objDataWrapper.AddParameter("@CreatedBy", modifiedBy);
                var objerrMsg
                    = (SqlParameter)(_objDataWrapper.AddParameter("@ErrMsg", "", SqlDbType.VarChar, ParameterDirection.Output, 128));
                var objUserId
                    = (SqlParameter)(_objDataWrapper.AddParameter("@UserId", objUserRegistrationProperty.UserId, SqlDbType.Int, ParameterDirection.Input));

                _i = _objDataWrapper.ExecuteNonQuery("Aj_Proc_InsertUpdateUserDetails");
                if (objerrMsg != null && objerrMsg.Value != null)
                {
                    errmsg = Convert.ToString(objerrMsg.Value);
                }
                if (objUserId != null && objUserId.Value != null)
                {
                    objUserRegistrationProperty.UserId = Convert.ToInt32(objUserId.Value);
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing UpdateUserInfo in UserManager.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(_i);
        }
Beispiel #6
0
        public override string GetUserPassword(string emailId, out string errmsg)
        {
            _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
            errmsg          = "";
            string Password  = "";
            var    objCrypto = new ClsCrypto(ClsSecurity.GetPasswordPhrase(Common.PassPhraseOne, Common.PassPhraseTwo));

            try
            {
                _objDataWrapper.AddParameter("@UserEmailId", emailId);
                var ObjErrMsg =
                    (SqlParameter)(_objDataWrapper.AddParameter("@ErrMsg", "", SqlDbType.VarChar, ParameterDirection.Output, 128));
                var objPassword =
                    (SqlParameter)(_objDataWrapper.AddParameter("@Password", "", SqlDbType.VarChar, ParameterDirection.Output, 64));
                _i = _objDataWrapper.ExecuteNonQuery("Aj_Proc_GetUserPassword");
                if (ObjErrMsg != null && ObjErrMsg.Value != null)
                {
                    errmsg = Convert.ToString(ObjErrMsg.Value);
                }
                if (objPassword != null && objPassword.Value != null)
                {
                    Password = Convert.ToString(objPassword.Value);
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing GetUserPassword in UserManager.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(!string.IsNullOrEmpty(Password)? objCrypto.Decrypt(Password):"");
        }
Beispiel #7
0
        private void OnlinePayment()
        {
            var objSecurePage = new SecurePage();

            _objCommon = new Common();

            var objCrypto        = new ClsCrypto(ClsSecurity.GetPasswordPhrase(Common.PassPhraseOne, Common.PassPhraseTwo));
            var objMailTemplates = new MailTemplates();
            var formNumber       = "ADMJ" + System.DateTime.Now.Year + _objCommon.CourseId.ToString() + objSecurePage.LoggedInUserId.ToString();

            string transectionDetails = "You have selected the payment mode through Online Payment of" + " " + "Rs." + " " + lblCash1.Text + "/- ";
            var    userDetails        = UserManagerProvider.Instance.GetUserListById(objSecurePage.LoggedInUserId);


            var sp = userDetails.First();
            var objUserRegistrationProperty = new
                                              UserRegistrationProperty
            {
                UserFullName              = objSecurePage.LoggedInUserName,
                UserGender                = sp.UserGender,
                UserEmailid               = objSecurePage.LoggedInUserEmailId,
                MobileNo                  = objSecurePage.LoggedInUserMobile,
                PhoneNo                   = sp.PhoneNo,
                UserId                    = objSecurePage.LoggedInUserId,
                CourseId                  = sp.CourseId,
                UserCategoryId            = objSecurePage.LoggedInUserType,
                UserDOB                   = sp.UserDOB,
                UserStatus                = true,
                UserPassword              = sp.UserPassword,
                UserPincode               = txtPincode.Text.Trim(),
                UserCorrespondenceAddress = txtAddress.Text.Trim()
            };
            var errMsg = "";
            var i      = UserManagerProvider.Instance.UpdateUserInfo(objUserRegistrationProperty, 1, out errMsg);
            var mail   = new MailMessage
            {
                From    = new MailAddress(ApplicationSettings.Instance.Email),
                Subject = "Direct Admission:Form Number" + formNumber
            };
            var amount    = lblCash1.Text;
            var myUtility = new libfuncs();

            Merchant_Id.Value  = "M_shi18022_18022";
            Amount.Value       = amount;
            Order_Id.Value     = formNumber + DateTime.Now.ToString("hh:mm:ss");
            Redirect_Url.Value = Utils.AbsoluteWebRoot + "ConformationPage.aspx?CID=" +
                                 objCrypto.Encrypt(objSecurePage.LoggedInUserEmailId) + "&frmNumber=" +
                                 objCrypto.Encrypt(formNumber) + "&UID=" +
                                 objCrypto.Encrypt(objSecurePage.LoggedInUserId.ToString() + "&Amount=" + amount);
            var workingKey = ClsSingelton.WorkingKey.Trim();

            Checksum.Value              = myUtility.getchecksum(Merchant_Id.Value, Order_Id.Value, Amount.Value, Redirect_Url.Value, workingKey);
            billing_cust_name.Value     = objSecurePage.LoggedInUserName;
            billing_cust_address.Value  = txtAddress.Text.Trim();
            billing_cust_state.Value    = txtState.Text;
            billing_cust_country.Value  = "India";
            billing_cust_tel.Value      = objSecurePage.LoggedInUserMobile;
            billing_cust_email.Value    = objSecurePage.LoggedInUserEmailId;
            delivery_cust_name.Value    = "";
            delivery_cust_address.Value = "";
            delivery_cust_state.Value   = "";
            delivery_cust_country.Value = "";
            delivery_cust_tel.Value     = "";
            billing_cust_city.Value     = txtCity.Text;
            billing_zip_code.Value      = txtPincode.Text.Trim();
            delivery_cust_city.Value    = "";
            delivery_zip_code.Value     = "";
            _objConsulling              = new Consulling();
            i = _objConsulling.InsertUpdateUserTransctionalDetails(objSecurePage.LoggedInUserId, formNumber);
            ScriptManager.RegisterClientScriptBlock(this.Page, typeof(Page), "YourUniqueScriptKey",
                                                    "PostDForm();", true);
        }
        //private string BindPaymentAmount(int courseId)
        //{
        //    Consulling _objConsulling = new Consulling();
        //    var amount = "";
        //    try
        //    {
        //        amount = _objConsulling.GetPayemntAmountAccordingToCourse(courseId);
        //    }
        //    catch (Exception ex)
        //    {
        //        var err = ex.Message;
        //        if (ex.InnerException != null)
        //        {
        //            err = err + " :: Inner Exception :- " + ex.ToString();
        //        }
        //        const string addInfo = "Error while executing BindPaymentAmount in UcCollegeBranchEvent.aspx  :: -> ";
        //        var objPub = new ClsExceptionPublisher();
        //        objPub.Publish(err, addInfo);
        //    }
        //    return amount;
        //}
        protected void BtnRegisterClick(object sender, EventArgs e)
        {
            MailTemplates _objmailTemplete = new MailTemplates();

            _objSecurePage = new SecurePage();

            try
            {
                _objUserRegistrationProperty = new UserRegistrationProperty
                {
                    UserFullName   = txtEventUser.Text.Trim(),
                    UserEmailid    = txtEmailIdEvent.Text.Trim(),
                    MobileNo       = txtMobileEvent.Text.Trim(),
                    UserCategoryId = Convert.ToInt16(Usertype.Student),
                    CourseId       = CourseId,
                    UserPassword   = txtMobileEvent.Text.Trim()
                };
                var errMsg = "";
                var result = UserManagerProvider.Instance.InsertUserInfo(_objUserRegistrationProperty, Convert.ToInt16(Usertype.Student), out errMsg);
                if (result > 0)
                {
                    var mail = new MailMessage
                    {
                        From    = new MailAddress(ApplicationSettings.Instance.Email),
                        Subject = "AdmissionJankari: Registation mail "
                    };
                    var body = _objmailTemplete.MailBodyForRegistation(txtEventUser.Text, txtEmailIdEvent.Text, txtMobileEvent.Text);
                    mail.Body = body;
                    mail.To.Add(_objUserRegistrationProperty.UserEmailid);
                    Utils.SendMailMessageAsync(mail);
                    var result1 = UserManagerProvider.Instance.GetUserListByEmailId(txtEmailIdEvent.Text.Trim());

                    var mail1 = new MailMessage
                    {
                        From    = new MailAddress(ApplicationSettings.Instance.Email),
                        Subject = "AdmissionJankari: Event attending by user-" + txtEventUser.Text
                    };
                    var body1 = _objmailTemplete.MailToAdminRegardingEventAttendingByStudent(txtEventUser.Text, txtEmailIdEvent.Text, txtMobileEvent.Text, CollegeName, hdnCollegeEvent.Value, hdnCollegeDate.Value);
                    mail1.Body = body1;
                    mail1.To.Add(ClsSingelton.donationMailId);
                    Utils.SendMailMessageAsync(mail1);

                    if (result1.Count > 0)
                    {
                        var query1 = result1.First();
                        _objSecurePage.LoggedInUserId      = query1.UserId;
                        _objSecurePage.LoggedInUserType    = query1.UserCategoryId;
                        _objSecurePage.LoggedInUserEmailId = query1.UserEmailid;
                        _objSecurePage.LoggedInUserName    = query1.UserFullName;
                        _objSecurePage.LoggedInUserMobile  = query1.MobileNo;
                        var collegeInsert = new Consulling().InsertStudentCollegePrefrance(_objSecurePage.LoggedInUserId, CollegeName, CourseId);
                        var cityInsert    = new Consulling().InsertStudentCityPrefrance(_objSecurePage.LoggedInUserId, CityName);
                        var objCrypto     = new ClsCrypto(ClsSecurity.GetPasswordPhrase(Common.PassPhraseOne, Common.PassPhraseTwo));
                        //  var amount = BindPaymentAmount(CourseId);
                        ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "tmp", "<script type='text/javascript'>EventMessage();</script>", false);
                        //Response.Redirect("/PaymentOptions.aspx?BookSeatPayment=" + objCrypto.Encrypt(amount));
                    }
                }
                else
                {
                    var result1 = UserManagerProvider.Instance.GetUserListByEmailId(txtEmailIdEvent.Text.Trim());

                    if (result1.Count > 0)
                    {
                        var query1 = result1.First();
                        _objSecurePage.LoggedInUserId      = query1.UserId;
                        _objSecurePage.LoggedInUserType    = query1.UserCategoryId;
                        _objSecurePage.LoggedInUserEmailId = query1.UserEmailid;
                        _objSecurePage.LoggedInUserName    = query1.UserFullName;
                        _objSecurePage.LoggedInUserMobile  = query1.MobileNo;

                        var collegeInsert = new Consulling().InsertStudentCollegePrefrance(_objSecurePage.LoggedInUserId, CollegeName, CourseId);
                        var cityInsert    = new Consulling().InsertStudentCityPrefrance(_objSecurePage.LoggedInUserId, CityName);
                        var objCrypto     = new ClsCrypto(ClsSecurity.GetPasswordPhrase(Common.PassPhraseOne, Common.PassPhraseTwo));
                        // var amount = BindPaymentAmount(CourseId);
                        ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "tmp", "<script type='text/javascript'>EventMessage();</script>", false);
                        // Response.Redirect("/PaymentOptions.aspx?BookSeatPayment=" + objCrypto.Encrypt(amount));
                    }
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.InnerException.Message;
                }
                const string addInfo = "Error while executing BtnRegisterClick in UcCollegeBranchEvent.ascx  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
        }
Beispiel #9
0
        private void OnlinePayment()
        {
            var objSecurePage = new SecurePage();

            _objCommon = new Common();

            var objCrypto        = new ClsCrypto(ClsSecurity.GetPasswordPhrase(Common.PassPhraseOne, Common.PassPhraseTwo));
            var objMailTemplates = new MailTemplates();
            var formNumber       = "ADMJ" + System.DateTime.Now.Year + _objCommon.CourseId.ToString() + objSecurePage.LoggedInUserId.ToString();
            var userDetails      = UserManagerProvider.Instance.GetUserListById(objSecurePage.LoggedInUserId);

            var sp = userDetails.First();
            var objUserRegistrationProperty = new
                                              UserRegistrationProperty
            {
                UserFullName              = objSecurePage.LoggedInUserName,
                UserGender                = sp.UserGender,
                UserEmailid               = objSecurePage.LoggedInUserEmailId,
                MobileNo                  = objSecurePage.LoggedInUserMobile,
                PhoneNo                   = sp.PhoneNo,
                UserId                    = objSecurePage.LoggedInUserId,
                CourseId                  = sp.CourseId,
                UserCategoryId            = objSecurePage.LoggedInUserType,
                UserDOB                   = sp.UserDOB,
                UserStatus                = true,
                UserPassword              = sp.UserPassword,
                UserPincode               = txtPincode.Text.Trim(),
                UserCorrespondenceAddress = txtAddress.Text.Trim()
            };
            var errMsg    = "";
            int i         = UserManagerProvider.Instance.UpdateUserInfo(objUserRegistrationProperty, 1, out errMsg);
            var myUtility = new libfuncs();

            Merchant_Id.Value = "M_shi18022_18022";
            var bookSeatPayment = "";

            if (Request.QueryString["BookSeatPayment"] != null)
            {
                bookSeatPayment = objCrypto.Decrypt(Request.QueryString["BookSeatPayment"].ToString());
            }
            Amount.Value       = !string.IsNullOrEmpty(bookSeatPayment)?bookSeatPayment:"26100";
            Order_Id.Value     = formNumber + DateTime.Now.ToString("hh:mm:ss");
            Redirect_Url.Value = "http://admissionjankari.com/ConformationPage.aspx?CID=" + objCrypto.Encrypt(objSecurePage.LoggedInUserEmailId) + "&frmNumber=" + objCrypto.Encrypt(formNumber) + "&UID=" + objCrypto.Encrypt(objSecurePage.LoggedInUserId.ToString());
            var workingKey = ClsSingelton.WorkingKey.Trim();

            Checksum.Value              = myUtility.getchecksum(Merchant_Id.Value, Order_Id.Value, Amount.Value, Redirect_Url.Value, workingKey);
            billing_cust_name.Value     = objSecurePage.LoggedInUserName;
            billing_cust_address.Value  = txtAddress.Text.Trim();
            billing_cust_state.Value    = txtState.Text;
            billing_cust_country.Value  = "India";
            billing_cust_tel.Value      = objSecurePage.LoggedInUserMobile;
            billing_cust_email.Value    = objSecurePage.LoggedInUserEmailId;
            delivery_cust_name.Value    = "";
            delivery_cust_address.Value = "";
            delivery_cust_state.Value   = "";
            delivery_cust_country.Value = "";
            delivery_cust_tel.Value     = "";
            billing_cust_city.Value     = txtCity.Text;
            billing_zip_code.Value      = txtPincode.Text.Trim();
            delivery_cust_city.Value    = "";
            delivery_zip_code.Value     = "";
            _objConsulling              = new Consulling();

            ScriptManager.RegisterStartupScript(this, GetType(), "YourUniqueScriptKey",
                                                "PostDForm();", true);
        }
Beispiel #10
0
        public bool bClosedSecurity(string cSCode)
        {
            ClsSecurity cls = new ClsSecurity();

            return(cls.bClosed(ClsDES.Decrypt(cSCode)));
        }
Beispiel #11
0
        public string delSecurity(string cSCode)
        {
            ClsSecurity cls = new ClsSecurity();

            return(ClsDES.Encrypt(cls.del(ClsDES.Decrypt(cSCode))));
        }
Beispiel #12
0
        private void OnlinePayment(string orderNumber)
        {
            var objSecurePage = new SecurePage();

            _objCommon = new Common();

            var objCrypto        = new ClsCrypto(ClsSecurity.GetPasswordPhrase(Common.PassPhraseOne, Common.PassPhraseTwo));
            var objMailTemplates = new MailTemplates();


            string transactionDetails = "You have selected the payment mode through Online Payment of" + " " + "Rs." + " " + hdnAmount.Value + "/- ";
            var    userDetails        = UserManagerProvider.Instance.GetUserListById(objSecurePage.LoggedInUserId);

            var objCarProduct = new Common().GetProductForCart(0, Request["id"] == null ? orderNumber : null,
                                                               Request["id"] != null
                                                                      ? Convert.ToInt32(Request["id"])
                                                                      : 0);
            var mail = new MailMessage
            {
                From    = new MailAddress(ApplicationSettings.Instance.Email),
                Subject = "Product Order Number:" + orderNumber
            };
            var body = objMailTemplates.SendProductConfirmationMail(objSecurePage.LoggedInUserName,
                                                                    orderNumber, transactionDetails, objCarProduct.Tables[0]);

            mail.Body = body;
            mail.To.Add(objSecurePage.LoggedInUserEmailId);
            mail.Bcc.Add(ClsSingelton.bccDirectAdmission);
            Utils.SendMailMessageAsync(mail);
            var sp = userDetails.First();
            var objUserRegistrationProperty = new
                                              UserRegistrationProperty
            {
                UserFullName              = objSecurePage.LoggedInUserName,
                UserGender                = sp.UserGender,
                UserEmailid               = objSecurePage.LoggedInUserEmailId,
                MobileNo                  = objSecurePage.LoggedInUserMobile,
                PhoneNo                   = sp.PhoneNo,
                UserId                    = objSecurePage.LoggedInUserId,
                CourseId                  = sp.CourseId,
                UserCategoryId            = objSecurePage.LoggedInUserType,
                UserDOB                   = sp.UserDOB,
                UserStatus                = true,
                UserPassword              = sp.UserPassword,
                UserPincode               = txtPincode.Text.Trim(),
                UserCorrespondenceAddress = txtAddress.Text.Trim()
            };
            var errMsg    = "";
            var i         = UserManagerProvider.Instance.UpdateUserInfo(objUserRegistrationProperty, 1, out errMsg);
            var amount    = hdnAmount.Value;
            var myUtility = new libfuncs();

            Merchant_Id.Value  = "M_shi18022_18022";
            Amount.Value       = amount;
            Order_Id.Value     = orderNumber + DateTime.Now.ToString("hh:mm:ss");
            Redirect_Url.Value = Request["id"] != null
                                     ? Utils.AbsoluteWebRoot + "account/paymentconfirmation.aspx?CID=" +
                                 objCrypto.Encrypt(objSecurePage.LoggedInUserEmailId) + "&orderNumber=" +
                                 objCrypto.Encrypt(orderNumber) + "&UID=" +
                                 objCrypto.Encrypt(objSecurePage.LoggedInUserId.ToString() + "&Amount=" + amount +
                                                   "&id=" + Request["id"])
                                     : Utils.AbsoluteWebRoot + "account/paymentconfirmation.aspx?CID=" +
                                 objCrypto.Encrypt(objSecurePage.LoggedInUserEmailId) + "&orderNumber=" +
                                 objCrypto.Encrypt(orderNumber) + "&UID=" +
                                 objCrypto.Encrypt(objSecurePage.LoggedInUserId.ToString());
            var workingKey = ClsSingelton.WorkingKey.Trim();

            Checksum.Value              = myUtility.getchecksum(Merchant_Id.Value, Order_Id.Value, Amount.Value, Redirect_Url.Value, workingKey);
            billing_cust_name.Value     = objSecurePage.LoggedInUserName;
            billing_cust_address.Value  = txtAddress.Text.Trim();
            billing_cust_state.Value    = txtState.Text;
            billing_cust_country.Value  = "India";
            billing_cust_tel.Value      = objSecurePage.LoggedInUserMobile;
            billing_cust_email.Value    = objSecurePage.LoggedInUserEmailId;
            delivery_cust_name.Value    = "";
            delivery_cust_address.Value = "";
            delivery_cust_state.Value   = "";
            delivery_cust_country.Value = "";
            delivery_cust_tel.Value     = "";
            billing_cust_city.Value     = txtCity.Text;
            billing_zip_code.Value      = txtPincode.Text.Trim();
            delivery_cust_city.Value    = "";
            delivery_zip_code.Value     = "";
            _objConsulling              = new Consulling();
            ScriptManager.RegisterClientScriptBlock(this.Page, typeof(Page), "YourUniqueScriptKey",
                                                    "PostDForm();", true);
        }
Beispiel #13
0
        public string dtSecurity()
        {
            ClsSecurity cls = new ClsSecurity();

            return(ClsDES.Encrypt(cls.dt()));
        }
Beispiel #14
0
        public override bool DoLogin(string emailId, string password, out int userTypeId, out int userId, out string userName, out string landingPage, out string mobileNo, out bool canCreateUser, out string errmsg, out bool userStatus)
        {
            _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
            var objCrypto = new ClsCrypto(ClsSecurity.GetPasswordPhrase(Common.PassPhraseOne, Common.PassPhraseTwo));

            errmsg        = "";
            userTypeId    = 0;
            userName      = "";
            landingPage   = "";
            mobileNo      = "";
            userId        = 0;
            userStatus    = false;
            canCreateUser = false;
            string pwd = "";

            try
            {
                _objDataWrapper.AddParameter("@UserEmailId", emailId);
                var objUserStatus =
                    (SqlParameter)(_objDataWrapper.AddParameter("@UserStatus", "", SqlDbType.Bit, ParameterDirection.Output));
                var ObjErrMsg =
                    (SqlParameter)(_objDataWrapper.AddParameter("@ErrMsg", "", SqlDbType.VarChar, ParameterDirection.Output, 128));
                var ObjPassword =
                    (SqlParameter)(_objDataWrapper.AddParameter("@UserPassword", "", SqlDbType.VarChar, ParameterDirection.Output, 128));
                var ObjUserName =
                    (SqlParameter)(_objDataWrapper.AddParameter("@UserName", "", SqlDbType.VarChar, ParameterDirection.Output, 64));
                var ObjUseId =
                    (SqlParameter)(_objDataWrapper.AddParameter("@UserId", "", SqlDbType.Int, ParameterDirection.Output));
                var ObjUseTypeId =
                    (SqlParameter)(_objDataWrapper.AddParameter("@UserTypeId", "", SqlDbType.Int, ParameterDirection.Output));
                var ObjCanCreateUser =
                    (SqlParameter)(_objDataWrapper.AddParameter("@CanCreateUser", "", SqlDbType.Bit, ParameterDirection.Output));
                var ObjUserMobile =
                    (SqlParameter)(_objDataWrapper.AddParameter("@UserMobileNo", "", SqlDbType.VarChar, ParameterDirection.Output, 32));
                var ObjUserLandingPage =
                    (SqlParameter)(_objDataWrapper.AddParameter("@LandingPage", "", SqlDbType.VarChar, ParameterDirection.Output, 256));


                _i = _objDataWrapper.ExecuteNonQuery("Aj_Proc_DoLogin");

                if (ObjErrMsg != null && ObjErrMsg.Value != null)
                {
                    errmsg = Convert.ToString(ObjErrMsg.Value);
                }
                if (ObjPassword != null && ObjPassword.Value != null)
                {
                    pwd = Convert.ToString(ObjPassword.Value);
                }

                if (ObjUserName != null && ObjUserName.Value != null)
                {
                    userName = Convert.ToString(ObjUserName.Value);
                }
                if (ObjUseId != null && ObjUseId.Value != null)
                {
                    userId = Convert.ToInt32(ObjUseId.Value);
                }
                if (ObjUseTypeId != null && ObjUseTypeId.Value != null)
                {
                    userTypeId = Convert.ToInt32(ObjUseTypeId.Value);
                }
                if (ObjCanCreateUser != null && ObjCanCreateUser.Value != null)
                {
                    canCreateUser = Convert.ToBoolean(ObjCanCreateUser.Value);
                }
                if (ObjUserMobile != null && ObjUserMobile.Value != null)
                {
                    mobileNo = Convert.ToString(ObjUserMobile.Value);
                }
                if (ObjUserLandingPage != null && ObjUserLandingPage.Value != null)
                {
                    landingPage = Convert.ToString(ObjUserLandingPage.Value);
                }
                if (objUserStatus != null && objUserStatus.Value != null)
                {
                    userStatus = Convert.ToBoolean(objUserStatus.Value);
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing DoLogin in UserManager.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            if (userId > 0)
            {
                pwd = objCrypto.Decrypt(pwd);
                if (pwd.Equals(password))
                {
                    return(true);
                }
                else
                {
                    errmsg = "Re-check your password.";
                    return(false);
                }
            }
            else
            {
                return(false);
            }
        }
Beispiel #15
0
        private void UpdateUserTransctionalDetails(string euserEmailId, string orderNumb, string euserId, string id = null)
        {
            var objSecurePage    = new SecurePage();
            var objCrypto        = new ClsCrypto(ClsSecurity.GetPasswordPhrase(Common.PassPhraseOne, Common.PassPhraseTwo));
            var objMailTemplates = new MailTemplates();
            var objSecure        = new SecurePage();

            euserEmailId = euserEmailId.Replace(" ", "+");
            string emailId = Convert.ToString(objCrypto.Decrypt(euserEmailId));

            try
            {
                euserId = euserId.Replace(" ", "+");
                string userId      = Convert.ToString(objCrypto.Decrypt(euserId));
                string orderNumber = orderNumb.Replace(" ", "+");
                orderNumber = Convert.ToString(objCrypto.Decrypt(orderNumber));
                var i = new Common().UpdateOrderIdForProduct(objSecurePage.LoggedInUserId, false, Request["id"] != null ? null : orderNumber,
                                                             "Online",
                                                             Request["id"] != null ? Convert.ToInt32(Request["id"]) : 0);
                if (i > 0)
                {
                    var userDetails = UserManagerProvider.Instance.GetUserListById(Convert.ToInt32(userId));
                    var sp          = userDetails.First();
                    objSecure.LoggedInUserEmailId = emailId;
                    objSecure.LoggedInUserId      = sp.UserId;
                    objSecure.LoggedInUserName    = Common.GetStringProperCase(sp.UserFullName);
                    objSecure.LoggedInUserType    = sp.UserCategoryId;
                    objSecure.LoggedInUserMobile  = sp.MobileNo;
                    lblName.Text = Common.GetStringProperCase(sp.UserFullName);
                    var mail = new MailMessage
                    {
                        From    = new MailAddress(ApplicationSettings.Instance.Email),
                        Subject = "AdmissionJankari:Product Payment confirmation for order number:" + orderNumber
                    };
                    var objCarProduct = new Common().GetProductForCart(0, id == null?orderNumber:null,
                                                                       id == null ? 0 : Convert.ToInt32(id));
                    var body = objMailTemplates.SendProductConfirmationMailAfterSuccess(objSecurePage.LoggedInUserName,
                                                                                        orderNumber,
                                                                                        objCarProduct.Tables[0],
                                                                                        "Online");
                    mail.Body = body;
                    mail.To.Add(emailId);
                    mail.Bcc.Add(ClsSingelton.bccDirectAdmission);
                    Utils.SendMailMessageAsync(mail);
                    sucessMsg.Visible = true;
                }
                else
                {
                    failureMsg.Visible = true;
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                failureMsg.Visible = true;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo =
                    "Error while executing UpdateUserTransctionalDetails in PaymentConformation.aspx for user :: -> ";
                var objPub = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
        }
        protected void btnPayNow_Click(object sender, EventArgs e)
        {
            SecurePage _objSecurePage = new SecurePage();

            _ObjCommon = new Common();

            var           objCrypto        = new ClsCrypto(ClsSecurity.GetPasswordPhrase(Common.PassPhraseOne, Common.PassPhraseTwo));
            MailTemplates objMailTemplates = new MailTemplates();
            string        formNumber       = "ADMJ" + System.DateTime.Now.Year + _ObjCommon.CourseId.ToString() + _objSecurePage.LoggedInUserId.ToString();

            ConsullingCourseAmount = lblCash.Text;
            string TransectionDetails = "You have selected the payment mode through Online Payment of" + " " + "Rs." + " " + lblCash.Text + "/- ";
            var    UserDetails        = UserManager.Instance.GetUserListById(_objSecurePage.LoggedInUserId);


            var sp = UserDetails.First();
            UserRegistrationProperty _ObjUserRegistrationProperty = new
                                                                    UserRegistrationProperty
            {
                UserFullName              = _objSecurePage.LoggedInUserName,
                UserGender                = sp.UserGender,
                UserEmailid               = _objSecurePage.LoggedInUserEmailId,
                MobileNo                  = _objSecurePage.LoggedInUserMobile,
                PhoneNo                   = sp.PhoneNo,
                UserId                    = _objSecurePage.LoggedInUserId,
                CourseId                  = sp.CourseId,
                UserCategoryId            = _objSecurePage.LoggedInUserType,
                UserDOB                   = sp.UserDOB,
                UserStatus                = true,
                UserPassword              = sp.UserPassword,
                UserPincode               = txtPincode.Text.Trim(),
                UserCorrespondenceAddress = txtAddress.Text.Trim()
            };
            string ErrMsg = "";
            int    i      = UserManagerProvider.Instance.UpdateUserInfo(_ObjUserRegistrationProperty, 1, out ErrMsg);
            var    mail   = new MailMessage
            {
                From    = new MailAddress(ApplicationSettings.Instance.Email),
                Subject = "Direct Admission:Form Number" + formNumber
            };
            var body = objMailTemplates.SendValidationMailForTheDirectAdmission("http://www.admissionjankari.com/", _objSecurePage.LoggedInUserName, formNumber, TransectionDetails);

            mail.Body = body;
            mail.To.Add(_objSecurePage.LoggedInUserEmailId);
            mail.Bcc.Add(ClsSingelton.bccDirectAdmission);
            Utils.SendMailMessageAsync(mail);
            libfuncs myUtility = new libfuncs();

            Merchant_Id.Value  = "M_shi18022_18022";
            Amount.Value       = lblCash.Text;
            Order_Id.Value     = formNumber + DateTime.Now.ToString("hh:mm:ss");
            Redirect_Url.Value = Utils.AbsoluteWebRoot + "ConformationPage.aspx?CID=" + objCrypto.Encrypt(_objSecurePage.LoggedInUserEmailId) + "&frmNumber=" + objCrypto.Encrypt(formNumber) + "&UID=" + objCrypto.Encrypt(_objSecurePage.LoggedInUserId.ToString());
            string WorkingKey = ClsSingelton.WorkingKey.Trim();

            Checksum.Value              = myUtility.getchecksum(Merchant_Id.Value, Order_Id.Value, Amount.Value, Redirect_Url.Value, WorkingKey);
            billing_cust_name.Value     = _objSecurePage.LoggedInUserName;
            billing_cust_address.Value  = txtAddress.Text.Trim();
            billing_cust_state.Value    = txtState.Text;
            billing_cust_country.Value  = "India";
            billing_cust_tel.Value      = _objSecurePage.LoggedInUserMobile;
            billing_cust_email.Value    = _objSecurePage.LoggedInUserEmailId;
            delivery_cust_name.Value    = "";
            delivery_cust_address.Value = "";
            delivery_cust_state.Value   = "";
            delivery_cust_country.Value = "";
            delivery_cust_tel.Value     = "";
            billing_cust_city.Value     = txtCity.Text;
            billing_zip_code.Value      = txtPincode.Text.Trim();
            delivery_cust_city.Value    = "";
            delivery_zip_code.Value     = "";
            _objConsulling              = new Consulling();
            i = _objConsulling.InsertUpdateUserTransctionalDetails(_objSecurePage.LoggedInUserId, formNumber);
            // Page.ClientScript.RegisterStartupScript(this.GetType(), "myKey", "PostDFormS();");
            ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), Guid.NewGuid().ToString(),
                                                    "PostDForm();", true);
        }
Beispiel #17
0
        public string saveSecurity(string sdt)
        {
            ClsSecurity cls = new ClsSecurity();

            return(ClsDES.Encrypt(cls.save(Cls序列化.DeserializeDataTable(ClsDES.Decrypt(sdt)))));
        }