public ActionResult ActiveInactiveMember(string id)
 {
     MemberAction objMember = new MemberAction();
     Member member = objMember.GetMemberByMemberId(id);
     if (member != null)
     {
         if (member.status == SystemStatements.STATUS_ACTIVE)
         {
             member.status = SystemStatements.STATUS_INACTIVE;
         }
         else
         {
             member.status = SystemStatements.STATUS_ACTIVE;
         }
     }
     if (objMember.UpdateMember(member))
     {
         ViewData["ManageUser"] = "******";
     }
     else
     {
         ViewData["ManageUser"] = "******";
     }
     GetAllMemberList();
     return View("ManageUser");
 }
 public ActionResult Profile(ProfileModel objProfileModel, string userFName, string userLName, string setURL, string userBio)
 {
     #region
     Member memberData = (Member)SessionStore.GetSessionValue(SessionStore.Memberobject);
     MemberAction objMember = new MemberAction();
     Privacy privacyData = objMember.GetPrivacyByMemberId(memberData.id);
     if (!string.IsNullOrEmpty(setURL))
         setURL = "www.seedspeak.com/" + setURL;
     bool isProfileUpdated = objMember.ManageMemberProfile(memberData, objProfileModel.City, objProfileModel.ZipCode, double.Parse(objProfileModel.Latitude), double.Parse(objProfileModel.Longitude), objProfileModel.Sex, objProfileModel.Dob, setURL, userBio);
     if (!string.IsNullOrEmpty(userFName) || !string.IsNullOrEmpty(userLName))
     {
         memberData.firstName = userFName;
         memberData.lastName = userLName;
         bool updated = objMember.UpdateMember(memberData);
         if (updated == true)
         {
             ViewData["PersonalMsg"] = "<b>Name updated successfully.</b>";
         }
         else
         {
             ViewData["PersonalMsg"] = "Error while updating name.";
         }
     }
     if (isProfileUpdated == true)
     {
         ViewData["PersonalMsg"] = "<b>Profile updated successfully.</b>";
     }
     else
     {
         ViewData["PersonalMsg"] = "Error occured while updating profile.";
     }
     ViewData["SelectedIndex"] = 0;
     GetRegions();
     MyUsername(privacyData);
     SeedContributionMessage(privacyData);
     SeedCommitmentMessage(privacyData);
     GetExternalAccountList();
     GetProfileData();
     ViewData["LoggedInMember"] = memberData.id.ToString();
     return View(objProfileModel);
     #endregion
 }
        public ActionResult MailNewPassword(string id)
        {
            MemberAction objMember = new MemberAction();
            Member member = objMember.GetMemberByMemberId(id);
            string newPwd = GenerateRandomString();
            member.passwd = Security.Encrypt(newPwd, true);
            if (objMember.UpdateMember(member))
            {
                //send automated email
                // Creating array list for token
                ArrayList arrTokens = new ArrayList();
                arrTokens.Add(member.firstName + " " + member.lastName);
                arrTokens.Add("*****@*****.**");
                arrTokens.Add(newPwd);

                // Filling mail object
                SendMail objSendMail = new SendMail();
                objSendMail.ToEmailId = member.username;
                objSendMail.Subject = "email.newPasswordGenerate.subject.content";
                objSendMail.MsgBody = "email.newPasswordGenerate.body.content";
                objSendMail.ChangesInMessage = arrTokens;

                objSendMail.SendEmail(objSendMail);
                ViewData["ManageUser"] = "******" + member.firstName + " " + member.lastName + "</b>";
            }
            else
            {
                ViewData["ManageUser"] = "******";
            }
            GetAllMemberList();
            return View("ManageUser");
        }