protected void lnkAgregar_Click(object sender, EventArgs e) { try { EntPaciente ent = new EntPaciente(); ent.Estatus = Convert.ToBoolean(((CheckBox)gvPacientes.FooterRow.FindControl("chkEstatusFT")).Checked); ent.Nombre = ((TextBox)gvPacientes.FooterRow.FindControl("txtNombreFT")).Text; ent.Paterno = ((TextBox)gvPacientes.FooterRow.FindControl("txtPaternoFT")).Text; ent.Materno = ((TextBox)gvPacientes.FooterRow.FindControl("txtMaternoFT")).Text; ent.IdSexo = Convert.ToInt32(((DropDownList)gvPacientes.FooterRow.FindControl("ddlSexoFT")).SelectedValue); ent.Calle = ((TextBox)gvPacientes.FooterRow.FindControl("txtCalleFT")).Text; ent.Numero = ((TextBox)gvPacientes.FooterRow.FindControl("txtNumeroFT")).Text; ent.IdDelegacion = Convert.ToInt32(((DropDownList)gvPacientes.FooterRow.FindControl("ddlDelegacionFT")).SelectedValue); ent.IdColonia = Convert.ToInt32(((DropDownList)gvPacientes.FooterRow.FindControl("ddlColoniaFT")).SelectedValue); ent.Horario = ((TextBox)gvPacientes.FooterRow.FindControl("txtHorarioFT")).Text; ent.Edad = Convert.ToInt32(((TextBox)gvPacientes.FooterRow.FindControl("txtEdadFT")).Text); ent.Alergia = ((TextBox)gvPacientes.FooterRow.FindControl("txtAlergiasFT")).Text; //ent.FechaAlta = Convert.ToDateTime(((TextBox)gvPacientes.FooterRow.FindControl("txtFechaFT")).Text); BusPaciente obj = new BusPaciente(); obj.Insertar(ent); Response.Redirect(Request.CurrentExecutionFilePath); } catch (Exception ex) { MostrarMensaje(ex.Message); } }
protected void gvPacientes_RowUpdating(object sender, GridViewUpdateEventArgs e) { try { EntPaciente ent = new EntPaciente(); ent.Id = Convert.ToInt32(gvPacientes.DataKeys[e.RowIndex].Values["Id"]); //ent.Estatus = Convert.ToBoolean(((CheckBox)gvPacientes.Rows[e.RowIndex].FindControl("chkEstatusEIT")).Checked); ent.Nombre = ((TextBox)gvPacientes.Rows[e.RowIndex].FindControl("txtNombreEIT")).Text; ent.Paterno = ((TextBox)gvPacientes.Rows[e.RowIndex].FindControl("txtPaternoEIT")).Text; ent.Materno = ((TextBox)gvPacientes.Rows[e.RowIndex].FindControl("txtMaternoEIT")).Text; ent.IdSexo = Convert.ToInt32(((DropDownList)gvPacientes.Rows[e.RowIndex].FindControl("ddlSexoEIT")).SelectedValue); ent.Calle = ((TextBox)gvPacientes.Rows[e.RowIndex].FindControl("txtCalleEIT")).Text; ent.Numero = ((TextBox)gvPacientes.Rows[e.RowIndex].FindControl("txtNumeroEIT")).Text; ent.IdDelegacion = Convert.ToInt32(((DropDownList)gvPacientes.Rows[e.RowIndex].FindControl("ddlDelegacionEIT")).SelectedValue); ent.IdColonia = Convert.ToInt32(((DropDownList)gvPacientes.Rows[e.RowIndex].FindControl("ddlColoniaEIT")).SelectedValue); ent.Horario = ((TextBox)gvPacientes.Rows[e.RowIndex].FindControl("txtHorarioEIT")).Text; ent.Edad = Convert.ToInt32(((TextBox)gvPacientes.Rows[e.RowIndex].FindControl("txtEdadEIT")).Text); ent.Alergia = ((TextBox)gvPacientes.Rows[e.RowIndex].FindControl("txtAlergiasEIT")).Text; //ent.FechaAlta = Convert.ToDateTime(((TextBox)gvPacientes.Rows[e.RowIndex].FindControl("txtFechaEIT")).Text); BusPaciente obj = new BusPaciente(); obj.Actualizar(ent); Response.Redirect(Request.CurrentExecutionFilePath); } catch (Exception ex) { MostrarMensaje(ex.Message); } }
public BusCallCenter() { datCallCenter = new DatCallCenter(); busColaborador = new BusColaborador(); busFolio = new BusFolio(); busPaciente = new BusPaciente(); busConsulta = new BusConsulta(); }
public IMDResponse <bool> CGuardarDatosPaciente([FromBody] EntUpdPaciente entUpdPaciente) { IMDResponse <bool> response = new IMDResponse <bool>(); string metodo = nameof(this.CGuardarDatosPaciente); logger.Info(IMDSerialize.Serialize(67823458580563, $"Inicia {metodo}([FromBody]EntUpdPaciente entUpdPaciente)", entUpdPaciente)); try { BusPaciente busPaciente = new BusPaciente(); response = busPaciente.BUpdPaciente(entUpdPaciente); } catch (Exception ex) { response.Code = 67823458581340; response.Message = "Ocurrió un error inesperado en el servicio al guardar los datos del paciente."; logger.Error(IMDSerialize.Serialize(67823458581340, $"Error en {metodo}([FromBody]EntUpdPaciente entUpdPaciente): {ex.Message}", entUpdPaciente, ex, response)); } return(response); }