public void ChangeEmailPassword(GenralUserInfo _objGenralUserInfo) { UserInfoResource objUser = new UserInfoResource(); object[] param = { _objGenralUserInfo }; string usermail = GetEmail(_objGenralUserInfo.RecentUsers.UserID); try { string _EmailBody = string.Empty; string _Subject = string.Empty; if (objUser.ChangeEmailPassword(param) > 0) { EmailMessages objEmail = EmailMessages.Instance; //string _EmailBody = GetEmailBodyOnEmailAndPasswordChanged(_objGenralUserInfo.RecentUsers); MailBodies objMail = new MailBodies(); if ((_objGenralUserInfo.RecentUsers.UserEmail.Length != 0) && (_objGenralUserInfo.RecentUsers.UserPassword.Length > 0)) { _Subject = "Your Tribute Password and Email Reminder"; _EmailBody = objMail.ChangeEmailPassword(_objGenralUserInfo.RecentUsers.UserName, _objGenralUserInfo.RecentUsers.UserEmail, _objGenralUserInfo.RecentUsers.UserPassword); } else if ((_objGenralUserInfo.RecentUsers.UserEmail.Length == 0) && (_objGenralUserInfo.RecentUsers.UserPassword.Length != 0)) { _Subject = "Your Tribute Password Reminder"; _EmailBody = objMail.ForgetPassword(_objGenralUserInfo.RecentUsers.UserName, _objGenralUserInfo.RecentUsers.UserPassword); } else if ((_objGenralUserInfo.RecentUsers.UserEmail.Length != 0) && (_objGenralUserInfo.RecentUsers.UserPassword.Length == 0)) { _Subject = "Your Tribute Email Reminder"; _EmailBody = objMail.ChangeEmail(_objGenralUserInfo.RecentUsers.UserName, _objGenralUserInfo.RecentUsers.UserEmail); } bool val = objEmail.SendMessages(ForgetPassAdmin, usermail, _Subject, _EmailBody, EmailMessages.TextFormat.Html.ToString()); } } catch (Exception ex) { Errors objError = new Errors(); objError.ErrorMessage = ex.Message; _objGenralUserInfo.CustomError = objError; } }
/*public string GetEventName(int _EventId) { UserInfoResource objUser = new UserInfoResource(); return objUser.GetEventName(_EventId); }*/ public void CheckAndSendPassword(GenralUserInfo _objGenralUserInfo, bool _Reset) { UserInfoResource objUser = new UserInfoResource(); object[] param = { _objGenralUserInfo }; objUser.CheckAndSendPassword(param, _Reset); if (_objGenralUserInfo.CustomError == null) { EmailMessages objEmail = EmailMessages.Instance; //string _EmailBody = GetEmailBody(_objGenralUserInfo.RecentUsers); MailBodies objMail = new MailBodies(); string Password = TributePortalSecurity.Security.DecryptSymmetric(_objGenralUserInfo.RecentUsers.UserPassword); string _EmailBody = objMail.ForgetPassword(_objGenralUserInfo.RecentUsers.UserName, Password); bool val = objEmail.SendMessages(ForgetPassAdmin, _objGenralUserInfo.RecentUsers.UserEmail, "Your Tribute Password Reminder", _EmailBody, EmailMessages.TextFormat.Html.ToString()); // bool val = objEmail.SendMessages("*****@*****.**", "*****@*****.**", "Forgot password", _EmailBody, EmailMessages.TextFormat.Html.ToString()); } }