예제 #1
0
        public void SendMail(int SendByUserId, int SendToUserId, string Subject, string _EmailBody)
        {
            MailMessage _objMailMessage = new MailMessage();
            _objMailMessage.SendByUserId = SendByUserId;
            _objMailMessage.Subject = Subject;
            _objMailMessage.Body = _EmailBody;
            _objMailMessage.SendToUserId = SendToUserId;
            _objMailMessage.SendDate = DateTime.Now;
            _objMailMessage.Status = 1;
            _objMailMessage.RecievedDate = DateTime.Now;
            _objMailMessage.CreatedBy = SendByUserId;
            _objMailMessage.CreatedDate = DateTime.Now;
            _objMailMessage.ModifiedBy = SendByUserId;
            _objMailMessage.ModifiedDate = DateTime.Now;
            _objMailMessage.IsActive = true;
            _objMailMessage.IsDeleted = false;
            object[] _ParamMail = { _objMailMessage };
            UserInfoResource objUser = new UserInfoResource();

            if (objUser.SaveEmail(_ParamMail) > 0)
            {
                EmailMessages objEmail = EmailMessages.Instance;

                //to get user details of from user id
                UserRegistration objFromUserInfo = new UserRegistration();
                objFromUserInfo = (UserRegistration)GetUserDetails(SendByUserId);
                //to get user details of TO user id
                UserRegistration objToUserInfo = new UserRegistration();
                objToUserInfo = (UserRegistration)GetUserDetails(SendToUserId);
                if (objToUserInfo.EmailNotification.MessagesNotify)
                {
                    bool val = objEmail.SendMessages("Your " + WebConfig.ApplicationWord + " <" + WebConfig.NoreplyEmail + ">", objToUserInfo.Users.Email, GetEmailSubject(objFromUserInfo), GetEmailBody(objFromUserInfo, objToUserInfo, Subject, _EmailBody), EmailMessages.TextFormat.Html.ToString());
                }
            }
        }
예제 #2
0
        public void SendAdminMails(string Adminmail, string OtherAdminMails, string TributeId, string TributeName, string TributeType, string TributeUrl, string Username)
        {
            UserInfoResource objUser = new UserInfoResource();
            EmailMessages objEmail = EmailMessages.Instance;
            string[] toemails = OtherAdminMails.Split(',');
            for (int i = 0; i < toemails.Length; i++)
            {
                MailBodies objMailbod = new MailBodies();
                string _EmailBody = objMailbod.AdminRequest(Username, TributeType, TributeName, TributeUrl, TributeId, toemails[i]);
                // string _EmailBody = GetAdminBody(TributeId, TributeName, toemails[i]);
                bool val = objEmail.SendMessages(Adminmail, toemails[i], Username + " made you a " + WebConfig.ApplicationWordForInternalUse.ToLower() + " administrator...", _EmailBody, EmailMessages.TextFormat.Html.ToString());

            }
        }
        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 Users GetUserDetailsOnUserId(int userId)
 {
     UserInfoResource objUserInfoResource = new UserInfoResource();
     return objUserInfoResource.GetUserDetailsOnUserId(userId);
 }
예제 #5
0
 private string GetEmail(int UserId)
 {
     string email = string.Empty;
     Users objusr = new Users();
     objusr.UserId = UserId;
     UserRegistration objUserReg = new UserRegistration();
     objUserReg.Users = objusr;
     object[] objparam = { objUserReg };
     UserInfoResource objinfo = new UserInfoResource();
     objinfo.GetUserDetails(objparam);
     if (objUserReg.Users != null)
         email = objUserReg.Users.Email;
     return email;
 }
    public void UserLogOut()
    {
        UserInfoResource UIResource = new UserInfoResource();
        var fbWebcontext = FacebookWebContext.Current;
        HttpContext.Current.Session.Clear();
        pagebase.killFacebookCookies();

        try
        {
            if (fbWebcontext.Session != null)
            {
                fbWebcontext.DeleteAuthCookie();
            }
        }
        catch
        { }

        HttpContext.Current.Session.RemoveAll();
        StateManager stateManager = StateManager.Instance;
        UIResource.DeleteSession(HttpContext.Current.Session.SessionID);
        stateManager.Remove("objSessionvalue", StateManager.State.Session);
        HttpContext.Current.Session.Clear();
        HttpContext.Current.Session.Abandon();
    }
        private void SendMail(UserRegistration _objGenralUserInfo, int Userid, UserInfoResource objUser)
        {
            string SIGNUPAdmin = WebConfig.SIGNUPAdmin;
            EmailMessages objEmail = EmailMessages.Instance;
            _objGenralUserInfo.Users.FirstName = _objGenralUserInfo.UserBusiness == null ? _objGenralUserInfo.Users.FirstName : _objGenralUserInfo.UserBusiness.CompanyName;
            _objGenralUserInfo.Users.LastName = _objGenralUserInfo.UserBusiness == null ? _objGenralUserInfo.Users.LastName : string.Empty;
            string _EmailBody = GetEmailAccountBody(_objGenralUserInfo.Users);
            bool val = objEmail.SendMessages("Your Tribute<" + SIGNUPAdmin + ">", _objGenralUserInfo.Users.Email, "Welcome to Your Tribute", _EmailBody, EmailMessages.TextFormat.Html.ToString());
            if (val == true)
            {
                //MailMessage _objMailMessage = new MailMessage();
                //_objMailMessage.SendByUserId = Userid;
                //_objMailMessage.Subject = "User Registration";
                //_objMailMessage.Body = _EmailBody;
                //_objMailMessage.SendToUserId = Userid;
                //_objMailMessage.SendDate = DateTime.Now;
                //_objMailMessage.Status = 1;
                //_objMailMessage.RecievedDate = DateTime.Now;
                //_objMailMessage.CreatedBy = Userid;
                //_objMailMessage.CreatedDate = DateTime.Now;
                //_objMailMessage.ModifiedBy = Userid;
                //_objMailMessage.ModifiedDate = DateTime.Now;
                //_objMailMessage.IsActive = true;
                //_objMailMessage.IsDeleted = false;
                //object[] _ParamMail ={ _objMailMessage };
                //objUser.SaveEmail(_ParamMail);

                //if (_objMailMessage.CustomError != null)
                //{
                //    _objGenralUserInfo.CustomError = _objMailMessage.CustomError;
                //}

            }
        }
 public void UserSiteAdminLogin(GenralUserInfo _objGenralUserInfo)
 {
     UserInfoResource objUser = new UserInfoResource();
     object[] param = { _objGenralUserInfo };
     objUser.SignInSiteAdmin(param);
 }
 //public IList<Locations> Locations(Locations locaton)
 //{
 //    LocationResource objLocationResource = new LocationResource();
 //    return objLocationResource.LocationList(locaton);
 //}
 public int UserInboxCount(object[] objValue)
 {
     UserInfoResource objUser = new UserInfoResource();
     return objUser.UserInboxCount(objValue);
 }
예제 #10
0
 /// <summary>
 ///  This method will call the UserInfoResource Resource class method for saving the company logo
 /// Added By Parul Jain
 /// </summary>
 /// <param name="objTributeParam">A object which contain the company logo which wants to save</param>
 public void SaveImage(UserBusiness objBusinessUser)
 {
     try
     {
         UserInfoResource objUser = new UserInfoResource();
         objUser.SaveImage(objBusinessUser);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #11
0
 /// <summary>
 /// Method to check if user is Owner of Type(Video, Photo etc.)
 /// Added By: Gaurav Puri
 /// </summary>
 /// <param name="objUserInfo">UserAdminOwnerInfo entity containing UserId, TypeId and TypeName</param>
 /// <returns>True/False</returns>
 public bool IsUserOwner(UserAdminOwnerInfo objUserInfo)
 {
     UserInfoResource objUser = new UserInfoResource();
     object[] param = { objUserInfo };
     return objUser.IsUserOwner(param);
 }
예제 #12
0
        /// <summary>
        /// Method to insert Session
        /// </summary>
        public void InsertSession(SessionValue _objSessionValue, string strId)
        {
            UserInfoResource objUser = new UserInfoResource();
            object[] param = { _objSessionValue, strId };

            //  System.Decimal identity = (System.Decimal)objUser.InsertSessionValues(param);
            int identity = Convert.ToInt32(objUser.InsertSessionValues(param));

            _objSessionValue.ID = int.Parse(identity.ToString());
            //UserId
            objUser.InsertSessionKeyValues(_objSessionValue.ID, "UserId", _objSessionValue.UserId.ToString());
            //UserName
            objUser.InsertSessionKeyValues(_objSessionValue.ID, "UserName", _objSessionValue.UserName);
            //FirstName
            objUser.InsertSessionKeyValues(_objSessionValue.ID, "FirstName", _objSessionValue.FirstName);
            //LastName
            objUser.InsertSessionKeyValues(_objSessionValue.ID, "LastName", _objSessionValue.LastName);
            //Email
            objUser.InsertSessionKeyValues(_objSessionValue.ID, "Email", _objSessionValue.UserEmail);
            //UserType
            objUser.InsertSessionKeyValues(_objSessionValue.ID, "UserType", _objSessionValue.UserType.ToString());
            //UserTypeDescription
            objUser.InsertSessionKeyValues(_objSessionValue.ID, "UserTypeDescription", _objSessionValue.UserTypeDescription);
            //IsUsernameVisiable
            objUser.InsertSessionKeyValues(_objSessionValue.ID, "IsUsernameVisiable", _objSessionValue.IsUsernameVisiable.ToString());
            //Added by rupendra to get logged in user image
            //UserImage
            if (_objSessionValue.UserImage != null)
                objUser.InsertSessionKeyValues(_objSessionValue.ID, "UserImage", _objSessionValue.UserImage.ToString());
            else
                objUser.InsertSessionKeyValues(_objSessionValue.ID, "UserImage", "");
            // Added by Varun to store NoRedirection boolean
            objUser.InsertSessionKeyValues(_objSessionValue.ID, "NoRedirection", _objSessionValue.NoRedirection.ToString());
        }
예제 #13
0
 public IList<GetTributesFeed> GetYourTributesFeed(object[] objparam)
 {
     UserInfoResource objUser = new UserInfoResource();
      return objUser.GetYourTributesFeed(objparam);
 }
예제 #14
0
 public List<MailMessage> GetuserSentMessages(object[] objValue)
 {
     UserInfoResource objUser = new UserInfoResource();
     return objUser.GetuserSentMessages(objValue);
 }
예제 #15
0
 public void GetUserProfile(object[] objValue)
 {
     UserInfoResource objUser = new UserInfoResource();
     objUser.GetUserProfile(objValue);
 }
예제 #16
0
 public void UpdatePrivacySettings(UserRegistration _objUserRegistration)
 {
     UserInfoResource objUser = new UserInfoResource();
     object[] param = { _objUserRegistration };
     objUser.UpdatePrivacySettings(param);
 }
예제 #17
0
 public void UserAvailability(UserRegistration _objUserRegistration)
 {
     UserInfoResource objUser = new UserInfoResource();
     object[] param = { _objUserRegistration };
     objUser.UserAvailability(param);
 }
예제 #18
0
 /// <summary>
 ///  This method will call the UserInfoResource Resource class method for saving the message
 /// Added By Parul Jain
 /// </summary>
 /// <param name="objTributeParam">A object which contain the welcome message which wants to save</param>
 public void SaveMessage(UserBusiness objBusinessUser,string ApplicationType)
 {
     try
     {
         UserInfoResource objUser = new UserInfoResource();
         objUser.SaveMessage(objBusinessUser, ApplicationType);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #19
0
 public void UserLogin(GenralUserInfo _objGenralUserInfo)
 {
     UserInfoResource objUser = new UserInfoResource();
     object[] param = { _objGenralUserInfo };
     objUser.CheckLogin(param);
 }
예제 #20
0
        //private string SetInternal()
        //{
        //    StringBuilder objstrb = new StringBuilder();
        //    //objstrb.Append("<P>"<P>);
        //    //        "Welcome to Your Tribute!
        //    //Now that you have registered you can begin collaborating with friends and family:
        //    //• leave messages in their guestbooks
        //    //• share photos and videos
        //    //• send virtual gifts
        //    //• receive event invites and updates
        //    //You can also:
        //    //• create your own tribute to celebrate a significant event or a special someone
        //    //• send private messages—simply click on another member’s name to open the profile and communicate one-to-one
        //    //• upload a profile picture of yourself—you can upload a picture, an icon, or a drawing, and it will show up wherever you add content on Your Tribute. To add a profile picture, click the ""My Profile"" link in the top navigation bar and then click the ""Edit My Profile"" button
        //    //Take a Tour to learn more about Your Tribute, or find Help at the bottom of any page.
        //    //----
        //    //Your Tribute Team
        //    //"
        //}
        public object SavePersonalAccount(UserRegistration _UserRegistration)
        {
            UserInfoResource objUserinfo = new UserInfoResource();
            object[] param = { _UserRegistration };

            using (TransactionScope trans = new TransactionScope())
            {
                objUserinfo.SaveUserAccount(param).ToString();
                //Transaction Completed
                if (_UserRegistration.CustomError == null)
                {
                    trans.Complete();
                }
            }

            if (_UserRegistration.CustomError == null &&
                !_UserRegistration.Users.Email.Equals(string.Empty) &&
                !_UserRegistration.Users.Password.Equals(string.Empty))
            {
                SendMail(_UserRegistration, _UserRegistration.Users.UserId, objUserinfo);
            }
            return _UserRegistration.Users.UserId;
        }
예제 #21
0
 public void UserSummaryReport(UsersSummaryReport objSummary, string applicationType)
 {
     UserInfoResource objUser = new UserInfoResource();
     objUser.UserSummaryReport(objSummary, applicationType);
 }
예제 #22
0
 public void UpdateEmailNotofication(object[] param)
 {
     UserInfoResource objUserInfoResource = new UserInfoResource();
     objUserInfoResource.UpdateEmailNotofication(param);
 }
예제 #23
0
        /*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());

            }
        }
예제 #24
0
 public void UpdateFacebookAssociation(UserRegistration _objUserRegistration)
 {
     UserInfoResource objUser = new UserInfoResource();
     objUser.UpdateFacebookAssociation(_objUserRegistration);
 }
예제 #25
0
    public void UserLogOut()
    {
        //HttpContext.Current.Response.Cookies.Clear();
        UserInfoResource UIResource = new UserInfoResource();
        PageBase pb = new PageBase();
        var fbWebcontext = FacebookWebContext.Current;

        HttpContext.Current.Session.Clear();
        pb.killFacebookCookies();

        try
        {
            if (fbWebcontext.Session != null)
            {
                fbWebcontext.DeleteAuthCookie();
                // just to be sure...
            }
        }
        catch
        { }

        HttpContext.Current.Session.RemoveAll();
        UsersController _controller = new UsersController();
        StateManager stateManager = StateManager.Instance;
        UIResource.DeleteSession(HttpContext.Current.Session.SessionID);
        stateManager.Remove("objSessionvalue", StateManager.State.Session);
        HttpContext.Current.Session.Clear();
        HttpContext.Current.Session.Abandon();
    }
예제 #26
0
 public void UpdateFavouriteEmailAlert(object[] _Tributes)
 {
     UserInfoResource objUser = new UserInfoResource();
     objUser.UpdateFavouriteEmailAlert(_Tributes);
 }
예제 #27
0
 /// <summary>
 /// Method to get user details.
 /// </summary>
 /// <param name="userId">Userid</param>
 /// <returns>UserRegistration entity containing user details.</returns>
 private UserRegistration GetUserDetails(int userId)
 {
     Users objFromUser = new Users();
     objFromUser.UserId = userId;
     UserRegistration objUserReg = new UserRegistration();
     objUserReg.Users = objFromUser;
     object[] objparam = { objUserReg };
     UserInfoResource objFromUserInfo = new UserInfoResource();
     objFromUserInfo.GetUserDetails(objparam);
     return objUserReg;
 }
예제 #28
0
 public void UpdateMessageStstus(object[] Params)
 {
     UserInfoResource objUser = new UserInfoResource();
     objUser.UpdateMessageStstus(Params);
 }
예제 #29
0
 public void UpdatePersonalDetails(UserRegistration _objUserRegistration)
 {
     UserInfoResource objUser = new UserInfoResource();
     object[] param = { _objUserRegistration };
     //Transaction started
     using (TransactionScope trans = new TransactionScope())
     {
         objUser.UpdatePersonalDetails(param);
         //Transaction commited
         trans.Complete();
     }
 }
예제 #30
0
 //Mohit Gupta 31 jan 2011 For tribute upgrade
 public void GetUserDetailsFromEmail(UserRegistration _objUserRegistration, int tributeId)
 {
     UserInfoResource objUser = new UserInfoResource();
     object[] param = { _objUserRegistration, tributeId };
     objUser.GetUserDetailsFromEmail(param);
 }