コード例 #1
0
        protected int  InsertUserBasicInfo()
        {
            string ErrMsg = "";
            int    UserId = 0;

            _objSecurePage = new SecurePage();
            _ObjUserRegistrationProperty = new UserRegistrationProperty();

            try
            {
                _ObjUserRegistrationProperty = new
                                               UserRegistrationProperty {
                    UserFullName   = studentPerInfo.StudentName,
                    UserGender     = studentPerInfo.StudentGender,
                    UserEmailid    = studentPerInfo.StudentEmaiLid,
                    MobileNo       = studentPerInfo.StudentMobileNo,
                    PhoneNo        = studentPerInfo.StudentAlternameNo,
                    CourseId       = StudentCourseInfo.StudentCourse,
                    UserCategoryId = Convert.ToInt16(Usertype.Student),
                    UserDOB        = Convert.ToDateTime(studentPerInfo.StudentDOB),
                    UserFatherName = studentPerInfo.FatherName,
                    UserStatus     = true,
                    UserPassword   = studentPerInfo.StudentMobileNo
                };
                int i = UserManagerProvider.Instance.InsertUserInfo(_ObjUserRegistrationProperty, 1, out ErrMsg);
                UserId = _ObjUserRegistrationProperty.UserId;
                if (i <= 0)
                {
                    _ObjUserRegistrationProperty.UserId = UserId;
                    i = UserManagerProvider.Instance.UpdateUserInfo(_ObjUserRegistrationProperty, 1, out ErrMsg);
                }
                if (i > 0)
                {
                    _objSecurePage = new SecurePage();
                    _objSecurePage.LoggedInUserEmailId = studentPerInfo.StudentEmaiLid;
                    _objSecurePage.LoggedInUserId      = UserId;
                    _objSecurePage.LoggedInUserMobile  = studentPerInfo.StudentMobileNo;
                    _objSecurePage.LoggedInUserName    = studentPerInfo.StudentName;
                    _objSecurePage.LoggedInUserType    = Convert.ToInt16(Usertype.Student);
                }
                _ObjConsulling = new Consulling();
                _ObjCommon     = new Common();
                string formNumber = "ADMJ" + System.DateTime.Now.Year + _ObjCommon.CourseId.ToString() + _objSecurePage.LoggedInUserId.ToString();
                i = _ObjConsulling.InsertUpdateUserTransctionalDetails(_objSecurePage.LoggedInUserId, formNumber);
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing InsertUserBasicInfo in StudentCounselling.axpx  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(UserId);
        }
コード例 #2
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);
        }
コード例 #3
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);
        }
コード例 #4
0
ファイル: Register.ascx.cs プロジェクト: IryTech/170518
        protected void BtnCityRegisterClick(object sender, EventArgs e)
        {
            var errMsg = "";

            if (ddlCity.SelectedIndex <= 0)
            {
                return;
            }
            var cityData = CityProvider.Instacnce.GetCityById(Convert.ToInt16(ddlCity.SelectedValue));
            var query    = cityData.Select(result => new
            {
                countryId = result.CountryId,
                stateId   = result.StateId,
                stateName = result.StateName
            }).First();

            _objUserRegistrationProperty = new UserRegistrationProperty
            {
                UserCategoryId = Convert.ToInt16(hdnUserCategory.Value),
                UserFullName   = txtUserName.Text.Trim(),
                UserEmailid    = txtEmailId.Text.Trim(),
                MobileNo       = txtMobile.Text.Trim(),
                UserPassword   = hdnPassword.Value,
                UserId         = Convert.ToInt16(hdnUserId.Value),
                CityId         = Convert.ToInt16(ddlCity.SelectedValue),
                StateId        = query.stateId,
                CountryCode    = query.countryId
            };
            var status = UserManagerProvider.Instance.UpdateUserInfo(_objUserRegistrationProperty, 1, out errMsg);

            if (status > 0)
            {
                SetStatus("CommentSuccess", errMsg);
                ClearFields();
            }
            else
            {
                SetStatus("CommentError", errMsg);
            }
        }
コード例 #5
0
        public override int UpdateCourseByUser(UserRegistrationProperty objUserCategoryProperty, int modifiedBy)
        {
            _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);

            try
            {
                _objDataWrapper.AddParameter("@CourseId", objUserCategoryProperty.CourseId);
                _objDataWrapper.AddParameter("@CreatedBy", modifiedBy);

                _i = _objDataWrapper.ExecuteNonQuery("Aj_Proc_UpdateCourseByUser");
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing UpdateCourseByUser in UserManager.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(_i);
        }
コード例 #6
0
 protected void BtnSaveClick(object sender, EventArgs e)
 {
     try
     {
         if (flpImage.HasFile)
         {
             hdnUserImage.Value = flpImage.FileName;
             flpImage.SaveAs(Server.MapPath(new Common().GetFilepath("UserImage")) + flpImage.FileName);
         }
         var objUserRegistration = new UserRegistrationProperty
         {
             UserId      = Convert.ToInt32(Request["userId"].ToString()),
             CourseId    = Convert.ToInt32(ddlCourse.SelectedValue),
             CountryCode =
                 Convert.ToInt32(ddlCountry.SelectedValue),
             StateId        = Convert.ToInt32(ddlState.SelectedValue),
             CityId         = Convert.ToInt32(ddlCity.SelectedValue),
             UserCategoryId =
                 Convert.ToInt32(ddlUserCategory.SelectedValue),
             UserEmailid  = Convert.ToString(txtEmailId.Text),
             UserFullName =
                 Convert.ToString(
                     txtUserName.Text.Trim()),
             UserPassword =
                 Convert.ToString(
                     txtPassword.Text.Trim()),
             MobileNo = txtMobileNo.Text.Trim(),
             PhoneNo  =
                 Convert.ToString(
                     txtPhoneNo.Text.Trim()),
             UserCorrespondenceAddress =
                 Convert.ToString(
                     txtCorrsepondenceaddress.Text.Trim()),
             UserPermanentAddress =
                 Convert.ToString(
                     txtPopupUserPermanentAddress.Text.Trim()),
             UserPincode =
                 Convert.ToString(
                     txtPopupUserPinCode.Text.Trim()),
             UserStatus     = chkPopupUserStatus.Checked,
             UserGender     = rbtGender.SelectedValue,
             UserDOB        = Common.GetDateFromString(txtDOB.Text),
             UserImage      = hdnUserImage.Value,
             UserFatherName = txtFatherName.Text.Trim()
         };
         var errorMsg = "";
         var update   = UserManagerProvider.Instance.UpdateUserInfo(objUserRegistration, _objSecurePage.LoggedInUserId,
                                                                    out errorMsg);
         if (update > 0)
         {
             Response.Redirect("UserMaster.aspx");
         }
     }
     catch (Exception ex)
     {
         var err = ex.Message;
         if (ex.InnerException != null)
         {
             err = err + " :: Inner Exception :- " + ex.InnerException.Message;
         }
         const string addInfo = "Error while executing btnEdit_Click in UserMaster.aspx.cs  :: -> ";
         var          objPub  = new ClsExceptionPublisher();
         objPub.Publish(err, addInfo);
     }
 }
コード例 #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);
        }
コード例 #8
0
        private void InsertUserTestimonial()
        {
            try
            {
                if (Page.IsValid)
                {
                    var objmailTemplete = new MailTemplates();
                    var objTestimonialProperty = new TestimonialProperty();
                    int i, insert = 0; string errMsg = "";
                    if (string.IsNullOrWhiteSpace(txtTesimonial.FckValue))
                    {
                        RfvFck.Text = "Testimonial cannot be blank"; RfvFck.Visible = true; return;
                    }
                    if (Session["UID"] == null)
                    {
                        var objUserRegistrationProperty = new UserRegistrationProperty
                        {
                            UserFullName   = txtUserName.Text.Trim(),
                            UserEmailid    = txtUserEmailId.Text.Trim(),
                            MobileNo       = txtUserMobile.Text.Trim(),
                            UserCategoryId = Convert.ToInt16(Usertype.Student),
                            UserPassword   = txtUserMobile.Text.Trim(),
                            CourseId       = Convert.ToInt32(new Common().CourseId),
                        };

                        i = UserManagerProvider.Instance.InsertUserInfo(objUserRegistrationProperty, Convert.ToInt16(Usertype.Student), out errMsg);

                        if (i > 0)
                        {
                            objTestimonialProperty.UserID = Session["UID"] == null?Convert.ToInt32(objUserRegistrationProperty.UserId) : _objSecurePage.LoggedInUserId;

                            objTestimonialProperty.Testimonials = Convert.ToString(txtTesimonial.FckValue.Trim());
                            insert = NewsArticleNoticeProvider.Instance.InsertTestimonilasDetails(objTestimonialProperty, 1, out errMsg);
                            var mail = new MailMessage
                            {
                                From    = new MailAddress(ApplicationSettings.Instance.Email),
                                Subject = "AdmissionJankari: Registration mail "
                            };
                            var body = objmailTemplete.MailBodyForRegistation(txtUserName.Text.Trim(), txtUserEmailId.Text.Trim(), txtUserMobile.Text.Trim());
                            mail.Body = body;
                            mail.To.Add(objUserRegistrationProperty.UserEmailid);
                            Utils.SendMailMessageAsync(mail);
                        }
                        else
                        {
                            var userDetails = UserManagerProvider.Instance.GetUserListByEmailId(txtUserEmailId.Text.Trim());
                            if (userDetails != null)
                            {
                                var query1 = userDetails.First();
                                _objSecurePage.LoggedInUserId      = query1.UserId;
                                _objSecurePage.LoggedInUserType    = query1.UserCategoryId;
                                _objSecurePage.LoggedInUserEmailId = query1.UserEmailid;
                                _objSecurePage.LoggedInUserName    = query1.UserFullName;
                                _objSecurePage.LoggedInUserMobile  = query1.MobileNo;

                                objTestimonialProperty.UserID       = _objSecurePage.LoggedInUserId;
                                objTestimonialProperty.Testimonials = Convert.ToString(txtTesimonial.FckValue.Trim());
                                insert = NewsArticleNoticeProvider.Instance.InsertTestimonilasDetails(objTestimonialProperty, 1, out errMsg);
                            }
                        }
                    }
                    else
                    {
                        objTestimonialProperty.UserID       = Convert.ToInt32(Session["UID"]);
                        objTestimonialProperty.Testimonials = Convert.ToString(txtTesimonial.FckValue.Trim());
                        insert = NewsArticleNoticeProvider.Instance.InsertTestimonilasDetails(objTestimonialProperty, 1, out errMsg);
                    }

                    RfvFck.Visible      = false;
                    spnErrMsg.InnerHtml = "Your testimonial is successfully submitted";
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.InnerException.Message;
                }
                const string addInfo = "Error while executing InsertUserInfo in Testimonial.aspx  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
        }
コード例 #9
0
 public abstract int UpdateCourseByUser(UserRegistrationProperty objUserCategoryProperty, int modifiedBy);
コード例 #10
0
 public abstract int UpdateUserInfo(UserRegistrationProperty objUserRegistrationProperty, int modifiedBy, out string errmsg);
コード例 #11
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);
        }
コード例 #12
0
ファイル: Register.ascx.cs プロジェクト: IryTech/170518
        protected void BtnRegisterClick(object sender, EventArgs e)
        {
            var objmailTemplete = new MailTemplates();

            try
            {
                _objUserRegistrationProperty = new UserRegistrationProperty
                {
                    UserFullName   = txtUserName.Text.Trim(),
                    UserEmailid    = txtEmailId.Text.Trim(),
                    MobileNo       = txtMobile.Text.Trim(),
                    UserCategoryId = Convert.ToInt16(ddlUserCategory.SelectedValue),
                    CourseId       = ddlCourse.SelectedIndex > 0?Convert.ToInt16(ddlCourse.SelectedValue):0,
                    UserPassword   = txtMobile.Text.Trim()
                };

                var errMsg = "";
                var result = UserManagerProvider.Instance.InsertUserInfo(_objUserRegistrationProperty, 1, out errMsg);
                hdnUserId.Value       = Convert.ToString(_objUserRegistrationProperty.UserId);
                hdnUserCategory.Value = Convert.ToString(ddlUserCategory.SelectedValue);
                hdnPassword.Value     = _objUserRegistrationProperty.UserPassword;
                if (result > 0)
                {
                    switch (ddlUserCategory.SelectedItem.Text)
                    {
                    case "Student":
                        Page.ClientScript.RegisterStartupScript(Type.GetType("System.String"), "addScript",
                                                                "OpenPoup('popCollege,400,'btnRegister');", true);
                        break;

                    default:
                        Page.ClientScript.RegisterStartupScript(Type.GetType("System.String"), "addScript",
                                                                "OpenPoup('popCity',400,'btnRegister');", true);
                        break;
                    }
                    var mail = new MailMessage
                    {
                        From    = new MailAddress(ApplicationSettings.Instance.Email),
                        Subject = "AdmissionJankari: Registation mail "
                    };

                    var body = objmailTemplete.MailBodyForRegistation(txtUserName.Text, txtEmailId.Text, txtMobile.Text);
                    mail.Body = body;
                    mail.To.Add(_objUserRegistrationProperty.UserEmailid);
                    Utils.SendMailMessageAsync(mail);
                    SetStatus("CommentSuccess", errMsg);
                    ClearFields();
                }
                else
                {
                    SetStatus("CommentError", errMsg);
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.InnerException.Message;
                }
                const string addInfo = "Error while executing InsertUserInfo in Register.ascx  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
        }
コード例 #13
0
        //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);
            }
        }
コード例 #14
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);
        }
コード例 #15
0
        protected void BtnRegisterClick(object sender, EventArgs e)
        {
            lblInfo.Visible = false;
            var objmailTemplete = new MailTemplates();

            try
            {
                var collegeData =
                    new Common().CheckCollegeRegisteration(txtCollegeName.Text);
                if (Convert.ToInt16(collegeData.Rows[0]["TotalCount"]) <= 0)
                {
                    var stateList =
                        StateProvider.Instance.GetStateByStateId(Convert.ToInt32(ddlState.SelectedValue)).ToList().First();
                    var objUserRegistrationProperty = new UserRegistrationProperty
                    {
                        UserFullName   = txtCollegeContactPersonName.Text.Trim(),
                        UserEmailid    = txtEmailId.Text.Trim(),
                        MobileNo       = txtMobile.Text.Trim(),
                        UserCategoryId = Convert.ToInt32(Usertype.College),
                        UserPassword   = txtMobile.Text.Trim()
                    };
                    var errMsg = "";
                    var result = UserManagerProvider.Instance.InsertUserInfo(objUserRegistrationProperty,
                                                                             Convert.ToInt32(Usertype.College), out errMsg);
                    var userList = UserManagerProvider.Instance.GetUserListByEmailId(txtEmailId.Text.Trim());
                    if (result > 0)
                    {
                        DoCollegeRegister(userList.First().UserId, stateList.CountryId);
                    }
                    else
                    {
                        if (userList.Count > 0)
                        {
                            spnEmailError.Visible  = true;
                            spnEmailError.CssClass = "error";
                            spnEmailError.Text     =
                                string.Format(
                                    "{0} ,You are registered as " + userList.First().UserCategoryName + ". Please login or use different emailId",
                                    Common.GetStringProperCase(txtCollegeContactPersonName.Text.Trim()));
                            spnEmailError.Focus();
                        }
                    }
                }
                else
                {
                    spnEmailError.Visible  = true;
                    spnEmailError.CssClass = "error";
                    spnEmailError.Text     = "The college is registered with us. Please <a href='/account/college-login'> login. </a> or <a href='/contact-us'> contact us.</a></span>";
                    spnEmailError.Focus();
                }
            }
            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 CollegeRegisteration.ascx  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
        }
コード例 #16
0
        protected void BtnAddCommentClick(object sender, EventArgs e)
        {
            var errmsg          = "";
            var objmailTemplete = new MailTemplates();


            try
            {
                var objUserRegistrationProperty = new UserRegistrationProperty
                {
                    UserFullName   = txtUserNameComment.Text.Trim(),
                    UserEmailid    = txtEmailIdComment.Text.Trim(),
                    MobileNo       = txtMobileComment.Text.Trim(),
                    UserCategoryId =
                        Convert.ToInt16(Usertype.Student),
                    UserPassword = txtMobileComment.Text.Trim(),
                    CourseId     = Convert.ToInt32(hdnCourseComment.Value)
                };


                var errMsg = "";
                var result = UserManagerProvider.Instance.InsertUserInfo(objUserRegistrationProperty,
                                                                         Convert.ToInt16(Usertype.Student),
                                                                         out errMsg);

                if (result > 0)
                {
                    var result1 = UserManagerProvider.Instance.GetUserListByEmailId(txtEmailIdComment.Text.Trim());

                    if (result1.Count > 0)
                    {
                        var query = result1.First();
                        _objSecurePage.LoggedInUserId      = query.UserId;
                        _objSecurePage.LoggedInUserType    = query.UserCategoryId;
                        _objSecurePage.LoggedInUserEmailId = query.UserEmailid;
                        _objSecurePage.LoggedInUserName    = query.UserFullName;
                        _objSecurePage.LoggedInUserMobile  = query.MobileNo;
                    }
                    var mail = new MailMessage
                    {
                        From    = new MailAddress(ApplicationSettings.Instance.Email),
                        Subject = "AdmissionJankari: Registration mail "
                    };



                    var body = objmailTemplete.MailBodyForRegistation(txtUserNameComment.Text.Trim(),
                                                                      txtEmailIdComment.Text.Trim(),
                                                                      txtMobileComment.Text.Trim());
                    mail.Body = body;
                    mail.To.Add(objUserRegistrationProperty.UserEmailid);
                    Utils.SendMailMessageAsync(mail);
                }
                else
                {
                    var userDetails =
                        UserManagerProvider.Instance.GetUserListByEmailId(txtEmailIdComment.Text.Trim())
                        .FirstOrDefault();
                    if (userDetails != null)
                    {
                        _objSecurePage.LoggedInUserId      = userDetails.UserId;
                        _objSecurePage.LoggedInUserType    = userDetails.UserCategoryId;
                        _objSecurePage.LoggedInUserEmailId = userDetails.UserEmailid;
                        _objSecurePage.LoggedInUserName    = userDetails.UserFullName;
                        _objSecurePage.LoggedInUserMobile  = userDetails.MobileNo;
                    }
                }
                var errCommentMsg = "";
                var commentResult = new Common().InsertUserCoomment(_objSecurePage.LoggedInUserId, CommentType,
                                                                    CommentTypeId,
                                                                    txtComment.Text, out errCommentMsg);
                if (commentResult > 0)
                {
                    var mail = new MailMessage
                    {
                        From    = new MailAddress(ApplicationSettings.Instance.Email),
                        Subject = "AdmissionJankari:Comment information"
                    };
                    var commentSection = CommentSection(CommentType);

                    var body = objmailTemplete.MailBodyForUserCommentToAdmin(_objSecurePage.LoggedInUserName,
                                                                             _objSecurePage.LoggedInUserMobile,
                                                                             _objSecurePage.LoggedInUserEmailId,
                                                                             commentSection, txtComment.Text.Trim());

                    mail.To.Add(ClsSingelton.CommentMailId);
                    mail.Body = body;
                    Utils.SendMailMessageAsync(mail);
                    SetStatus("CommentSuccess", errCommentMsg);
                }
                else
                {
                    SetStatus("CommentError", errCommentMsg);
                }
                txtComment.Text = string.Empty;
                Page.ClientScript.RegisterStartupScript(Type.GetType("System.String"), "addScript",
                                                        "close();", true);
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.InnerException.Message;
                }
                const string addInfo =
                    "Error while executing UcCommonComment in BtnAddCommentClick  :: -> ";
                var objPub = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
        }
コード例 #17
0
 public abstract int InsertUserInfo(UserRegistrationProperty objUserRegistrationProperty, int createdBy, out string errmsg);
コード例 #18
0
        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);
        }
コード例 #19
0
        protected void btnEdit_Click(object sender, EventArgs e)
        {
            try
            {
                var objUserRegistration = new UserRegistrationProperty
                {
                    UserId      = Convert.ToInt32(hndUserId.Value),
                    CourseId    = Convert.ToInt32(hndCourseId.Value),
                    CountryCode =
                        Convert.ToInt32(hndCountryId.Value),
                    StateId        = Convert.ToInt32(hndStateId.Value),
                    CityId         = Convert.ToInt32(hndCityId.Value),
                    UserCategoryId =
                        Convert.ToInt32(hndCategoryId.Value),
                    UserEmailid  = Convert.ToString(hndEmailID.Value),
                    UserFullName =
                        Convert.ToString(
                            txtPopupUserName.Text.Trim()),
                    UserPassword =
                        Convert.ToString(
                            txtPopupUserPassword.Text.Trim()),
                    PhoneNo =
                        Convert.ToString(
                            txtPopupUserPhoneNo.Text.Trim()),
                    UserCorrespondenceAddress =
                        Convert.ToString(
                            txtPopupCorresPondence.Text.Trim()),
                    UserPermanentAddress =
                        Convert.ToString(
                            txtPopupUserPermanentAddress.Text.Trim()),
                    UserPincode =
                        Convert.ToString(
                            txtPopupUserPinCode.Text.Trim()),
                    UserStatus = chkPopupUserStatus.Checked,
                    UserGender = rbtGender.SelectedValue,
                    UserDOB    = Common.GetDateFromString(txtDOB.Text)
                };
                var errorMsg = "";
                var update   = UserManagerProvider.Instance.UpdateUserInfo(objUserRegistration, LoggedInUserId,
                                                                           out errorMsg);
                if (update > 0)
                {
                    lblPopupMessage.Visible = true;
                    lblPopupMessage.Text    = errorMsg;
                    ClearControls();
                }
                BindUserMasterDetail();
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.InnerException.Message;
                }
                const string addInfo = "Error while executing btnEdit_Click in UserMaster.aspx.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }

            Page.ClientScript.RegisterStartupScript(Type.GetType("System.String"), "addScript",
                                                    "close();", true);
        }