/// <summary>
        /// Grid_RowDataBound method implementation
        /// </summary>
        protected void Grid_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            DomainConfigurationWrapper wr = (e.Row.DataItem as DomainConfigurationWrapper);

            if ((wr != null) && (wr.DisplayPosition < 0))
            {
                e.Row.Visible = false;
            }
        }
 /// <summary>
 /// InsertingData method implementation
 /// </summary>
 protected void InsertingData(object sender, ObjectDataSourceMethodEventArgs e)
 {
     if (!CheckModifyAccess())
     {
         e.Cancel = true;
         SPUtility.HandleAccessDenied(new UnauthorizedAccessException("You are not authorized to call this operation."));
     }
     foreach (System.Collections.DictionaryEntry prm in e.InputParameters)
     {
         DomainConfigurationWrapper wr = prm.Value as DomainConfigurationWrapper;
         if (wr != null)
         {
             wr.ServiceApplication = ServiceApplication;
         }
     }
 }
 /// Delete method implementation
 /// </summary>
 public static void Delete(DomainConfigurationWrapper __values)
 {
     __values.ServiceApplication.DeleteDomainConfiguration(new DomainConfiguration(__values.DisplayName, __values.DnsName, __values.Connection, __values.Enabled, __values.DisplayPosition));
     __values = null;
 }
 /// Insert method implementation
 /// </summary>
 public static void Insert(DomainConfigurationWrapper values)
 {
     values.ServiceApplication.SetDomainConfiguration(null, new DomainConfiguration(values.DisplayName, values.DnsName, values.Connection, values.Enabled, values.DisplayPosition));
 }
 /// <summary>
 /// Update method implementation
 /// </summary>
 public static void Update(DomainConfigurationWrapper values, DomainConfigurationWrapper __values)
 {
     __values.ServiceApplication.SetDomainConfiguration(new DomainConfiguration(__values.DisplayName, __values.DnsName, __values.Connection, __values.Enabled, __values.DisplayPosition),
                                                        new DomainConfiguration(values.DisplayName, values.DnsName, values.Connection, values.Enabled, values.DisplayPosition));
 }