private void LoadValuesControls(int _option, Ivss _ivssData) { if (_option == 0) { this.IdentificationCard = string.Empty; this.FullName = string.Empty; this.BirthDate = string.Empty; this.EmployerNumber = string.Empty; this.Company = string.Empty; this.Entry = string.Empty; this.Status = string.Empty; this.Membership = string.Empty; this.Contingency = string.Empty; this.Weeks = string.Empty; this.Salaries = string.Empty; } else { if (!_ivssData.Descripcion.Contains( "la Cedula no esta registrada como asegurado")) { this.IdentificationCard = _ivssData.Cedula; this.FullName = MethodsHelper.TitleText(_ivssData.Nombre.Trim()); this.Gender = MethodsHelper.TitleText(_ivssData.Sexo.Trim()); this.BirthDate = _ivssData.Nacimiento.Trim(); this.EmployerNumber = MethodsHelper.TitleText(_ivssData.NumeroPatronal.Trim()); this.Company = _ivssData.Empresa.Trim(); this.Entry = _ivssData.Ingreso.ToUpper().Trim(); this.Status = MethodsHelper.TitleText(_ivssData.Estatus.Trim()); this.Membership = _ivssData.Afiliacion.Trim(); this.Contingency = _ivssData.Contingencia.Trim(); this.Weeks = _ivssData.Semanas.Trim(); this.Salaries = _ivssData.Salarios.Trim(); } else { this.MessageLabel = _ivssData.Descripcion; // Sets status of controls this.isValid = false; this.SetStatusControl(true, false, "Red", -1); } } }
private void LoadValuesControls(int _option, Zoom _zoom) { if (_option == 0) { this.TrackId = string.Empty; this.Reference = string.Empty; this.Status = string.Empty; this.ShippinigType = string.Empty; this.Date = string.Empty; this.Origin = string.Empty; this.Destination = string.Empty; this.MessageLabel = string.Empty; } else { if (_zoom != null) { if (!_zoom.Descripcion.Contains( "la Cedula no esta registrada como asegurado")) { this.TrackId = this.zoomItemViewModel.Tracking; this.Reference = _zoom.Referencia; this.Status = MethodsHelper.TitleText(_zoom.Estatus.Trim()); this.ShippinigType = MethodsHelper.TitleText(_zoom.TipoEnvio.Trim()); this.Date = _zoom.Fecha.Trim(); this.Origin = MethodsHelper.TitleText(_zoom.Origen.Trim()); this.Destination = _zoom.Destino.Trim(); //if (_zoom.Seguimiento.Count > 0) //{ // Tracking = // new ObservableCollection<Seguimiento>(_zoom.Seguimiento); //} //else //{ // Tracking = new ObservableCollection<Seguimiento>(); //} this.isValid = true; } else { this.MessageLabel = _zoom.Descripcion; // Sets status of controls this.isValid = false; this.SetStatusControl(true, false, "Red", -1); } } else { this.MessageLabel = string.Format("{0}{1}{2}{3}", string.Format( "El número: {0} de rastreo no está ", this.zoomItemViewModel.Tracking), "registrado en el sistema o ha ingresado ", "un numero de rastreo erroneo, ", "favor verifique...!!!"); // Sets status of controls this.isValid = false; this.SetStatusControl(true, false, "Red", -1); } } }