Esempio n. 1
0
        /// <summary>
        /// Handles the Delete event of the gChildGroupTypes control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="RowEventArgs" /> instance containing the event data.</param>
        protected void gChildGroupTypes_Delete(object sender, RowEventArgs e)
        {
            int childGroupTypeId = (int)e.RowKeyValue;

            ChildGroupTypesDictionary.Remove(childGroupTypeId);
            BindChildGroupTypesGrid();
        }
Esempio n. 2
0
        /// <summary>
        /// Handles the Click event of the btnAddChildGroupType control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
        protected void btnAddChildGroupType_Click(object sender, EventArgs e)
        {
            ChildGroupTypesDictionary.Add(int.Parse(ddlChildGroupType.SelectedValue), ddlChildGroupType.SelectedItem.Text);

            pnlChildGroupTypePicker.Visible = false;
            pnlDetails.Visible = true;

            BindChildGroupTypesGrid();
        }
Esempio n. 3
0
 /// <summary>
 /// Binds the child group types grid.
 /// </summary>
 private void BindChildGroupTypesGrid()
 {
     gChildGroupTypes.DataSource = ChildGroupTypesDictionary.OrderBy(a => a.Value).ToList();
     gChildGroupTypes.DataBind();
 }