private void InsertarAsesor() { CLS_Asesor_Tecnico Clase = new CLS_Asesor_Tecnico(); Clase.Id_AsesorTecnico = txtId.Text.Trim(); Clase.Nombre_AsesorTecnico = txtNombre.Text.Trim(); Clase.Usuario = Id_Usuario; if (glue_Empresa.EditValue != null) { Clase.c_codigo_eps = glue_Empresa.EditValue.ToString(); Clase.MtdInsertarAsesor(); if (Clase.Exito) { CargarAsesor("1"); XtraMessageBox.Show("Se ha Insertado el registro con exito"); LimpiarCampos(); } else { XtraMessageBox.Show(Clase.Mensaje); } } }
private void EliminarAsesor() { CLS_Asesor_Tecnico Clase = new CLS_Asesor_Tecnico(); Clase.Id_AsesorTecnico = txtId.Text.Trim(); Clase.Usuario = Id_Usuario; if (check_Activo.Checked) { Clase.Activo = "1"; } else { Clase.Activo = "0"; } Clase.MtdEliminarAsesor(); if (Clase.Exito) { if (check_Activo.Checked) { CargarAsesor("0"); } else { CargarAsesor("1"); } XtraMessageBox.Show("Se ha Inhabilitado el asesor con exito"); LimpiarCampos(); } else { XtraMessageBox.Show(Clase.Mensaje); } }
private void CargarAsesor(string Activo) { dtgAsesor.DataSource = null; CLS_Asesor_Tecnico Clase = new CLS_Asesor_Tecnico(); Clase.Activo = Activo; if (glue_Empresa.EditValue != null) { Clase.c_codigo_eps = glue_Empresa.EditValue.ToString(); Clase.MtdSeleccionarAsesor(); if (Clase.Exito) { dtgAsesor.DataSource = Clase.Datos; } } }
private void CargarAsesor() { glue_Asesor.EditValue = null; glue_Asesor.Properties.DisplayMember = "Nombre_AsesorTecnico"; glue_Asesor.Properties.ValueMember = "Id_AsesorTecnico"; CLS_Asesor_Tecnico Clase = new CLS_Asesor_Tecnico(); Clase.Activo = "1"; if (glue_Empresa.EditValue != null) { Clase.c_codigo_eps = glue_Empresa.EditValue.ToString(); Clase.MtdSeleccionarAsesor(); if (Clase.Exito) { glue_Asesor.Properties.DataSource = Clase.Datos; } } }