using System;
using System.Linq;
using DevExpress.Xpo;
using DevExpress.Persistent.Base;
using System.Collections.Generic;
using DevExpress.Persistent.BaseImpl;

namespace Nuvolar.Module.BusinessObjects
{
    [DefaultClassOptions]
    [NonPersistent]
    [CreatableItem(false)]
    [NavigationItem(false)]
    //[ImageName("BO_Contact")]
    //[DefaultProperty("DisplayMemberNameForLookupEditorsOfThisType")]
    //[DefaultListViewOptions(MasterDetailMode.ListViewOnly, false, NewItemRowPosition.None)]
    //[Persistent("DatabaseTableName")]
    // Specify more UI options using a declarative approach (https://documentation.devexpress.com/eXpressAppFramework/CustomDocument112701.aspx).
    public class StoragePDACollectionRowsH : BaseObject
    { // Inherit from a different class to provide a custom primary key, concurrency and deletion behavior, etc. (https://documentation.devexpress.com/eXpressAppFramework/CustomDocument113146.aspx).
        public StoragePDACollectionRowsH(Session session)
            : base(session)
        {
        }
        public override void AfterConstruction()
        {
            base.AfterConstruction();
            // Place your initialization code here (https://documentation.devexpress.com/eXpressAppFramework/CustomDocument112834.aspx).
        }
        private double _QTT_Original; //Eredeti, még osztatlan mennyiség
        private double _QTT_Remaining; // Mennyit lehet MAX leosztani
        private double _QTT_Divided; // Mennyit van már leosztva
        private double _QTT_Will;//Szándék, amit most akarok leosztani


        //[XafDisplayName("My display name"), ToolTip("My hint message")]
        //[ModelDefault("EditMask", "(000)-00"), Index(0), VisibleInListView(false)]
        //[Persistent("DatabaseColumnName"), RuleRequiredField(DefaultContexts.Save)]
        public double QTT_Original
        {
            get { return _QTT_Original; }
            set { SetPropertyValue("QTT_Original", ref _QTT_Original, value); }
        }
        public double QTT_Remaining
        {
            get { return _QTT_Remaining; }
            set { SetPropertyValue("QTT_Remaining", ref _QTT_Remaining, value); }
        }
        public double QTT_Divided
        {
            get { return _QTT_Divided; }
            set { SetPropertyValue("QTT_Divided", ref _QTT_Divided, value); }
        }
        public double QTT_Will
        {
            get { return _QTT_Will; }
            set { SetPropertyValue("QTT_Will", ref _QTT_Will, value); }
        }

        //[Action(Caption = "My UI Action", ConfirmationMessage = "Are you sure?", ImageName = "Attention", AutoCommit = true)]
        //public void ActionMethod() {
        //    // Trigger a custom business logic for the current record in the UI (https://documentation.devexpress.com/eXpressAppFramework/CustomDocument112619.aspx).
        //    this.PersistentProperty = "Paid";
        //}
    }
}
