private void DataForm_AddingNewItem(object sender, DataFormAddingNewItemEventArgs e)
 {
     GetUserControlFKey().gFunctionKeyEnable = Utl_FunctionKey.geFunctionKeyEnable.New;
 }
 void PracownicyDataForm_AddingNewItem(object sender, DataFormAddingNewItemEventArgs e)
 {
     AddingNewItem = true;
 }
 void UmowyDataForm_AddingNewItem(object sender, DataFormAddingNewItemEventArgs e)
 {
     AddingNewItem = true;
 }
 /// <summary>
 /// Raises the AddingItem event.
 /// </summary>
 /// <param name="e">The event args.</param>
 protected virtual void OnAddingNewItem(DataFormAddingNewItemEventArgs e)
 {
     EventHandler<DataFormAddingNewItemEventArgs> handler = this.AddingNewItem;
     if (handler != null)
     {
         handler(this, e);
     }
 }
        /// <summary>
        /// Adds a new item.
        /// </summary>
        /// <returns>Whether or not a new item was added.</returns>
        public bool AddNewItem()
        {
            if (this.IsEditing)
            {
                if (this._canAddItemsAfterEdit && this.ValidateItem())
                {
                    this.ForceEndEdit();
                }
                else
                {
                    // Don't end the edit if we won't be able to start an insert operation immediately afterwards
                    // or if there are validation errors.
                    return false;
                }
            }

            if (!this.CanAddItems)
            {
                return false;
            }

            DataFormAddingNewItemEventArgs e = new DataFormAddingNewItemEventArgs();
            this.OnAddingNewItem(e);

            if (e.Cancel)
            {
                return false;
            }

            if (this.EditableCollectionView != null && this.EditableCollectionView.CanAddNew)
            {
                this._lastCurrentPosition = this._collectionView.CurrentPosition;
                this.EditableCollectionView.AddNew();
                this.IsAddingNew = this.EditableCollectionView.IsAddingNew;
                this.GetAllOriginalPropertyValues();
                return true;
            }

            return false;
        }
 private void PreOrderDataForm_AddingNewItem(object sender, DataFormAddingNewItemEventArgs e)
 {
     PreOrderDo(false);
 }
 protected override void OnAddingNewItem(DataFormAddingNewItemEventArgs e)
 {
     base.OnAddingNewItem(e);
 }
 public void _OnAddingNewItem()
 {
     DataFormAddingNewItemEventArgs e = new DataFormAddingNewItemEventArgs();
     OnAddingNewItem(e);
 }