IKanban Gotowy Interfejs

< Cofnij
//..
       
#region IKanban
        private string _opis;
        [XafDisplayName("Opis"), ToolTip("Opis")]
        [Persistent("Opis")]
        public string Opis
        {
            get { return _opis; }
            set { SetPropertyValue("Opis", ref _opis, value); }
        }

        private ObiektStan _stan;
        [XafDisplayName("Stan"), ToolTip("Stan")] [Association("samochod-obiektstan")] // <- relacja z encją zawierającą stany.
        [Persistent("Stan"), RuleRequiredField(DefaultContexts.Save)]
        public ObiektStan Stan
        {
            get { return _stan; }
            set { SetPropertyValue("Stan", ref _stan, value); }
        }


        private string _imieNazwisko;
        [XafDisplayName("Imię i nazwisko"), ToolTip("Imię i nazwisko")]
        [Persistent("ImieNazwisko"), RuleRequiredField(DefaultContexts.Save)]
        public string ImieNazwisko
        {
            get { return _imieNazwisko; }
            set { SetPropertyValue("ImieNazwisko", ref _imieNazwisko, value); }
        }


        [Browsable(false)]
        public Guid Id
        {
            get
            {
                return Oid;
            }
        }

        [Browsable(false)]
        public string Caption
        {
            get
            {
                return NrRejestracyjny;
            }
        }

        [Browsable(false)]
        public string Description
        {
            get
            {
                return Opis;
            }
        }

        public Color Label
        {
            get
            {
                if (Aktywny)
                {
                    return Color.Green;
                }
                else
                {
                    return Color.Red;
                }
            }
        }

        [Browsable(false)]
        public ObiektStan Status
        {
            get
            {
                return this.Stan;
            }
        }

        EnableChangeStatusRetValue IKanban.IsEnabledChangeStatus(IObjectSpace os, object prevStatusm, object newStatus)
        {
            return null;
        }
        public bool ChangeStatus(IObjectSpace os, object prevStatus, object newStatus)
        {
            try
            {
                this.Stan = (ObiektStan)newStatus;
            }
            catch
            {
            }
            return true;
        }
        private byte[] _obrazek;
        [XafDisplayName("Obrazek")]
        [Persistent("Obrazek")]
        [EditorAlias(DevExpress.ExpressApp.Editors.EditorAliases.ImagePropertyEditor)]
        public byte[] Obrazek
        {
            get { return _obrazek; }
            set { SetPropertyValue("Obrazek", ref _obrazek, value); }
        }
        [Browsable(false)]
        public byte[] OperatorImage
        {
            get
            {
                return Obrazek;

            }
        }

        [Browsable(false)]
        public string OperatorName
        {
            get
            {
                return ImieNazwisko;
            }
        }
        private int _index;
        [Persistent("Index")]
        [Browsable(false)]
        public int Index
        {
            get { return _index; }
            set { SetPropertyValue("Index", ref _index, value); }
        }
        object IKanban.Status
        {
            get
            {
                return this.Status;
            }
        }
        #endregion
//..