// Public Methods (7) /// <summary> /// Adds the specified grid view. /// </summary> /// <param name="gridView">The grid view.</param> public virtual void Add(GridView gridView) { try { List <GridView> gridViews = GridViewUtils.ResetDefaultGridView(gridView, List); Save(gridViews); } catch (Exception e) { throw new APIException((int)Errors.PersonalGVMAdd, e.Message); } }
//�Public�Methods�(7)� /// <summary> /// Adds the specified grid view. /// </summary> /// <param name="gridView">The grid view.</param> public virtual void Add(GridView gridView) { try { if (!ValidateAuthorization()) { throw new APIException((int)Errors.GlobalGVMAddNoPermission, string.Format("{0} does not have permission to add a global view.", LoginName)); } SPWeb configWeb = ConfigWeb; using (configWeb) { List <GridView> gridViews = GridViewUtils.ResetDefaultGridView(gridView, List); Save(configWeb, gridViews); } } catch (Exception e) { throw new APIException((int)Errors.GlobalGVMAdd, e.Message); } }