Beispiel #1
0
        public MailTemplates GetMailTemplates()
        {
            //string connectionString = ConfigurationManager.ConnectionStrings["DatabaseContext"].ConnectionString;
            List <MailTemplate> mailTemplatesList;

            using (var dc = new SqlConnection(""))
            {
                mailTemplatesList = dc.Query <MailTemplate>(@"
					SELECT
						[Id]
						,[UserType]
						,[Title]
						,[EmailContent]
						,[EmailDisclaimerNeeded]
						,[TextContent]
						,[Notes]
						,[SendTo]
						,[EmailDisclaimerContent]
						,[SupportEmail]
					FROM [support].[MailTemplates]"                    ).ToList();
            }
            var mailTemplates = new MailTemplates();

            mailTemplatesList.ForEach(e => mailTemplates.Add(e));
            return(mailTemplates);
        }
Beispiel #2
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 #3
0
        protected void Finsh(object sender, EventArgs e)
        {
            var objSecurePage = new SecurePage();
            var objConsulling = new Consulling();

            _objCommon = new Common();
            var objMailTemplates = new MailTemplates();
            var ddNumber         = string.Empty;
            var formNum          = "ADMJ" + DateTime.Now.Year + _objCommon.CourseId.ToString() + objSecurePage.LoggedInUserId.ToString();
            var tranctionDetails = string.Empty;

            if (rbtnPaymentType.SelectedValue == "OnPayment")
            {
                OnlinePayment();
            }

            int i    = objConsulling.InsertUpdateUserTransctionalDetails(objSecurePage.LoggedInUserId, formNum, false, rbtnPaymentType.SelectedItem.ToString(), "", "", "26100");
            var mail = new MailMessage
            {
                From    = new MailAddress(ApplicationSettings.Instance.Email),
                Subject = "Direct Admission:Form Number" + formNum
            };

            var body = objMailTemplates.SendValidationMailForTheBookSeat("http://www.admissionjankari.com/", objSecurePage.LoggedInUserName, formNum, rbtnPaymentType.SelectedItem.ToString(), _objCommon.CourseName);

            mail.Body = body;
            mail.To.Add(objSecurePage.LoggedInUserEmailId);
            mail.Bcc.Add(ClsSingelton.bccDirectAdmission);
            Utils.SendMailMessageAsync(mail);
            if (rbtnPaymentType.SelectedValue != "OnPayment")
            {
                Response.Redirect(Utils.AbsoluteWebRoot + "ConformationPage.aspx/");
            }
        }
Beispiel #4
0
    protected void btnSubmit_Click(object sender, ImageClickEventArgs e)
    {
        PIKCV.BUS.Company obj      = new PIKCV.BUS.Company();
        string            UserName = "******" + Util.CreateRandomNumber(6);
        string            Password = Util.CreateRandomNumber(8);
        string            Email    = txtEmail.Text;
        string            Notes    = txtNotes.Text;
        int SavedTempUserID        = obj.SaveCompanyTemporaryUser(this.smCompanyID, Email, this.FolderID, UserName, Password, Notes);

        if (SavedTempUserID > 0)
        {
            //Mail yollanacak

            if (MailTemplates.Send_Tmp_TemporaryUser(MailTemplates.TemporaryUser, UserName, Password, Notes, Email))
            {
                string strErr = PIKCV.COM.Data.GetErrorMessageCache(this.cmbErrors, PIKCV.COM.EnumDB.ErrorTypes.SharedFolder);
                Response.Write("<script>alert('" + strErr + "');this.close();</script>");
            }
            else
            {
                lbMessage.Text = "Klasör paylaþýmý yapýldý fakat bilgiler mail gönderilemedi.";
            }
        }
        else
        {
            lbMessage.Text = "Kayýt yapýlýrken bir hata oluþtu, lütfen tekrar deneyin";
        }
        pnlMessage.Visible = true;
    }
        protected void btnUniversityCategoryName_Click(object sender, EventArgs e)
        {
            try
            {
                var errMsg      = "";
                var i           = new Common().UpdateUserStatus(Convert.ToInt32(hndCollegeBranchId.Value), out errMsg, LoggedInUserId, Convert.ToBoolean(rbtLoginStatus.SelectedValue));
                var collegeDtaa = new Common().GetCollegeuserDetails(Convert.ToInt32(hndCollegeBranchId.Value));
                if (Convert.ToBoolean(rbtLoginStatus.SelectedValue))
                {
                    if (collegeDtaa.Rows.Count > 0)
                    {
                        var objMailTemplete = new MailTemplates();
                        var userData        = UserManagerProvider.Instance.GetUserListById(Convert.ToInt32(Convert.ToInt32(hndCollegeBranchId.Value)));
                        var objMail         = new MailMessage
                        {
                            From    = new MailAddress(ApplicationSettings.Instance.Email),
                            Subject =
                                collegeDtaa.Rows[0]["AjCollegeBranchName"].ToString() +
                                " College Verification Mail By AdmissionJankari.com"
                        };
                        var url      = "<a href=" + Utils.AbsoluteWebRoot + "account/college-login" + ">College Login</a>";
                        var mailbody =
                            objMailTemplete.MailToCollegeForRegisterationVerification(
                                userData.First().UserFullName.Trim(),
                                collegeDtaa.Rows[0]["AjCollegeBranchName"].ToString(),
                                userData.First().UserEmailid.Trim(), userData.First().MobileNo.Trim(), url);
                        objMail.Body = mailbody;
                        objMail.To.Add("*****@*****.**");
                        objMail.IsBodyHtml = true;
                        Utils.SendMailMessageAsync(objMail);
                    }
                }


                if (!string.IsNullOrEmpty(txtCollege.Text.Trim()))
                {
                    SearchByCollegeName();
                }
                else
                {
                    BindRegisteredCollege(0);
                }
                lblErrMsg.CssClass = "success";
                lblErrMsg.Text     = collegeDtaa.Rows[0]["AjCollegeBranchName"].ToString() + " college status updated successfully";
            }

            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo =
                    "Error while executing RptCollegeListItemCommand in AdminPanel/UpdateCollegeRegisterationStatus.aspx.cs  :: -> ";
                var objPub = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
        }
Beispiel #6
0
 public MailTemplates LIB_MailTemplates()
 {
     if (_mailTemplates == null)
     {
         _mailTemplates = new MailTemplates();
     }
     return(_mailTemplates);
 }
Beispiel #7
0
        protected void btnUpdateStatus_Click(object sender, EventArgs e)
        {
            var objConsulling = new Consulling();

            _objCommon = new Common();
            try
            {
                var i = objConsulling.InsertUpdateUserTransctionalDetails(Convert.ToInt32(hdnUserId.Value),
                                                                          hdnForm.Value, chkPaymentStatus.Checked,
                                                                          ddlTransaction.SelectedValue,
                                                                          txtBank.Text,
                                                                          Convert.ToString(hdnForm.Value +
                                                                                           DateTime.Now.ToString(
                                                                                               "hh:mm:ss")),
                                                                          txtPayment.Text);
                if (i > 0)
                {
                    var objmailTemplete = new MailTemplates();


                    var mail = new MailMessage
                    {
                        From    = new MailAddress(ApplicationSettings.Instance.Email),
                        Subject = "AdmissionJankari: Payment information"
                    };
                    var url = Utils.AbsoluteWebRoot + "account/login/";

                    var body = objmailTemplete.MailBodyForPaymentConformation(url, hdnUserName.Value, hdnForm.Value,
                                                                              ddlTransaction.SelectedValue,
                                                                              Convert.ToString(hdnForm.Value +
                                                                                               DateTime.Now
                                                                                               .ToString(
                                                                                                   "hh:mm:ss")));
                    mail.Body = body;
                    mail.To.Add(hdnEmail.Value);
                    Utils.SendMailMessageAsync(mail);
                    lblErorrMsg.CssClass = "info";
                    lblErorrMsg.Visible  = true;
                    lblErorrMsg.Text     = string.Format("Transaction status is successfully updated", "ARG0");
                    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 btnUpdateStatus_Click in OnilneCounsellingMember.aspx  :: -> ";
                var objPub = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
        }
Beispiel #8
0
        // Method to Insert User Donation Request
        protected void InsertUserDonationReqest()
        {
            _objCommon = new Common();
            string errMsg = "";


            try
            {
                if (Page.IsValid)
                {
                    int i = _objCommon.InsertUserDonationRequest(txtUserName.Text, txtUserMobile.Text, txtUserEmailId.Text, txtCollegeName.Text,
                                                                 Convert.ToInt32(ddlCourse.SelectedValue), txtaccusedName.Text, txtAccusedEmailId.Text, txtAccusedMobileNo.Text, Convert.ToInt16(IryTech.AdmissionJankari.BO.Usertype.Student),
                                                                 txtIncident.Text, out errMsg);
                    if (i > 0)
                    {
                        spnErrMsg.InnerHtml = errMsg;
                        spnErrMsg.Visible   = true;
                        spnErrMsg.Focus();
                        MailTemplates _objmailTemplete = new MailTemplates();
                        var           mail             = new MailMessage
                        {
                            From    = new MailAddress(ApplicationSettings.Instance.Email),
                            Subject = "AdmissionJankari: Report Donation"
                        };
                        var body = _objmailTemplete.MailBodyForDonationUser(txtUserName.Text);
                        mail.To.Add(txtUserEmailId.Text);
                        mail.Body = body;
                        Utils.SendMailMessageAsync(mail);

                        mail = new MailMessage
                        {
                            From    = new MailAddress(ApplicationSettings.Instance.Email),
                            Subject = "AdmissionJankari:Donation Complain"
                        };
                        body = _objmailTemplete.MailBodyForDonationAdmin(txtUserName.Text, txtUserEmailId.Text, txtUserMobile.Text, ddlCourse.SelectedItem.ToString(),
                                                                         txtCollegeName.Text, txtaccusedName.Text, txtAccusedMobileNo.Text, txtAccusedEmailId.Text, txtIncident.Text);

                        mail.To.Add(ClsSingelton.donationMailId);
                        mail.Body = body;
                        Utils.SendMailMessageAsync(mail);
                    }
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing InsertUserDonationReqest in UcReportDonation.ascx  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
        }
Beispiel #9
0
    protected void imgContinue_Click(object sender, ImageClickEventArgs e)
    {
        string ErrMsg = String.Empty;
        string Email = txtEMail.Text.Trim();
        string Password = txtPassword.Text.Trim();
        string IdentityNo = txtIdentityNo.Text.Trim();

        if (Util.isNeedClearString(Email)) { ErrMsg += PIKCV.COM.Data.GetErrorMessageCache(this.cmbErrors, PIKCV.COM.EnumDB.ErrorTypes.ValidationEmail); }
        if (Util.isNeedClearString(Password)) { ErrMsg += PIKCV.COM.Data.GetErrorMessageCache(this.cmbErrors, PIKCV.COM.EnumDB.ErrorTypes.ValidationPassword); }
        if (Util.isNeedClearString(IdentityNo)) { ErrMsg += PIKCV.COM.Data.GetErrorMessageCache(this.cmbErrors, PIKCV.COM.EnumDB.ErrorTypes.ValidationIdentity); }

        if (ErrMsg == String.Empty)
        {
            PIKCV.BUS.User objUser = new PIKCV.BUS.User();

            if ((this.smIsLogin) || (!objUser.UserExist(Email, IdentityNo)))
            {
                int SavedUserID = objUser.SaveUserInfo(this.smUserID, txtName.Text, txtSurName.Text, Email, IdentityNo, Password, txtPrivateQuestion.Text, txtPrivateAnswer.Text, chIsWantedSMS.Checked);
                this.smFirstName = txtName.Text;
                this.smLastName = txtSurName.Text;
                if (SavedUserID > 0)
                {
                    if (!this.smIsLogin)
                    {
                        string ActivationCode = PIKCV.COM.Util.CreateActivationNumber(SavedUserID);
                        if (objUser.SaveActivation(SavedUserID, ActivationCode))
                        {
                            //Aktivasyon Linkini Mail Yolla 
                            if (MailTemplates.Send_Tmp_Activation(MailTemplates.Activation, ActivationCode, SavedUserID, this.smFirstName, this.smLastName, Email))
                            {
                                this.Redirect("Employee-Membership-CV");    //2.Adýma Yönlendir 
                            }
                            else
                            {
                                ErrMsg += PIKCV.COM.Data.GetErrorMessageCache(this.cmbErrors, PIKCV.COM.EnumDB.ErrorTypes.OkSaveNoSendMail); //**
                            }
                        }
                    }
                    else
                    {
                        this.Redirect("Employee-Membership-CV");
                    }
                }
                else
                {
                    ErrMsg += PIKCV.COM.Data.GetErrorMessageCache(this.cmbErrors, PIKCV.COM.EnumDB.ErrorTypes.NoSave);
                }
            }
            else
            {
                ErrMsg += PIKCV.COM.Data.GetErrorMessageCache(this.cmbErrors, PIKCV.COM.EnumDB.ErrorTypes.UserExist);
            }
        }
        this.ShowError(ErrMsg);
    }
Beispiel #10
0
    protected void ImgBtnSend_Click(object sender, ImageClickEventArgs e)
    {
        PIKCV.BUS.User objUser = new PIKCV.BUS.User();
        DataRow        drUser  = null;

        if (trEmail.Visible)
        {
            drUser = objUser.GetUserByEmail(txtEmail.Text);
            if (drUser != null)
            {
                trEmail.Visible          = false;
                trSecretQuestion.Visible = true;
                trSecretAnswer.Visible   = true;
                this.fpUserID            = Convert.ToInt32(drUser["UserID"]);
                ltlSecretQuestion.Text   = drUser["SecretQuestion"].ToString();
                ltlInfoMessage.Text      = "Þifreniz gizli soruya verdiðiniz cevaptan sonra e-posta adresinize gönderilecektir";
            }
            else
            {
                Response.Write("<script>alert('Bu eposta adresi ile kayýtlý kullanýcý bulunamadý!')</script>");
            }
        }
        else if (trSecretQuestion.Visible)
        {
            DataTable dtUserDetail = objUser.GetUserDetail(this.fpUserID);
            if (dtUserDetail.Rows[0]["SecretAnswer"].ToString() == txtSecretAnswer.Text.Trim())
            {
                string Pass  = Encryption.Decrypt(dtUserDetail.Rows[0]["Password"].ToString());
                string Email = dtUserDetail.Rows[0]["Email"].ToString();
                if (MailTemplates.Send_Tmp_ForgotPass(MailTemplates.ForgotPassword, Pass, dtUserDetail.Rows[0]["FirstName"].ToString(), dtUserDetail.Rows[0]["LastName"].ToString(), Email))
                {
                    //Response.Write("<script>alert('Þifreniz Email Adresinize Gönderildi')</script>");
                    //this.GoToDefaultPage();
                    this.GoToFeedback(PIKCV.COM.EnumDB.ErrorTypes.ForgotPassword);
                }
                else
                {
                    Response.Write("<script>alert('Þifreniz Email Adresinize Gönderirken Hata Oluþtu')</script>");
                }
            }
            else
            {
                this.smSecretAnswerCount++;

                if (this.smSecretAnswerCount >= MaxSecretAnswerCount)
                {
                    Cookie objCook = new Cookie();
                    objCook.Write(PIKCV.COM.EnumUtil.Cookies.UserIP, Request.ServerVariables["REMOTE_ADDR"].ToString());
                }
                dvScript.InnerHtml = "<script>alert('Gizli sorunuzun cevabýný yanlýþ girdiniz, tekrar giriþ yapýnýz')</script>";
            }
        }
    }
        protected void BtnCommentClick(object sender, EventArgs e)
        {
            var errmsg          = "";
            var objmailTemplete = new MailTemplates();

            try
            {
                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;
            }
            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 BtnCommentClick  :: -> ";
                var objPub = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
        }
Beispiel #12
0
        public void changeEmailTemplateDetail(EmailTemplatesViewModel model)
        {
            MailTemplates mailTemplatesModel = _mainContext.mailTemplates.Where(w => w.id == model.id).FirstOrDefault();

            mailTemplatesModel.mailContent = model.mailContent;
            mailTemplatesModel.mailHeader  = model.mailHeader;
            if (_mainContext.SaveChanges() == 1)
            {
                ToastrService.AddToUserQueue(new Toastr("Tebrikler e-posta taslağınızı başarıyla güncellediniz.", type: Model.Enums.ToastrType.Success));
            }
            else
            {
                ToastrService.AddToUserQueue(new Toastr("E-posta taslağınızı güncellerken bir hata gerçekleşti.", type: Model.Enums.ToastrType.Error));
            }
        }
Beispiel #13
0
        protected void sendMailtoUser(string courseName)
        {
            var objMailTemplete = new MailTemplates();
            var objMail         = new MailMessage
            {
                From    = new MailAddress(ApplicationSettings.Instance.Email),
                Subject = "Refund Application Received"
            };
            var mailbody = objMailTemplete.MailToUserforRefundSent(txtRefundName.Text.Trim().ToString(), txtRefundForm.Text.Trim().ToString(), DateTime.Today.ToString("dd/MM/yyyy"), courseName);

            objMail.Body = mailbody;

            objMail.To.Add(txtRefundEmailId.Text.Trim().ToString());
            objMail.IsBodyHtml = true;
            Utils.SendMailMessageAsync(objMail);
        }
Beispiel #14
0
    protected void ImgBtnSend_Click(object sender, ImageClickEventArgs e)
    {
        PIKCV.BUS.Company objCompany = new PIKCV.BUS.Company();
        DataRow           drCompany  = null;

        if (trEmail.Visible)
        {
            drCompany = objCompany.GetCompanyByEmail(txtEmail.Text);
            if (drCompany != null)
            {
                trEmail.Visible          = false;
                trSecretQuestion.Visible = true;
                trSecretAnswer.Visible   = true;
                this.fpCompanyID         = Convert.ToInt32(drCompany["CompanyID"]);
                ltlSecretQuestion.Text   = drCompany["SecretQuestion"].ToString();
                ltlInfoMessage.Text      = "Þifreniz gizli soruya verdiðiniz cevaptan sonra e-posta adresinize gönderilecektir";
            }
            else
            {
                Response.Write("<script>alert('Bu email adresi ile kayýtlý kullanýcý bulunamadý!')</script>");
            }
        }
        else if (trSecretQuestion.Visible)
        {
            DataTable dtCompanyDetail = objCompany.GetCompanyInfo(this.fpCompanyID);
            if (dtCompanyDetail.Rows[0]["SecretAnswer"].ToString() == txtSecretAnswer.Text.Trim())
            {
                string Pass  = Encryption.Decrypt(dtCompanyDetail.Rows[0]["Password"].ToString());
                string Email = dtCompanyDetail.Rows[0]["UserName"].ToString();

                if (MailTemplates.Send_Tmp_ForgotPassCompany(MailTemplates.ForgotPasswordCompany, Pass, dtCompanyDetail.Rows[0]["ContactName"].ToString(), dtCompanyDetail.Rows[0]["ContactLastName"].ToString(), Email))
                {
                    objCompany.UpdateCompanyPassword(this.fpCompanyID, Pass, true);
                    this.GoToFeedback(PIKCV.COM.EnumDB.ErrorTypes.ForgotPassword);
                }
                else
                {
                    Response.Write("<script>alert('Þifreniz Email Adresinize Gönderirken Hata Oluþtu')</script>");
                }
            }
            else
            {
                Response.Write("<script>alert('Gizli cevabýnýz yanlýþ!')</script>");
            }
        }
    }
Beispiel #15
0
    protected void imgSend_Click(object sender, ImageClickEventArgs e)
    {
        string MailBody = dvMessage.InnerHtml;

        MailBody += "<br><br>";
        MailBody += "gönderenin notu: " + txtNote.Text;

        if (MailTemplates.Send_FriendMail(MailTemplates.SendFriendToJob, txtTo.Text, txtSubject.Text, MailBody))
        {
            ShowModal.Show(UserControls_Common_uModalPopup.Icons.info, PIKCV.COM.EnumDB.ErrorTypes.NoticeSendFriend, true, true);
        }
        //Response.Write("<script>alert('" + PIKCV.COM.Data.GetErrorMessageCache(this.cmbErrors, PIKCV.COM.EnumDB.ErrorTypes.NoticeSendFriend) + "'); window.close();</script>");
        else
        {
            ShowModal.Show(UserControls_Common_uModalPopup.Icons.error, PIKCV.COM.Data.GetErrorMessageTitleCache(this.cmbErrors, PIKCV.COM.EnumDB.ErrorTypes.AsyncPostBackError), PIKCV.COM.Data.GetErrorMessageCache(this.cmbErrors, PIKCV.COM.EnumDB.ErrorTypes.AsyncPostBackError), false);
        }
    }
Beispiel #16
0
        protected void sendMailtoAdmin(string courseName)
        {
            var objMailTemplete = new MailTemplates();
            var objMail         = new MailMessage
            {
                From    = new MailAddress(ApplicationSettings.Instance.Email),
                Subject = "Request the refund for the form number " + txtRefundForm.Text.Trim().ToString()
            };
            var mailbody = objMailTemplete.MailToAdminforRefundSent(txtRefundName.Text.Trim().ToString(), txtRefundEmailId.Text.Trim().ToString(), txtRefundForm.Text.Trim().ToString(), DateTime.Today.ToString("dd/MM/yyyy"), courseName);

            objMail.Body = mailbody;

            objMail.To.Add(ClsSingelton.donationMailId);

            objMail.IsBodyHtml = true;
            Utils.SendMailMessageAsync(objMail);
        }
Beispiel #17
0
        protected void BtnChangePasswordClick(object sender, EventArgs e)
        {
            MailTemplates _objClsMailTemplete = new MailTemplates();

            try
            {
                string errMsg;
                var    result = UserManagerProvider.Instance.ChangePassword(1, txtOldPassword.Text.Trim(),
                                                                            txtNewPassword.Text.Trim(), out errMsg);
                if (result > 0)
                {
                    lblSuccess.Visible = true;
                    lblSuccess.Text    = errMsg;

                    var mail = new MailMessage
                    {
                        From    = new MailAddress(ApplicationSettings.Instance.Email),
                        Subject = "AdmissionJankari: Change passowrd mail "
                    };

                    var body = "";// _objClsMailTemplete.GetChangeSendPwd("http://www.admissionjankari.com/", txtEmail.Text.Trim(), txtNewPassword.Text);
                    mail.Body = body;
                    mail.To.Add(txtEmail.Text);
                    mail.IsBodyHtml = true;
                    Utils.SendMailMessageAsync(mail);
                }
                else
                {
                    lblInfo.Visible = true;
                    lblInfo.Text    = 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 ChangePassword in ChangePassword.ascx  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
        }
Beispiel #18
0
        protected void btnConfirm_Click(object sender, EventArgs e)
        {
            var objMailTemplates = new MailTemplates();
            var collegeName      = "";
            var objConsulling    = new Consulling();

            try
            {
                var ds = objConsulling.GetIntertestedCollege(ObjSecure.LoggedInUserId);
                if (ds != null && ds.Tables.Count > 0)
                {
                    for (var i = 0; i < ds.Tables[0].Rows.Count; i++)
                    {
                        collegeName += "<div><strong>" + (i + 1) + ". " + ds.Tables[0].Rows[i]["AjCollegeBranchName"] +
                                       "</strong></div><br/>";
                    }
                    var mail = new MailMessage
                    {
                        From    = new MailAddress(ApplicationSettings.Instance.Email),
                        Subject = "AdmissionJankari:Counselling Information"
                    };

                    var body = objMailTemplates.MailBodyForCOunsellingQuery(new SecurePage().LoggedInUserName,
                                                                            collegeName.TrimEnd(','));
                    mail.Body = body;
                    mail.To.Add(new SecurePage().LoggedInUserEmailId);
                    Utils.SendMailMessageAsync(mail);

                    Response.Redirect(Utils.ApplicationRelativeWebRoot + "counselling/Payment.aspx");
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex;
                }
                const string addInfo = "Error while executing btnConfirm_Click in  UcUserFinalList.ascx   :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
        }
Beispiel #19
0
        protected void btnAbuseReport_Click(object sender, EventArgs e)
        {
            var objMailTemplete = new MailTemplates();
            var errMsg          = "";
            var objSecure       = new SecurePage();
            var result          = new Common().InsertAbuseReport(objSecure.LoggedInUserId,
                                                                 Convert.ToInt32(ddlReportAbuseList.SelectedValue),
                                                                 txtReportAbuseContent.Text.Trim(), AbuseType,
                                                                 Convert.ToInt32(AbuseTypeId), out errMsg);

            if (result > 0)
            {
                var objMail = new MailMessage
                {
                    From    = new MailAddress(ApplicationSettings.Instance.Email),
                    Subject = "Abuse content information"
                };
                var mailbody = objMailTemplete.MailToUserForAbuse(objSecure.LoggedInUserName, ddlReportAbuseList.SelectedItem.Text);
                objMail.Body = mailbody;
                objMail.To.Add(objSecure.LoggedInUserEmailId);
                objMail.IsBodyHtml = true;
                Utils.SendMailMessageAsync(objMail);

                var mail = new MailMessage
                {
                    From    = new MailAddress(ApplicationSettings.Instance.Email),
                    Subject = "Abuse content information by " + objSecure.LoggedInUserName
                };
                var body = objMailTemplete.MailToAdminForAbuse(objSecure.LoggedInUserName, objSecure.LoggedInUserEmailId,
                                                               objSecure.LoggedInUserMobile, txtReportAbuseContent.Text,
                                                               ddlReportAbuseList.SelectedItem.Text);
                mail.Body = body;
                mail.To.Add(ClsSingelton.CommentMailId);
                mail.IsBodyHtml = true;
                Utils.SendMailMessageAsync(mail);
            }
            ddlReportAbuseList.ClearSelection();
            txtReportAbuseContent.Text = string.Empty;
            ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "tmp", "<script type='text/javascript'>Message('" + result + "','" + errMsg + "');</script>", false);
        }
Beispiel #20
0
        // Method To Change Passord

        protected int ChangePassword(int userId, string oldPassword, string newPassword)
        {
            _objMailTemplete = new MailTemplates();

            string errMsg = "";
            int    i      = 0;

            try
            {
                i = UserManagerProvider.Instance.ChangePassword(userId, oldPassword, newPassword, out errMsg);

                lblMsg.Visible = true;
                lblMsg.Text    = errMsg;
                if (i > 0)
                {
                    lblMsg.CssClass = "Sucess";
                }

                else
                {
                    lblMsg.CssClass = "Error";
                }
            }
            catch (Exception ex)
            {
                string err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.InnerException.Message;
                }
                const string addInfo = "Error in GETTING ChangePassword in UcChangePassword.axcs :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(i);
        }
Beispiel #21
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);
            }
        }
        protected void btnDownload_Click(object sender, EventArgs e)
        {
            Common _objCommon = new Common();
            string Msg        = "";
            var    userid     = 0;

            if (Utils.IsEmailValid(txtEmailId.Text))
            {
                MailTemplates _objMailTemplete = new MailTemplates();
                if (Utils.IsMobileValid(txtMobile.Text))
                {
                    QueryProperty objQueryProperty = new QueryProperty
                    {
                        StudentName       = txtName.Text,
                        UserEmailId       = txtEmailId.Text,
                        UserMobileNo      = txtMobile.Text,
                        StudentCityName   = "",
                        StudentCourseId   = Convert.ToInt16(ddlCourse.SelectedValue),
                        StudentQuery      = "User Download the Application from",
                        StudentCourseName = ddlCourse.SelectedItem.ToString(),
                    };
                    int i = QueryProvider.Instance.InsertCommonQuickQuery(objQueryProperty, out Msg, out userid);
                    if (i == 2)
                    {
                        var ObjMail = new MailMessage
                        {
                            From    = new MailAddress(ApplicationSettings.Instance.Email),
                            Subject = "AdmissionJankari:Registration"
                        };
                        var mailbody = _objMailTemplete.MailBodyForRegistation(txtName.Text, txtEmailId.Text, txtMobile.Text);
                        ObjMail.Body = mailbody;
                        ObjMail.To.Add(objQueryProperty.UserEmailId);
                        ObjMail.IsBodyHtml = true;
                        Utils.SendMailMessageAsync(ObjMail);
                    }
                    var mail = new MailMessage
                    {
                        From    = new MailAddress(ApplicationSettings.Instance.Email),
                        Subject = "AdmissionJankari:Download the application form"
                    };
                    var body = _objMailTemplete.MailBodyForDownloadApplicationfrom(txtName.Text, ddlCourse.SelectedItem.ToString());
                    mail.Body = body;
                    mail.To.Add(objQueryProperty.UserEmailId);
                    mail.IsBodyHtml = true;
                    Utils.SendMailMessageAsync(mail);

                    mail = new MailMessage
                    {
                        From    = new MailAddress(ApplicationSettings.Instance.Email),
                        Subject = "AdmissionJankari:Download the application form"
                    };
                    body      = _objMailTemplete.MailBodyForAdminToDownloadApplicationfrom(txtName.Text, ddlCourse.SelectedItem.ToString(), txtMobile.Text);
                    mail.Body = body;
                    mail.To.Add(ClsSingelton.bccDirectAdmission);
                    mail.IsBodyHtml = true;
                    Utils.SendMailMessageAsync(mail);
                    ClearControl();

                    try
                    {
                        ClearControl();
                        lblMsg.Visible = true;
                        lblMsg.Text    = "Thank you for downloading the application form";
                        string fName = HttpContext.Current.Server.MapPath("\\Resource\\Download") + @"\" + "ApplicationForm_FinalDec12_2012.pdf";

                        FileInfo fi = new FileInfo(fName);
                        long     sz = fi.Length;

                        Response.ClearContent();
                        Response.ContentType = MimeType(Path.GetExtension(fName));
                        Response.AddHeader("Content-Disposition", string.Format("attachment; filename = {0}", System.IO.Path.GetFileName(fName)));
                        Response.AddHeader("Content-Length", sz.ToString("F0"));
                        Response.TransmitFile(fName);
                        Response.End();
                    }
                    catch (Exception ex)
                    {
                        ClearControl();
                        lblMsg.Visible = true;
                        lblMsg.Text    = "Thank you for downloading the application form";
                    }
                }
                else
                {
                    lblMsg.Visible = true;
                    lblMsg.Text    = _objCommon.GetValidationMessage("revContactNo");
                }
            }
            else
            {
                lblMsg.Visible = true;
                lblMsg.Text    = _objCommon.GetValidationMessage("revEmail");
            }
        }
        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 #24
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);
            }
        }
Beispiel #25
0
        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);
            }
        }
Beispiel #26
0
        private void InsertUserIdAndCollegeId(int userId, int collegeId)
        {
            try
            {
                var errMsg    = "";
                var objCommon = new Common();
                var result    = objCommon.InsertUserIdAndCollegeId(userId, collegeId, out errMsg);

                if (result > 0)
                {
                    var objMailTemplete = new MailTemplates();

                    var objMail = new MailMessage
                    {
                        From    = new MailAddress(ApplicationSettings.Instance.Email),
                        Subject = "College Registration:" + txtCollegeName.Text.Trim()
                    };
                    var mailbody = objMailTemplete.MailToCollegeUser(txtCollegeContactPersonName.Text.Trim(),
                                                                     txtCollegeName.Text.Trim(),
                                                                     ddlState.SelectedItem.Text,
                                                                     ddlCity.SelectedItem.Text,
                                                                     txtCollegePhone.Text.Trim(),
                                                                     txtEmailId.Text.Trim(), txtMobile.Text.Trim());
                    objMail.Body = mailbody;
                    objMail.To.Add(txtEmailId.Text.Trim());
                    objMail.IsBodyHtml = true;
                    Utils.SendMailMessageAsync(objMail);

                    var objMail1 = new MailMessage
                    {
                        From    = new MailAddress(ApplicationSettings.Instance.Email),
                        Subject = "College Registration:" + txtCollegeName.Text.Trim()
                    };
                    var mailbody1 =
                        objMailTemplete.MailBodyForCollegeRegisterToAdmin(txtCollegeContactPersonName.Text.Trim(),
                                                                          txtCollegeName.Text.Trim(),
                                                                          ddlState.SelectedItem.Text,
                                                                          ddlCity.SelectedItem.Text,
                                                                          txtCollegePhone.Text.Trim(),
                                                                          txtEmailId.Text.Trim());
                    objMail1.Body = mailbody1;
                    objMail1.To.Add(ClsSingelton.CollegeRegisterationMailId);
                    objMail1.IsBodyHtml = true;
                    Utils.SendMailMessageAsync(objMail1);
                    SetStatus("CommentSuccess", errMsg);
                    ClearForm();
                    spnEmailError.Visible = false;
                }
                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 InsertUserIdAndCollegeId in CollegeRegisteration.aspx  :: -> ";
                var objPub = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
        }
Beispiel #27
0
        protected void BtnUpdateStatus(object sender, EventArgs e)
        {
            try
            {
                var errmsg = "";
                hdnCommentId.Value = hdnCommentId.Value.Replace(",", "");
                var result = new Common().UpdateCommentStatus(Convert.ToInt32(hdnCommentId.Value),
                                                              Convert.ToBoolean(rbtCommentStatus.SelectedValue),
                                                              new SecurePage().LoggedInUserId, out errmsg);
                if (Convert.ToBoolean(rbtCommentStatus.SelectedValue))
                {
                    var mail = new MailMessage
                    {
                        From    = new MailAddress(ApplicationSettings.Instance.Email),
                        Subject = "AdmissionJankari:Comment information"
                    };
                    hdnUserId.Value = hdnUserId.Value.Replace(",", "");
                    var commentSection = CommentSection(rbtSearchQuery.SelectedValue);

                    var objmailTemplete = new MailTemplates();
                    var body            = objmailTemplete.MailBodyForUserCommentByAdmin(hdnUserName.Value, commentSection, hdnCommentFor.Value);

                    mail.To.Add(hdnEmail.Value);
                    mail.Body = body;
                    Utils.SendMailMessageAsync(mail);
                }
                hdnCommentId.Value = "";
                hdnUserId.Value    = "";
                hdnEmail.Value     = string.Empty;
                hdnUserName.Value  = string.Empty;
                rbtCommentStatus.ClearSelection();

                Page.ClientScript.RegisterStartupScript(Type.GetType("System.String"), "addScript",
                                                        "close();", true);
                switch (rbtSearchQuery.SelectedValue)
                {
                case "1":
                    BindCommentList(BindCollegeCommentList());
                    break;

                case "2":
                    BindCommentList(BindExamCommentList());
                    break;

                case "3":
                    BindCommentList(BindNewsCommentList());
                    break;

                case "4":
                    BindCommentList(BindNoticeCommentList());
                    break;

                case "5":
                    BindCommentList(BindLoanCommentList());
                    break;
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.InnerException.Message;
                }
                const string addInfo = "Error in Executing  BtnUpdateStatus in UserComment.aspx :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
        }
Beispiel #28
0
 protected void btnFinish_Click(object sender, EventArgs e)
 {
     if (Page.IsValid)
     {
         var objSecurePage = new SecurePage();
         var objConsulling = new Consulling();
         _objCommon = new Common();
         var objMailTemplates = new MailTemplates();
         var formNum          = "ADMJ" + DateTime.Now.Year + _objCommon.CourseId.ToString() +
                                objSecurePage.LoggedInUserId.ToString();
         string tranctionDetails;
         if (rbtnPaymentType.SelectedValue == "0")
         {
             tranctionDetails =
                 " You have selected the payment mode through cheque. Please make an account payee cheque of Rs." +
                 lblCash1.Text + " in favour of <b>" + " Admissionjankari.com " + " </b>";
             tranctionDetails = tranctionDetails +
                                " <br /><br /> Mention your Reference Id(Application form number), Name, Phone No, Email-id, at the back of the cheque.";
             tranctionDetails = tranctionDetails +
                                "<br /><br />To confirm the payment, please send your cheque at the following address (Via Speed/Registered Post) ";
             tranctionDetails = tranctionDetails + " <br /><br />" + "Admissionjankari.com<br />";
             tranctionDetails = tranctionDetails + "74 Amrit Chamber, 2nd floor, <br />" +
                                "  202-204 Scindia House Connaught Place, <br />" + " New Delhi-110001. <br />" +
                                "  Contact us : +91 - 9999 261 633, 9654 722 013 , 011-43391978<br/>";
         }
         else
         {
             if (rbtnPaymentType.SelectedValue == "1")
             {
                 tranctionDetails = "You have selected the payment mode through DD.<br/>  ";
                 tranctionDetails = tranctionDetails + "   <b>Make a single Demand Draft</b> (DD) of Rs." +
                                    lblCash1.Text + " in favour of <b>" + " Admissionjankari com" +
                                    "</b>Payable at <b>Delhi.</b>";
                 tranctionDetails = tranctionDetails +
                                    " <br /><br /> To confirm the payment, please send your  Demand Draft at the following address (Via Speed/Registered Post)";
                 tranctionDetails = tranctionDetails + "<br /><br />" + "Admissionjankari.com <br />";
                 tranctionDetails = tranctionDetails + "74 Amrit Chamber, 2nd floor, <br />" +
                                    "  202-204 Scindia House Connaught Place, <br />" +
                                    " New Delhi-110001. <br />" +
                                    "   Contact us : +91-11-43391978, +91-8800567711, +91-8800567733<br/>";
             }
             else
             {
                 if (rbtnPaymentType.SelectedValue == "2")
                 {
                     const string bankName = "Account Name: Admissionjankari.com";
                     const string ddNumber = "00032 0000 44418";
                     tranctionDetails =
                         "You have selected the payment mode through cash. You will need to deposit Rs." +
                         lblCash1.Text + " in the nearest HDFC Bank in the following account.   <br/><br/> ";
                     tranctionDetails = tranctionDetails + bankName + "<br/>";
                     tranctionDetails = tranctionDetails + "Account Number :" + ddNumber + " <br/>";
                     tranctionDetails = tranctionDetails + "RTGS/IFSC/NEFT Code: HDFC0000003 <br/>";
                     tranctionDetails = tranctionDetails + "Branch:Kasturba Gandhi Marg,New Delhi<br/>";
                     tranctionDetails = tranctionDetails +
                                        " <br /><br /> To confirm the payment, please send your  pay-in-slip at the following address (Via Speed/Registered Post)";
                     tranctionDetails = tranctionDetails + "<br /><br />" + "Admissionjankari.com";
                     tranctionDetails = tranctionDetails + "74 Amrit Chamber, 2nd floor, <br />" +
                                        "  202-204 Scindia House Connaught Place, <br />" +
                                        " New Delhi-110001. <br />" +
                                        "   Contact us : +91-11-43391978, +91-8800567711, +91-8800567733<br/>";
                 }
                 else
                 {
                     tranctionDetails = "You have selected the payment mode through Online Payment of" + " " +
                                        "Rs." + " " + lblCash1.Text + "/- ";
                     OnlinePayment();
                 }
             }
         }
         int i = objConsulling.InsertUpdateUserTransctionalDetails(objSecurePage.LoggedInUserId, formNum, false,
                                                                   rbtnPaymentType.SelectedItem.ToString(), "",
                                                                   "", "26100");
         var mail = new MailMessage
         {
             From    = new MailAddress(ApplicationSettings.Instance.Email),
             Subject = "Direct Admission:Form Number" + formNum
         };
         var body = objMailTemplates.SendValidationMailForTheDirectAdmission("http://www.admissionjankari.com/",
                                                                             objSecurePage.LoggedInUserName,
                                                                             formNum, tranctionDetails);
         mail.Body = body;
         mail.To.Add(objSecurePage.LoggedInUserEmailId);
         mail.Bcc.Add(ClsSingelton.bccDirectAdmission);
         Utils.SendMailMessageAsync(mail);
         if (rbtnPaymentType.SelectedValue != "OnPayment")
         {
             Response.Redirect(Utils.AbsoluteWebRoot + "ConformationPage.aspx", true);
         }
     }
 }
Beispiel #29
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);
            }
        }
Beispiel #30
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);
        }