internal override DtoBase PopulateDto(OracleDataReader reader) { var proMat = new ProfesionalMatriculaDto(); // if (!reader.IsDBNull(_ordPmtId)) { proMat.PmtId = reader.GetInt32(_ordPmtId); } // if (!reader.IsDBNull(_ordPmtProId)) { proMat.PmtProId = reader.GetInt32(_ordPmtProId); } // if (!reader.IsDBNull(_ordPmtMttId)) { proMat.PmtMttId = reader.GetInt32(_ordPmtMttId); } // if (!reader.IsDBNull(_ordPmtNro)) { proMat.PmtNro = reader.GetString(_ordPmtNro); } // if (!reader.IsDBNull(_ordMttDescripcion)) { proMat.MttDescripcion = reader.GetString(_ordMttDescripcion); } // IsNew proMat.IsNew = false; return(proMat); }
private void ObtenerDatosPantalla(ProfesionalDto profesional) { #region Persona ----------------------------------------- string aux; profesional.PsnNroDcto = txtDocumento.Value; if (!string.IsNullOrEmpty(txtNombre.Value)) { aux = txtNombre.Value; profesional.PsnNombre = aux.ToUpper(); } if (!string.IsNullOrEmpty(txtApellido.Value)) { aux = txtApellido.Value; profesional.PsnApellido = aux.ToUpper(); } profesional.PsnFechaNac = txtFecNac.Value; profesional.PsnTelefono = txtTel.Value; if (!string.IsNullOrEmpty(txtDire.Value)) { aux = txtDire.Value; profesional.PsnDomicilio = aux.ToUpper(); } if (!string.IsNullOrEmpty(txtMail.Value)) { aux = txtMail.Value; profesional.PsnEmail = aux.ToUpper(); } if (rbM.Checked) { profesional.PsnSexo = "M"; } else if (rbF.Checked) { profesional.PsnSexo = "F"; } profesional.ProActivo = "S"; #endregion #region Matriculas -------------------------------------- if (ViewState["DadaTableMat"] != null) { var dtMat = (DataTable)ViewState["DadaTableMat"]; var listaMatricula = new List <ProfesionalMatriculaDto>(); foreach (DataRow dtRow in dtMat.Rows) { var matricula = new ProfesionalMatriculaDto(); if (!DBNull.Value.Equals(dtRow[0])) { matricula.PmtId = Convert.ToInt32(dtRow[0].ToString()); } matricula.PmtMttId = Convert.ToInt32(dtRow[1].ToString()); if (!DBNull.Value.Equals(dtRow["PMTNRO"])) { matricula.PmtNro = dtRow["PMTNRO"].ToString(); } listaMatricula.Add(matricula); } profesional.ProListMatriculas = listaMatricula; } #endregion #region Especialidades ---------------------------------- profesional.ProListEspecialidades = listaEspecialidades; #endregion #region Agenda ------------------------------------------ if (ViewState["DataTableAge"] != null) { var dtAge = (DataTable)ViewState["DataTableAge"]; var listaAgenda = new List <AgendaDto>(); foreach (DataRow dtRow in dtAge.Rows) { var agenda = new AgendaDto(); if (!DBNull.Value.Equals(dtRow[0])) { agenda.AgeId = Convert.ToInt32(dtRow[0].ToString()); } agenda.AgeDiaId = Convert.ToInt32(dtRow[1].ToString()); // Descripcion del tipo de dia = dtRow[2].ToString() agenda.AgeHoraDesde = dtRow[3].ToString(); agenda.AgeHoraHasta = dtRow[4].ToString(); listaAgenda.Add(agenda); } profesional.ProListAgenda = listaAgenda; } #endregion var varEstado = Request.QueryString["e"]; if (varEstado == "B") { if (lblProId != null) { profesional.ProId = Convert.ToInt32(lblProId.Text); } if (lblPsnId != null) { profesional.PsnId = Convert.ToInt32(lblPsnId.Text); } var opcionSeleccionada = ddlEstado.SelectedItem.ToString(); if (opcionSeleccionada == "NO") { profesional.ProActivo = "N"; } else { profesional.ProActivo = "S"; } } }