// ***************************** ***************************** *****************************
        // constructor
        public FechaVencimientoAddViewModel(FechaVencimientoViewModel FechaVencimientoViewModel)
        {
            this._ParentFechaVencimiento = FechaVencimientoViewModel;
            this._FechaVencimientoRepository = new GestorDocument.DAL.Repository.FechaVencimientoRepository();
            this._AsuntoRepository = new GestorDocument.DAL.Repository.AsuntoRepository();
            this.LoadInfo();

            this._FechaVencimiento = new FechaVencimientoModel()
            {
                IdFechaVencimiento = new UNID().getNewUNID(),
                FechaVencimiento = DateTime.Now,
                FechaCreacion = DateTime.Now,
                IsActive = true
            };
        }
        public bool CanSave()
        {
            bool _CanSave = false;

            if (
                (this._FechaVencimiento.Asunto != null) &&
                (this._FechaVencimiento.FechaVencimiento != null) &&
                (this._FechaVencimiento.FechaCreacion!= null) &&
                (this._FechaVencimiento != null)
                )
            {
                _CanSave = true;
                this._CheckSave = this._FechaVencimientoRepository.GetFechaVencimientoAdd(this._FechaVencimiento);

                if (this._CheckSave != null)
                {
                    _CanSave = false;
                    ElementExists = "El elemento ya existe.";

                }
                else
                {
                    _CanSave = true;
                    ElementExists = "";
                }
            }
            return _CanSave;
        }
 public void GetFechaVencimientoMod(FechaVencimientoViewModel viewModel, FechaVencimientoModel p)
 {
     this.DataContext = new FechaVencimientoModViewModel(p, viewModel);
 }