Esempio n. 1
0
        private void CheckIfMember()
        {
            try
            {
                // Get the email value from the QueryString
                email = Request.QueryString["email"].ToString();
                if (email == string.Empty)
                {
                    return;
                }

                // Check if the email address exists in the Members Table already
                EZDiscuss.Classes.Member member = new Classes.Member();
                memberId = member.IsMemberExisting(email);
                if (memberId == 0)
                {
                    // Not yet a member. Show the Registration view
                    mvAcceptInvite.ActiveViewIndex = 0;
                }
                else
                {
                    // Member already. Show the Accept Invitation view
                    mvAcceptInvite.ActiveViewIndex = 1;
                    //Store in a session variable
                    MemberId = memberId;
                }
            }
            catch (Exception ex)
            {
                EZDiscuss.Classes.Helper.LogError("AcceptInvite.aspx", "CheckIfMember", ex.Message, memberId);
            }
        }
Esempio n. 2
0
 private void PopulateControls(Classes.Member member)
 {
     if (member != null)
     {
         tFname.Text         = member.firstName;
         tLName.Text         = member.lastName;
         tEmail.Text         = member.email;
         imgProfile.ImageUrl = "~/Photos/" + member.photo;
     }
 }
Esempio n. 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Session["CurrentPage"] = "MemberProfile.aspx";

                member = (Classes.Member)Session["member"];
                if (member != null)
                {
                    PopulateControls(member);
                }
            }
        }
Esempio n. 4
0
        private void ResetParticipants()
        {
            try
            {
                EZDiscuss.UserControls.ucMemberProfile ucMP = new UserControls.ucMemberProfile();
                Classes.Member mem = new Classes.Member();

                for (int i = 1; i <= 20; i++)
                {
                    mem.firstName = null;
                    switch (i)
                    {
                    case 1:
                        ucMP = ucMP1;
                        break;

                    case 2:
                        ucMP = ucMP2;
                        break;

                    case 3:
                        ucMP = ucMP3;
                        break;

                    case 4:
                        ucMP = ucMP4;
                        break;

                    case 5:
                        ucMP = ucMP5;
                        break;

                    case 6:
                        ucMP = ucMP6;
                        break;

                    case 7:
                        ucMP = ucMP7;
                        break;

                    case 8:
                        ucMP = ucMP8;
                        break;

                    case 9:
                        ucMP = ucMP9;
                        break;

                    case 10:
                        ucMP = ucMP10;
                        break;

                    case 11:
                        ucMP = ucMP11;
                        break;

                    case 12:
                        ucMP = ucMP12;
                        break;

                    case 13:
                        ucMP = ucMP13;
                        break;

                    case 14:
                        ucMP = ucMP14;
                        break;

                    case 15:
                        ucMP = ucMP15;
                        break;

                    case 16:
                        ucMP = ucMP16;
                        break;

                    case 17:
                        ucMP = ucMP17;
                        break;

                    case 18:
                        ucMP = ucMP18;
                        break;

                    case 19:
                        ucMP = ucMP19;
                        break;

                    case 20:
                        ucMP = ucMP20;
                        break;

                    default:
                        break;
                    }
                    ucMP.Initialize();
                }
            }
            catch (Exception ex)
            {
                if (Session["memberId"] != null)
                {
                    EZDiscuss.Classes.Helper.LogError("DiscussionBoard.aspx", "ResetParticipants", ex.Message, (long)Session["memberId"]);
                }
                else
                {
                    EZDiscuss.Classes.Helper.LogError("DiscussionBoard.aspx", "ResetParticipants", ex.Message, 0);
                }
            }
        }
Esempio n. 5
0
        private void LoadParticipants(long topicId)
        {
            try
            {
                // Display all the Participants for the specified Topic
                Classes.Topic topic = new Classes.Topic();
                DataTable     dt    = topic.TopicMembersRetrieve(topicId);
                if (dt.Rows.Count > 0)
                {
                    Session["Participants"] = dt;
                    int i = 1;
                    EZDiscuss.UserControls.ucMemberProfile ucMP = new UserControls.ucMemberProfile();

                    ResetParticipants();

                    foreach (DataRow dr in dt.Rows)
                    {
                        if (i <= 20)
                        {
                            Classes.Member member = new Classes.Member();
                            member.firstName = dr["FirstName"].ToString();
                            member.memberId  = Convert.ToInt64(dr["MemberId"]);
                            member.gender    = Convert.ToInt32(dr["Gender"]);
                            member.photo     = dr["Photo"].ToString();

                            switch (i)
                            {
                            case 1:
                                ucMP = ucMP1;
                                break;

                            case 2:
                                ucMP = ucMP2;
                                break;

                            case 3:
                                ucMP = ucMP3;
                                break;

                            case 4:
                                ucMP = ucMP4;
                                break;

                            case 5:
                                ucMP = ucMP5;
                                break;

                            case 6:
                                ucMP = ucMP6;
                                break;

                            case 7:
                                ucMP = ucMP7;
                                break;

                            case 8:
                                ucMP = ucMP8;
                                break;

                            case 9:
                                ucMP = ucMP9;
                                break;

                            case 10:
                                ucMP = ucMP10;
                                break;

                            case 11:
                                ucMP = ucMP11;
                                break;

                            case 12:
                                ucMP = ucMP12;
                                break;

                            case 13:
                                ucMP = ucMP13;
                                break;

                            case 14:
                                ucMP = ucMP14;
                                break;

                            case 15:
                                ucMP = ucMP15;
                                break;

                            case 16:
                                ucMP = ucMP16;
                                break;

                            case 17:
                                ucMP = ucMP17;
                                break;

                            case 18:
                                ucMP = ucMP18;
                                break;

                            case 19:
                                ucMP = ucMP19;
                                break;

                            case 20:
                                ucMP = ucMP20;
                                break;

                            default:
                                break;
                            }
                            ucMP.Photo     = member.photo;
                            ucMP.FirstName = member.firstName;
                            ucMP.MemberId  = member.memberId;
                            ucMP.Gender    = member.gender;
                            ucMP.TopicId   = topicId;
                            ucMP.ActivateControl(true);
                            i++;
                        }
                    }
                }
                else
                {
                    // Reset Member Profile Controls
                    ResetParticipants();
                };
            }
            catch (Exception ex)
            {
                if (Session["memberId"] != null)
                {
                    EZDiscuss.Classes.Helper.LogError("DiscussionBoard.aspx", "LoadParticipants", ex.Message, (long)Session["memberId"]);
                }
                else
                {
                    EZDiscuss.Classes.Helper.LogError("DiscussionBoard.aspx", "LoadParticipants", ex.Message, 0);
                }
            }
        }