public void fillMemberGrid()
        {
            pnlGridViewMembers.Visible = true;

            List <GroupMemberState> groupMemberState = new List <GroupMemberState>();

            Edit.Utilities.DataIO data   = new Edit.Utilities.DataIO();
            SqlDataReader         reader = data.GetGroupMembers(SubjectID);

            while (reader.Read())
            {
                //public Group(string GroupName, int ViewSecurityGroup, string ViewSecurityGroupName, string EndDate, string GroupID, string GroupNodeID)
                groupMemberState.Add(new GroupMemberState(reader.GetInt32(reader.GetOrdinal("UserID")), reader["PersonURI"].ToString(), reader["Title"].ToString(),
                                                          reader["DisplayName"].ToString(), reader["InstitutionName"].ToString()));
            }
            reader.Close();

            if (groupMemberState.Count > 0)
            {
                GridViewMembers.DataSource = groupMemberState;
                GridViewMembers.DataBind();
            }
            else
            {
                lblNoMembers.Visible    = true;
                GridViewMembers.Visible = false;
            }
        }
 protected void GridViewMembers_RowEditing(object sender, GridViewEditEventArgs e)
 {
     Session["pnlAddGroupMembers.Visible"] = null;
     searchReset();
     pnlProxySearch.Visible    = false;
     GridViewMembers.EditIndex = e.NewEditIndex;
     GridViewMembers.DataBind();
     //pnlGridViewMembers.Update();
 }
        // sets datasources and bind data.

        private void Bind()
        {
            var service = new Service();

            GridViewMembers.DataSource = service.GetMembers(SortExpression);
            GridViewMembers.DataBind();

            // display potential add or update message
            if (Session["message"] != null)
            {
                LabelError.Text    = Session["message"].ToString();
                Session["message"] = null;
            }
        }
Ejemplo n.º 4
0
 private void BindMemberData()
 {
     GridViewMembers.DataSource = memberService.getAllMembers().ToList();
     GridViewMembers.DataBind();
 }
Ejemplo n.º 5
0
 protected void TextBoxSerchMembers_TextChanged(object sender, EventArgs e)
 {
     GridViewMembers.DataSource    = memberService.getMembersWhoContains(TextBoxSerchMembers.Text).ToList();
     GridViewMembers.SelectedIndex = -1;
     GridViewMembers.DataBind();
 }
 protected void GridViewMembers_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
 {
     GridViewMembers.EditIndex = -1;
     GridViewMembers.DataBind();
 }
Ejemplo n.º 7
0
    protected void Page_Load(object sender, System.EventArgs e)
    {
        if (IsPostBack == false)
        {
            /* L'alphabet */
            DropDownListLettre.Items.Add("---");
            string   _alpha = "A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z";
            string[] alpha  = _alpha.Split(',');
            foreach (string s in alpha)
            {
                DropDownListLettre.Items.Add(s);
            }

            if (User.IsInRole("Administrateur"))
            {
                /* Trouver les societes */
                DropDownListSociete.Items.Add("Toutes les sociétés");
                MemberInfoCollection membres = MemberInfoCollection.GetAll();
                foreach (MemberInfo m in membres)
                {
                    ListItem item = new ListItem(m.Societe);
                    if (!DropDownListSociete.Items.Contains(item))
                    {
                        DropDownListSociete.Items.Add(item);
                    }
                }
            }
            else
            {
                DropDownListSociete.Items.Add(SessionState.MemberInfo.Societe);
                DropDownListSociete.Enabled  = false;
                RolloverLinkRegister.Visible = false;
                GridViewMembers.Columns[colonneCommandField].Visible = false;
                GridViewMembers.Columns[colonneEditField].Visible    = false;
            }

            sortDirection = SortDirection.Descending;

            GridViewMembers.DataSource = BuildData();
            GridViewMembers.DataBind();
        }

        // Formulaire en mode print
        if (Request.QueryString["print"] != null)
        {
            GridViewMembers.Columns[colonneCommandField].Visible   = false;
            GridViewMembers.Columns[colonneEditField].Visible      = false;
            GridViewMembers.Columns[colonneTelephone].Visible      = true;
            GridViewMembers.Columns[colonneAdresse].Visible        = true;
            GridViewMembers.Columns[colonneEmail].Visible          = true;
            GridViewMembers.Columns[colonneHyperLinkEmail].Visible = false;
            GridViewMembers.Columns[colonneDateCreation].Visible   = true;
            GridViewMembers.Width = Unit.Percentage(100);
        }
        else
        {
            GridViewMembers.Columns[colonneTelephone].Visible = false;
            GridViewMembers.Columns[colonneAdresse].Visible   = false;
            GridViewMembers.Columns[colonneEmail].Visible     = false;

            // DEBUG GridViewMembers.Columns[ colonneDateCreation ].Visible = false;
        }

        if (Request.QueryString["QuestionnaireID"] != null)
        {
            int questionnaireID = int.Parse(Request.QueryString["QuestionnaireID"]);
            SessionState.Questionnaire = SessionState.Questionnaires.FindByID(questionnaireID);
            Response.Redirect("~/Contact/Email.aspx");
        }
    }
Ejemplo n.º 8
0
 protected void GridViewMembers_OnSorted(object sender, EventArgs e)
 {
     GridViewMembers.DataBind();
 }