// ***************************** ***************************** ***************************** // constructor public RegistroModViewModel(RegistroModel p) { //this._ParentRegistro = registroViewModel; this._RegistroRepository = new Protell.DAL.Repository.RegistroRepository(); this._PuntoMedicionRepository = new Protell.DAL.Repository.PuntoMedicionRepository(); this._EstructuraRepository = new Protell.DAL.Repository.EstructuraRepository(); this._CondProRepository = new Protell.DAL.Repository.CondProRepository(); this._Registro = new RegistroModel() { IdRegistro = p.IdRegistro, PUNTOMEDICION = new PuntoMedicionModel() { IdPuntoMedicion = p.IdPuntoMedicion, PuntoMedicionName = p.PUNTOMEDICION.PuntoMedicionName }, FechaCaptura = p.FechaCaptura, //HoraRegistro = p.HoraRegistro, HoraMilitar = p.HoraMilitar, DiaRegistro = p.DiaRegistro, Valor = p.Valor, AccionActual = p.AccionActual, IsActive = p.IsActive, Condicion = new CondProModel() { IdCondicion = p.Condicion.IdCondicion, CondicionName = p.Condicion.CondicionName }, }; this.LoadInfoGrid(); }
// ***************************** ***************************** ***************************** // constructor public CondProModViewModel(CondProModel p) { this._CondProRepository = new Protell.DAL.Repository.CondProRepository(); this._CondPro = new CondProModel() { IdCondicion = p.IdCondicion, CondicionName = p.CondicionName, IsActive = p.IsActive }; }
// ***************************** ***************************** ***************************** // constructor public CondProAddViewModel() { this._CondProRepository = new Protell.DAL.Repository.CondProRepository(); this._CondPro = new CondProModel() { IdCondicion = new UNID().getNewUNID(), IsActive = true }; }
public RegistroAddViewModel(RegistroViewModel registroViewModel, IConfirmation confirmation) { this._ParentRegistro = registroViewModel; this._RegistroRepository = new Protell.DAL.Repository.RegistroRepository(); this._EstructuraRepository = new Protell.DAL.Repository.EstructuraRepository(); this._CondProRepository = new Protell.DAL.Repository.CondProRepository(); this._PuntoMedicionMaxMinRepository = new Protell.DAL.Repository.PuntoMedicionMaxMinRepository(); this._Confirmation = confirmation; this.GetNewRegistro(); this.LoadInfo(); }
// ***************************** ***************************** ***************************** // Constructor y carga de elementos. public CondProViewModel() { this._CondProRepository = new Protell.DAL.Repository.CondProRepository(); this.LoadInfoGrid(); }
private void LoadPropiedades() { syncLogRepository = new SyncLogRepository(); _SistemaRepository = new SistemaRepository(); _RegistroRepository = new RegistroRepository(); _ServerLastDataRepository = new ServerLastDataRepository(); _UploadLogRepository = new UploadLogRepository(); _EvidenceSyncRepository = new EvidenceSyncRepository(); _SyncRepository = new SyncRepository(); _CondProRepository = new CondProRepository(); _DependenciaRepository = new DependenciaRepository(); _EstPuntoMedRepository = new EstPuntoMedRepository(); _EstructuraRepository = new EstructuraRepository(); _EstructuraDependenciaRepository = new EstructuraDependenciaRepository(); _PuntoMedicionRepository = new PuntoMedicionRepository(); _TipoPuntoMedicionRepository = new TipoPuntoMedicionRepository(); _UnidadMedidaRepository = new UnidadMedidaRepository(); //_ConsideracionRepository = new ConsideracionRepository(); //_AccionProtocoloRepository = new AccionProtocoloRepository(); _CnfSettingRepository = new CnfSettingRepository(); routeService = ConfigurationManager.AppSettings["RutaServicioSubida"].ToString(); routeDownload = ConfigurationManager.AppSettings["RutaServicioDescarga"].ToString(); basicAuthUser = ConfigurationManager.AppSettings["basicAuthUser"].ToString(); basicAuthPass = ConfigurationManager.AppSettings["basicAuthPass"].ToString(); contador = int.Parse(ConfigurationManager.AppSettings["ContSettings"].ToString()); TopLog = int.Parse(ConfigurationManager.AppSettings["TopLog"].ToString()); }
public TableroViewModel(IConfirmation con) { syncRepository = new SyncLogRepository(); accionRepository = new CatAccionActualRepository(); //Condicion this._CondProRepository = new Protell.DAL.Repository.CondProRepository(); this._PuntoMedicionMaxMinRepository = new Protell.DAL.Repository.PuntoMedicionMaxMinRepository(); this._RegistroRepository = new Protell.DAL.Repository.RegistroRepository(); this._Confirmation = con; this.usuarioRepository = new UsuarioRepository(); //Categorias cPuntosMedicion = new CategoriasViewModel(this.Usuario); cPuntosMedicion.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(cPuntosMedicion_PropertyChanged); cLumbreras = new CategoriasViewModel(this.Usuario); cLumbreras.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(cLumbreras_PropertyChanged); cEstPluviograficas = new CategoriasViewModel(this.Usuario); cEstPluviograficas.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(cEstPluviograficas_PropertyChanged); //PuntosMedicion pmAll = new PuntosMedicionViewModel(); pmAll.PropertyChanged += pmAll_PropertyChanged; init(); }
// ***************************** ***************************** ***************************** // constructor que recibe un viewmodel public RegistroModViewModel(RegistroViewModel registroViewModel, RegistroModel p, IConfirmation confirmation) { this._ParentRegistro = registroViewModel; this._RegistroRepository = new Protell.DAL.Repository.RegistroRepository(); //this._PuntoMedicionRepository = new Protell.DAL.Repository.PuntoMedicionRepository(); this._PuntoMedicionMaxMinRepository = new Protell.DAL.Repository.PuntoMedicionMaxMinRepository(); this._EstructuraRepository = new Protell.DAL.Repository.EstructuraRepository(); this._CondProRepository = new Protell.DAL.Repository.CondProRepository(); this._Confirmation = confirmation; this._Registro = new RegistroModel() { IdRegistro = p.IdRegistro, PUNTOMEDICION = new PuntoMedicionModel() { IdPuntoMedicion = p.IdPuntoMedicion, PuntoMedicionName = p.PUNTOMEDICION.PuntoMedicionName, Visibility = p.PUNTOMEDICION.Visibility, UIVisible = p.PUNTOMEDICION.UIVisible, TIPOPUNTOMEDICION = new TipoPuntoMedicionModel() { TipoPuntoMedicionName = p.PUNTOMEDICION.TIPOPUNTOMEDICION.TipoPuntoMedicionName }, UNIDADMEDIDA = new UnidadMedidaModel() { UnidadMedidaName = p.PUNTOMEDICION.UNIDADMEDIDA.UnidadMedidaName, UnidadMedidaShort = p.PUNTOMEDICION.UNIDADMEDIDA.UnidadMedidaShort } }, FechaCaptura = p.FechaCaptura, HoraRegistro = p.HoraRegistro, DiaRegistro = p.DiaRegistro, Valor = p.Valor, AccionActual = p.AccionActual, IsActive = p.IsActive, Condicion = new CondProModel() { IdCondicion = p.Condicion.IdCondicion, CondicionName= p.Condicion.CondicionName, PathCodicion = p.Condicion.PathCodicion } }; this.FechaCapturaActual = this.Registro.FechaCaptura; this.HoraMilitarActual = this.Registro.HoraMilitar; this.LoadInfoGrid(); }