This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
////Cargamos los datos en el reporte | |
ReportDocument objReporte = new ReportDocument();//crear un objeto de tipo Crystal Report | |
objReporte.Load(Application.StartupPath.ToString() + "\\Crystal Report\\HonorariosMedicos\\rptHMAmbGeneral.rpt"); | |
objReporte.Subreports[0].SetDataSource(listaSeguros); | |
objReporte.Subreports[1].SetDataSource(listaParticular); | |
objReporte.SetDataSource(listaCondiciones); | |
FrmReportes FormReportes = new FrmReportes(); | |
FormReportes.CrReportes.ReportSource = objReporte; | |
FormReportes.Show(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a) Solucion al error :RoundCube: DATABASE ERROR: CONNECTION FAILED! | |
Este error surge luego de instalar VestaCP y acceder a webmail. | |
La Solucion corresponde: | |
- ir a /var/lib/roundcube/debian-db.php | |
- ahi veremos el pass de usuario roundcube, copiamos ese pass. | |
- nos vamos a mysql: | |
1. ingresamos con usuario root: mysql -u root | |
2. creamos base de datos "roundcube" | |
3. ingresamos en la base de datos "roundcube" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static string CifrarClave(string clave) | |
{ | |
//Declaramos un Objeto de tipo SHA512Managed | |
SHA512Managed passwd = new SHA512Managed(); | |
//Declarmos un arreglo bytes donde se guardara el texto a cifrar en formato de bytes | |
byte[] texto = System.Text.Encoding.ASCII.GetBytes(clave); | |
//Declaramos otro arrego de bytes donde se guardará la contraseña ya cifrada. | |
byte[] textocifrado = passwd.ComputeHash(texto); | |
//convertimo en texto lo bytes cifrado | |
string contrasena = Convert.ToBase64String(textocifrado); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void exportarDataGridView(ToolStripProgressBar Barra, DataGridView lista , string titulo) | |
{ | |
try | |
{ | |
Barra.Value = 0; | |
Barra.Visible = true; | |
Barra.Maximum = lista.Rows.Count; | |
Microsoft.Office.Interop.Excel.Application libro = new Microsoft.Office.Interop.Excel.Application(); | |
libro.Workbooks.Add(true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Boolean Insertar(cls_Convenios_Detalle oConveniosDetalle) | |
{ | |
SqlConnection _conexion = new SqlConnection(cls_Datos.cadenaconexion); | |
SqlCommand _comando = new SqlCommand("PA_Convenios_Detalle", _conexion) { CommandType = CommandType.StoredProcedure }; | |
_comando.Parameters.AddWithValue("@IdConvenio", SqlDbType.VarChar).Value = oConveniosDetalle.IdConvenio; | |
_comando.Parameters.AddWithValue("@IdAseguradora", SqlDbType.VarChar).Value = oConveniosDetalle.IdAseguradora; | |
_comando.Parameters.AddWithValue("@Fecreg", SqlDbType.DateTime).Value = oConveniosDetalle.Fecreg; | |
_comando.Parameters.AddWithValue("@Fecmov", SqlDbType.DateTime).Value = oConveniosDetalle.Fecmov; | |
_comando.Parameters.AddWithValue("@Hostname", SqlDbType.VarChar).Value = oConveniosDetalle.Hostname; | |
_comando.Parameters.AddWithValue("@Tipo", SqlDbType.Int).Value = 2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public List<cls_Convenios_Detalle> Buscar(int idConvenio) | |
{ | |
SqlConnection _conexion = new SqlConnection(cls_Datos.cadenaconexion); | |
SqlCommand _comando = new SqlCommand("PA_Convenios_Detalle", _conexion) { CommandType = CommandType.StoredProcedure }; | |
_comando.Parameters.AddWithValue("@idConvenio", SqlDbType.Int).Value = idConvenio; | |
_comando.Parameters.AddWithValue("@Tipo", SqlDbType.Int).Value = 1; | |
List<cls_Convenios_Detalle> ListaConvenioDetalle = new List<cls_Convenios_Detalle>(); | |
try | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static UIMedicos_Convenios frmConvenios; | |
public static UIMedicos_Convenios CreateInstante(System.Windows.Forms.Form FormParent) | |
{ | |
if (frmConvenios == null || frmConvenios.IsDisposed) | |
{ | |
frmConvenios = new UIMedicos_Convenios(); | |
} | |
frmConvenios.BringToFront(); | |
frmConvenios.MdiParent = FormParent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void LlenarComboConvenios() | |
{ | |
//Llenar combo | |
//this.cbxConvenios.Items.Clear(); | |
this.cbxConvenios.DataSource = null; | |
cls_ConveniosDAO oConveniosDAO = new cls_ConveniosDAO(); | |
List<cls_Convenios> ListaConvenios = new List<cls_Convenios>(); | |
ListaConvenios = oConveniosDAO.ListarTodos(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try | |
{ | |
ReportDocument objReporte = new ReportDocument(); | |
objReporte.Load(Application.StartupPath.ToString() + "\\Crystal Report\\rptRecalculo.rpt"); | |
OracleConnection _conexion = new OracleConnection(cls_DatosOracle.cadenaconexion); | |
OracleDataAdapter _comando = new OracleDataAdapter(string.Format(@"SELECT PRFNUM AS PREFACTURA, | |
USUARIO, | |
NOMBRECOMPLETO, | |
REGRECALCULO, |
NewerOlder