public static void DatosGenerales(DataSet dstcompanyxml, DatosGenerales datosGenerales) { foreach (DataRow reader in dstcompanyxml.Tables[0].Rows) { var CodigoMoneda = reader["codigomoneda"]; if (CodigoMoneda != null) { datosGenerales.CodigoMoneda = CodigoMoneda.ToString(); } var NumeroAcceso = reader["numeroaccesso"]; if (NumeroAcceso != null) { datosGenerales.NumeroAcceso = NumeroAcceso.ToString(); } var FechaHoraEmision = reader["FechaHoraEmision"]; if (FechaHoraEmision != null) { datosGenerales.FechaHoraEmision = FechaHoraEmision.ToString(); } datosGenerales.Tipo = Constants.TIPO_FACTURA; } }
protected void btnAplicarFiltro_Click(object sender, EventArgs e) { bool HayError = false; lblFechaLote.Text = ""; lblFechaCarga.Text = ""; if (!string.IsNullOrWhiteSpace(txtFechaLIni.Text) || !string.IsNullOrWhiteSpace(txtFechaLFin.Text)) { if (!DatosGenerales.EsFecha(txtFechaLIni.Text) || !DatosGenerales.EsFecha(txtFechaLFin.Text)) { HayError = true; lblFechaLote.Text = "Revise las fechas ingresadas."; } } if (!string.IsNullOrWhiteSpace(txtFechaCIni.Text) || !string.IsNullOrWhiteSpace(txtFechaCFin.Text)) { if (!DatosGenerales.EsFecha(txtFechaCIni.Text) || !DatosGenerales.EsFecha(txtFechaCFin.Text)) { HayError = true; lblFechaCarga.Text = "Revise las fechas ingresadas."; } } if (!HayError) { grdDatos.DataSource = objCon.BuscarLotes(txtIdentificador.Text, txtFechaCIni.Text, txtFechaCFin.Text, txtFechaLIni.Text, txtFechaLFin.Text, ArmadoCadena(chklAdministradora), ArmadoCadena(chklPortafolio)); grdDatos.DataBind(); grdDatos.Columns[CeldaId].Visible = false; } }
public GTAnulacionDocumento AnulacionXml(string Numero, string Motivo, DataTable Detalle) { DatosGenerales DatosGenerales = new DatosGenerales { FechaEmisionDocumentoAnular = Detalle.Rows[0]["FechaEmision"].ToString(), FechaHoraAnulacion = Detalle.Rows[0]["FechaAnulacion"].ToString(), ID = "DatosAnulacion", IDReceptor = Detalle.Rows[0]["IDReceptor"].ToString(), MotivoAnulacion = Motivo, NITEmisor = Detalle.Rows[0]["NITEmisor"].ToString(), NumeroDocumentoAAnular = Numero }; AnulacionDTE AnulacionDTE = new AnulacionDTE { ID = "DatosCertificados", DatosGenerales = DatosGenerales }; SAT sat = new SAT { AnulacionDTE = AnulacionDTE }; return(new GTAnulacionDocumento { SAT = sat }); }
public DataTable BuscarLotes(string Descripcion, string FechaCargaIni, string FechaCargaFin, string FechaLoteIni, string FechaLoteFin, string Administradoras, string Portafolios) { DateTime?FCI; DateTime?FCF; DateTime?FLI; DateTime?FLF; if (string.IsNullOrWhiteSpace(Descripcion)) { Descripcion = null; } if (string.IsNullOrWhiteSpace(Administradoras)) { Administradoras = null; } if (string.IsNullOrWhiteSpace(Portafolios)) { Portafolios = null; } if (DatosGenerales.EsFecha(FechaCargaIni)) { FCI = DatosGenerales.ObtieneFecha(FechaCargaIni); } else { FCI = null; } if (DatosGenerales.EsFecha(FechaCargaFin)) { FCF = DatosGenerales.ObtieneFecha(FechaCargaFin); } else { FCF = null; } if (DatosGenerales.EsFecha(FechaLoteIni)) { FLI = DatosGenerales.ObtieneFecha(FechaLoteIni); } else { FLI = null; } if (DatosGenerales.EsFecha(FechaLoteFin)) { FLF = DatosGenerales.ObtieneFecha(FechaLoteFin); } else { FLF = null; } return(dlObj.BuscarLotes(Descripcion, FCI, FCF, FLI, FLF, Administradoras, Portafolios)); }
private string ActualizaReferencia(int Cart_Id) { string Referencia = DatosGenerales.GeneraReferencia(Cart_Id.ToString()); string MsjBD = ""; DataSet MensajeBD = new DataSet(); Database db = EnterpriseLibraryContainer.Current.GetInstance <Database>("Inventario"); StringBuilder sqlCommand = new StringBuilder(); DbCommand selectCommand = null; try { selectCommand = db.GetSqlStringCommand("stpU_ReferenciaCarta"); selectCommand.CommandType = CommandType.StoredProcedure; db.AddInParameter(selectCommand, "@Cart_Id", DbType.Int32, Cart_Id); db.AddInParameter(selectCommand, "@Cart_Referencia", DbType.String, Referencia); MensajeBD = db.ExecuteDataSet(selectCommand); } catch (Exception ex) { MsjBD = ex.Message; } return(Referencia); }
protected void ValidarTD() { if (DatosGenerales.Equivalencia_SQLDotNet(ddlTipoDatoQ.SelectedValue) == "String") { pnlLongitud04Q.Visible = true; } else { pnlLongitud04Q.Visible = false; } hddAplicaLongitud.Value = pnlLongitud04Q.Visible == true ? "1" : "0"; chkAprox04Q.Checked = false; if (DatosGenerales.Equivalencia_SQLDotNet(ddlTipoDatoQ.SelectedValue) == "String" && !ddlTipoDatoQ.SelectedValue.ToLower().Contains("date") && !ddlTipoDatoQ.SelectedValue.ToLower().Contains("time")) { pnlAprox04Q.Visible = true; } else { pnlAprox04Q.Visible = false; } if (hddAplicaLongitud.Value == "1") { txtLongitud04Q.Focus(); } }
protected void btnProcesar_Click(object sender, EventArgs e) { BLBovedaContra objBov = new BLBovedaContra(); string Errores = ""; if (rbTodos.Checked) { Errores = objBov.GuardarLlave(Session["UserNameLogin"].ToString()); } if (rbEspecial.Checked) { txtCorreo.Text = txtCorreo.Text.Trim(); if (DatosGenerales.EsEmail(txtCorreo.Text)) { Errores = objBov.GuardarLlave(Session["UserNameLogin"].ToString(), txtCorreo.Text); } else { Errores = "No es un correo válido"; } } if (Errores == "") { DatosGenerales.EnviaMensaje("Revise su correo para obtenerla. Puede tardar unos minutos.", "Llave generada", DatosGenerales.TiposMensaje.Informacion); } else { DatosGenerales.EnviaMensaje(Errores, "Proceso interrumpido", DatosGenerales.TiposMensaje.Error); } }
protected void btnProcesar_Click(object sender, EventArgs e) { if (Page.IsValid) { BLSoftware objGrupoSoftware = new BLSoftware(); int AppSt_Id = 0; int AppT_Id = 0; int App_Id = 0; int.TryParse(ddlEstado.SelectedValue, out AppSt_Id); int.TryParse(ddlTipo.SelectedValue, out AppT_Id); int.TryParse(ddlApp.SelectedValue, out App_Id); if (AppSt_Id > 0 && AppT_Id > 0 && App_Id > 0) { objGrupoSoftware.ActualizarApp(App_Id, AppSt_Id, AppT_Id, txtNombre.Text.Trim(), txtDescripcion.Text.Trim(), chkEnTFS.Checked, chkProductiva.Checked, txtObservaciones.Text.Trim(), txtUbicacion.Text.Trim()); } else { MsgBoxU.AddMessage("Faltan campos por seleccionar", YaBu.MessageBox.uscMsgBox.enmMessageType.Attention); } objGrupoSoftware.HistoricoApp(this.Page.ToString().Substring(4, this.Page.ToString().Substring(4).Length - 5) + ".aspx", Session["UserNameLogin"].ToString(), "U", App_Id); DatosGenerales.EnviaMensaje("Proceso finalizado", "Modificación de aplicación", DatosGenerales.TiposMensaje.Informacion); } }
protected void btnProcesar_Click(object sender, EventArgs e) { BLServidores objSrv = new BLServidores(); int TR_Id = 0; int Obj_Id = 0; lblMsj.Text = ""; txtCinta.Text = txtCinta.Text.Trim(); int.TryParse(ddlFiltro.SelectedValue, out TR_Id); int.TryParse(ddlObj.SelectedValue, out Obj_Id); string Archivo = objSrv.ReporteCintas(TR_Id, Obj_Id, txtCinta.Text, Server.MapPath("../Reportes/" + DatosGenerales.RutaLocalReportesDinamicos)); if (Archivo.Length > 4 && Archivo.Substring(0, 5) != "Error") { Archivo = DatosGenerales.RutaReportesDinamicos + Archivo; } else { lblMsj.Text = Archivo; } if (Archivo != "") { Response.Redirect(Archivo); } else { DatosGenerales.EnviaMensaje("No se encontraron resultados para su búsqueda.", "Exportar a Excel", DatosGenerales.TiposMensaje.Informacion); } }
protected void btnProcesar_Click(object sender, EventArgs e) { if (Page.IsValid) { BLSoftware objGrupoSoftware = new BLSoftware(); string Resp = ""; int App_Id = 0; int BD_Id = 0; int.TryParse(ddlAplicacion.SelectedValue, out App_Id); int.TryParse(ddlBD.SelectedValue, out BD_Id); if (App_Id > 0 && BD_Id > 0) { Resp = objGrupoSoftware.InsertarAppRelBD(App_Id, BD_Id, chkPropietaria.Checked); } else { MsgBoxU.AddMessage("Se debe seleccionar una aplicación y una base de datos", YaBu.MessageBox.uscMsgBox.enmMessageType.Attention); } objGrupoSoftware.HistoricoApp(this.Page.ToString().Substring(4, this.Page.ToString().Substring(4).Length - 5) + ".aspx", Session["UserNameLogin"].ToString(), "I", App_Id, BD_Id); if (Resp == "") { DatosGenerales.EnviaMensaje("Proceso finalizado", "Alta de Relacion Aplicación-BD", DatosGenerales.TiposMensaje.Informacion); } else { DatosGenerales.EnviaMensaje(Resp, "Alta de Relacion Aplicación-BD", DatosGenerales.TiposMensaje.Error); } } }
protected void CargaCatalogos() { objCatalogo.ListaServidoresCompletaApp(ref chklEquipos); chklEquipos.DataBind(); objCatalogo.CargaSOAplicaciones(ref chklSO); chklSO.DataBind(); objCatalogo.CargaTiposServidor(ref chklTipos); chklTipos.DataBind(); DatosGenerales.ComboBooleano(ref ddlEstado); ddlEstado.DataBind(); DatosGenerales.ComboBooleano(ref ddlEsVirtual); ddlEsVirtual.DataBind(); if (chklEquipos.Items.Count > 0) { chklEquipos.SelectedIndex = 0; } if (chklSO.Items.Count > 0) { chklSO.SelectedIndex = 0; } if (chklTipos.Items.Count > 0) { chklTipos.SelectedIndex = 0; } }
protected void btnProcesar_Click(object sender, EventArgs e) { BLArticulo objArt = new BLArticulo(); int idItem = 0; int idUbicacion = 0; int.TryParse(ddlUbicaciones.SelectedValue, out idUbicacion); if (idUbicacion > 0) { for (int w = 0; w < grdDatos.Rows.Count; w++) { CheckBox chkReubicar = (CheckBox)grdDatos.Rows[w].FindControl("chkReubicar"); if (chkReubicar.Checked) { int.TryParse(grdDatos.Rows[w].Cells[CeldaId].Text, out idItem); if (idItem > 0) { objArt.ReubicarEquipos(idItem, idUbicacion); } } } DatosGenerales.EnviaMensaje("Proceso finalizado", "Reubicación de equipos", DatosGenerales.TiposMensaje.Informacion); } }
protected string ArmarCadena() { string Cadena = System.IO.File.ReadAllText(Server.MapPath("CartaLiberacionDN.html")); Cadena = Cadena.Replace("@@FechaDoc", DatosGenerales.CrearFechas(txtFechaDocumento.Text, DatosGenerales.FormatosFecha.Dianum_Mestxt_Anno)); Cadena = Cadena.Replace("@@Destinatario01", txtDestinatario01.Text); Cadena = Cadena.Replace("@@Destinatario02", txtDestinatario02.Text); Cadena = Cadena.Replace("@@NumeroCredito", txtNumeroPrestamo.Text); Cadena = Cadena.Replace("@@Acreditado", txtAcreditado.Text); Cadena = Cadena.Replace("@@Direccion", txtDireccion.Text); Cadena = Cadena.Replace("@@NumeroEscritura", txtNumeroEscritura.Text); Cadena = Cadena.Replace("@@NombreNotario", txtNombreNotario.Text); Cadena = Cadena.Replace("@@NumeroNotaria", txtNumeroNotaria.Text); Cadena = Cadena.Replace("@@FechaFirmaEscritura", DatosGenerales.CrearFechas(txtFechaFirmaEscritura.Text, DatosGenerales.FormatosFecha.Diatxt_Dianum_Mestxt_Anno)); Cadena = Cadena.Replace("@@NombreRevisor", txtNombreRevisor.Text); Cadena = Cadena.Replace("@@CorreoRevisor", txtCorreoRevisor.Text); Cadena = Cadena.Replace("@@NombreRepresentante", txtNombreRepresentante.Text); Cadena = Cadena.Replace("@@FechaVigencia", DatosGenerales.CrearFechas(txtFechaVigencia.Text, DatosGenerales.FormatosFecha.Diatxt_Dianum_Mestxt_Anno)); Cadena = Cadena.Replace("@@NombreFirma", txtNombreFirma.Text); Cadena = Cadena.Replace("@@PuestoFirma", txtPuestoFirma.Text); Cadena = Cadena.Replace("@@ImagenFirma", Server.MapPath("../../App_Themes/Imagenes/firma.jpg")); Cadena = Cadena.Replace("@@ImagenLogo", Server.MapPath("../../App_Themes/Imagenes/LogoHSC.png")); Cadena = Cadena.Replace("@@ImagenPie", Server.MapPath("../../App_Themes/Imagenes/piePag.png")); return(Cadena); }
protected void CargaCatalogos() { objCatalogo.CargaEmpresasSoftware(ref chklEmpresas); chklEmpresas.DataBind(); objCatalogo.CargaGruposSoftware(ref chklGrupos); chklGrupos.DataBind(); objCatalogo.CargaUbicacionesSW(ref chklUbicacion); chklUbicacion.DataBind(); DatosGenerales.ComboBooleano(ref ddlExistencia); ddlExistencia.DataBind(); if (chklEmpresas.Items.Count > 0) { chklEmpresas.SelectedIndex = 0; } if (chklUbicacion.Items.Count > 0) { chklUbicacion.SelectedIndex = 0; } if (chklGrupos.Items.Count > 1) { chklGrupos.SelectedIndex = 1; } }
protected void CargaCatalogos() { //Cargar lista de conecciones ListItem itm = new ListItem(); foreach (System.Configuration.ConnectionStringSettings c in System.Configuration.ConfigurationManager.ConnectionStrings) { if (!string.IsNullOrWhiteSpace(c.ConnectionString) && c.Name.ToLower() != "localsqlserver") { itm = new ListItem(c.Name, c.Name); ddlCnx.Items.Add(itm); } } DatosGenerales.OrdenarDDL(ref ddlCnx); itm = new ListItem("Seleccionar", ""); ddlCnx.Items.Insert(0, itm); //Cargar tipos de script BLCatalogos objCat = new BLCatalogos(); objCat.ListaTiposScript(ref ddlTipoScript); ddlTipoScript.DataBind(); if (ddlTipoScript.Items.Count > 0) { ddlTipoScript.Items[0].Value = ""; } }
private void btnRegistrarPrueba_Click(object sender, EventArgs e) { try { DialogResult dr = MessageBox.Show("¿Está seguro que quiere registrar la prueba?", "Consulta", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (dr == DialogResult.Yes) { DatosGenerales oTabla = null; using (EstudioEpidemiologicoEntities tablas = new EstudioEpidemiologicoEntities()) { oTabla = tablas.DatosGenerales.Find(dat.IdPersona); oTabla.FechaPrueba = DateTime.Now; tablas.Entry(oTabla).State = System.Data.Entity.EntityState.Modified; tablas.SaveChanges(); cargaDatos(); } } } catch (Exception ex) { lblErrorGeneral.Text = ex.Message; } }
protected void btnProcesar_Click(object sender, EventArgs e) { if (Page.IsValid) { BLSoftware objGrupoSoftware = new BLSoftware(); int AppSB_Id = 0; int Srv_Id = 0; int BD_Id = 0; int.TryParse(ddlInstancia.SelectedValue, out AppSB_Id); int.TryParse(ddlServidor.SelectedValue, out Srv_Id); int.TryParse(ddlBD.SelectedValue, out BD_Id); if (Srv_Id > 0 && BD_Id > 0 && AppSB_Id > 0) { objGrupoSoftware.ActualizarInstanciaBD(AppSB_Id, Srv_Id, BD_Id, txtNombre.Text.Trim()); } else { MsgBoxU.AddMessage("Se debe seleccionar un servidor y un tipo de base de datos", YaBu.MessageBox.uscMsgBox.enmMessageType.Attention); } objGrupoSoftware.HistoricoApp(this.Page.ToString().Substring(4, this.Page.ToString().Substring(4).Length - 5) + ".aspx", Session["UserNameLogin"].ToString(), "U", AppSB_Id); DatosGenerales.EnviaMensaje("Proceso finalizado", "Modificación de instancia BD", DatosGenerales.TiposMensaje.Informacion); } }
protected void btnProcesar_Click(object sender, EventArgs e) { BLSoftware objGrupoSoftware = new BLSoftware(); int App_Id = 0; string Res = ""; int.TryParse(ddlApp.SelectedValue, out App_Id); if (App_Id > 0) { Res = objGrupoSoftware.BorrarAppRelBD(App_Id); if (Res == "OK") { ProcesarGrid(App_Id); DatosGenerales.EnviaMensaje("Proceso finalizado", "Modificación de relación App-BD", DatosGenerales.TiposMensaje.Informacion); } else { MsgBoxU.AddMessage("Error: " + Res, YaBu.MessageBox.uscMsgBox.enmMessageType.Attention); } } else { MsgBoxU.AddMessage("Debe seleccionar una aplicación", YaBu.MessageBox.uscMsgBox.enmMessageType.Attention); } }
public static void DatosReceptor(DataSet dstinvoicexml, Receptor receptor, DatosGenerales datosGenerales) { foreach (DataRow reader in dstinvoicexml.Tables[0].Rows) { var CorreoReceptor = reader["correoreceptor"]; if (CorreoReceptor != null) { receptor.CorreoReceptor = CorreoReceptor.ToString(); } var IDReceptor = reader["idreceptor"]; if (IDReceptor != null) { receptor.IDReceptor = IDReceptor.ToString(); } var NombreReceptor = reader["nombrereceptor"]; if (NombreReceptor != null) { receptor.NombreReceptor = NombreReceptor.ToString(); Constants.RECEPTOR = NombreReceptor.ToString(); } var Direccion = reader["direccionReceptor"]; if (Direccion != null) { receptor.Direccion = Direccion.ToString(); } var CodigoPostal = reader["codigoPostalReceptor"]; if (CodigoPostal != null) { receptor.CodigoPostal = CodigoPostal.ToString(); } var Municipio = reader["municipioReceptor"]; if (Municipio != null) { receptor.Municipio = Municipio.ToString(); } var Departamento = reader["departamentoReceptor"]; if (Departamento != null) { receptor.Departamento = Departamento.ToString(); } var Pais = reader["paisReceptor"]; if (Pais != null) { receptor.Pais = Pais.ToString(); } var exento = reader["exenta"]; if (exento != null) { if (exento.ToString() == "SI") { Constants.EXENTA = true; } } } }
protected void btnProcesar04_Click(object sender, EventArgs e) { int RDTS_Id = 0; pnlTipo04.Visible = false; lblMsjGrid04.Text = ValidarGridParams(); int.TryParse(ddlTipoScript.SelectedValue, out RDTS_Id); if (lblMsjGrid04.Text == "") { BLReportes objRpt = new BLReportes(); int RD_Id = 0; string MsjBD = ""; int.TryParse(ddlReportesStored.SelectedValue, out RD_Id); if (RD_Id > 0) { bool AplicarBorradoPrevio = true; int MsjBDExiste = objRpt.ActualizarReporte(RD_Id, txtNombreReporte.Text.Trim(), ddlStored.SelectedValue, Session["UserNameLogin"].ToString()); if (MsjBDExiste == 1) { for (int w = 0; w < grdParams.Rows.Count; w++) { BLReportes.RptDinamicosParametro param = new BLReportes.RptDinamicosParametro(grdParams.Rows[w]); MsjBD += objRpt.InsertarParametro(RD_Id, param.Nombre, param.Tipo, param.TipoDato, param.Longitud, param.Obligatorio, param.Entrada, param.Catalogo, param.AceptaNulo, param.BusquedaAproximada, param.Descripcion, AplicarBorradoPrevio); AplicarBorradoPrevio = false; } if (MsjBD == "") { MsjBD = "OK"; } } else { MsjBD = "Ya existe un reporte con ese nombre."; } } else { lblMsjGrid04.Text = "No se obtuvo el ID del reporte."; } if (MsjBD == "OK") { DatosGenerales.EnviaMensaje("Proceso finalizado", "Modificación de reporte", DatosGenerales.TiposMensaje.Informacion); } else { lblMsjGrid04.Text = MsjBD; } } }
private void cargaDatos() { try { btnRegistrarPago.Enabled = false; btnImprimir.Enabled = false; btnRegistrarPrueba.Enabled = false; using (EstudioEpidemiologicoEntities tablas = new EstudioEpidemiologicoEntities()) { dat = tablas.DatosGenerales.Find(datEnt.IdPersona); } lblIdentificadorV.Text = dat.IdPersona.ToString(); lblNombreV.Text = dat.Nombres; lblPaternoV.Text = dat.PrimerApellido; lblMaternoV.Text = dat.SegundoApellido; if (dat.FechaPago is null) { // Captura lblReqFolio.Visible = true; btnRegistrarPago.Enabled = true; } else if (dat.FechaPago != null && dat.FechaImpresion is null) { // Pagado txtFolioPago.Enabled = false; txtFolioPago.Text = dat.FolioPago; btnImprimir.Enabled = true; } else if (dat.FechaImpresion != null && dat.FechaPrueba is null) { // Impreso txtFolioPago.Enabled = false; txtFolioPago.Text = dat.FolioPago; btnImprimir.Enabled = true; btnRegistrarPrueba.Enabled = true; } else if (dat.FechaPrueba != null) { // Prueba tomada txtFolioPago.Enabled = false; txtFolioPago.Text = dat.FolioPago; } } catch (Exception ex) { throw; } }
public string GuardarLlave(string UserName) { string Errores = ""; try { DLBovedaContra objBov = new DLBovedaContra(); string Llave = DatosGenerales.GenerarLlaveUnica(DatosGenerales.LongitudLlaveBoveda); DataTable Parametros = new DataTable(); Parametros = DatosGenerales.GenerateTransposedTable(objBov.ObtenerParametros()); if (Parametros.TableName != "Error") { string To = Parametros.Rows[0]["To"].ToString(); string UsarProxy = Parametros.Rows[0]["UsarProxy"].ToString(); string ProxyIP = Parametros.Rows[0]["ProxyIP"].ToString(); string ProxyU = Parametros.Rows[0]["ProxyU"].ToString(); string ProxyP = Parametros.Rows[0]["ProxyP"].ToString(); System.Net.WebProxy proxyObj = System.Net.WebProxy.GetDefaultProxy(); proxyObj.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials; if (UsarProxy == "S") { System.Net.WebProxy proxyObject = new System.Net.WebProxy(ProxyIP, true); proxyObject.Credentials = new System.Net.NetworkCredential(ProxyU, ProxyP); System.Net.WebRequest.DefaultWebProxy = proxyObject; } Mailer.MailerServiceSoapClient mail = new Mailer.MailerServiceSoapClient(); ParseMailAcc(To); Errores = mail.SendMailAttTxt("", CorreoTo, CorreosCC, "Bóveda contraseñas - " + Environment.MachineName, "El usuario " + UserName + " ha solicitado una nueva llave.", true, Llave, DatosGenerales.GeneraNombreArchivoRnd("Bov_", ".bkey")); System.Net.WebRequest.DefaultWebProxy = proxyObj; if (Errores == "") { objBov.GuardarLlave(UserName, DatosGenerales.ObtenerHashCadena(Llave)); } } else { Errores = Parametros.Rows[0][0].ToString(); } } catch (Exception ex) { Errores = ex.Message; } return(Errores); }
protected void CargaCatalogos() { DatosGenerales.ComboAnnosConstancia(ref ddlAnno); ddlAnno.DataBind(); foreach (WS_PDF.TipoPDF r in Enum.GetValues(typeof(WS_PDF.TipoPDF))) { ListItem item = new ListItem(Enum.GetName(typeof(WS_PDF.TipoPDF), r), r.ToString()); ddlTipoCliente.Items.Add(item); } }
protected override void OnStart(string[] args) { Conexion.Mapea_red(); DatosGenerales.Llena_CDxAlm(); tmservicio.Start(); tmservicioOC.Start(); // Inicia Servicio de Enviar al FTP - Purchase Order (Cabecera y Detalle) tmservicioASN.Start(); tmservicio_Leer_FTP.Start(); tmservicio_ASN_Devol.Start(); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { SiNoNull(ref ddlEsVirtual); Estado(ref ddlEstado); DatosGenerales.TipoEquipo(ref ddlTipo); UnidadesHDD(ref ddlUnidad); CargaCatalogos(); } }
protected void CargaCatalogos() { objCatalogo.CargaEmpresasSoftware(ref chklEmpresas); chklEmpresas.DataBind(); objCatalogo.CargaGruposSoftware(ref chklGrupos); chklGrupos.DataBind(); objCatalogo.CargaUbicacionesSW(ref chklUbicacion); chklUbicacion.DataBind(); DatosGenerales.ComboBooleano(ref ddlExistencia); ddlExistencia.DataBind(); }
protected void btnRecalcular_Click(object sender, EventArgs e) { DateTime Fecha = DatosGenerales.ObtieneFecha(txtFechaDocumento.Text); int MesesVigencia = 0; int.TryParse(hddMesesVigencia.Value, out MesesVigencia); if (Fecha.ToString("yyyyMMdd") != "19000101") { txtFechaVigencia.Text = Fecha.AddMonths(MesesVigencia).ToString("dd/MM/yyyy"); } }
protected void grdParams_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { if (DatosGenerales.Equivalencia_SQLDotNet(e.Row.Cells[CeldaTipoDato].Text) == "String" && !e.Row.Cells[CeldaTipoDato].Text.ToLower().Contains("date") && !e.Row.Cells[CeldaTipoDato].Text.ToLower().Contains("time")) { Label lbl = (Label)e.Row.FindControl("lblBAprox"); lbl.Text = "No"; } } }
public static void DatosGenerales(DataSet dstcompanyxml, DatosGenerales datosGenerales) { foreach (DataRow reader in dstcompanyxml.Tables[0].Rows) { //var vendedor = reader["vendedor"]; //if (vendedor != null) //{ // Constants.VENDEDOR = vendedor.ToString(); //} //var pago = reader["condicionpago"]; //if (pago != null) //{ // Constants.PAGO = pago.ToString(); //} /////////////////////////////////// var CodigoMoneda = reader["codigomoneda"]; if (CodigoMoneda != null) { datosGenerales.CodigoMoneda = CodigoMoneda.ToString(); } var NumeroAcceso = reader["numeroaccesso"]; if (NumeroAcceso != null) { datosGenerales.NumeroAcceso = NumeroAcceso.ToString(); Constants.NUMERO_ACCESO = datosGenerales.NumeroAcceso; } var FechaHoraEmision = reader["FechaHoraEmision"]; if (FechaHoraEmision != null) { datosGenerales.FechaHoraEmision = FechaHoraEmision.ToString(); //fecha = FechaHoraEmision.ToString(); } var tipo = reader["tipo"]; if (tipo != null) { // datosGenerales.FechaHoraEmision = FechaHoraEmision.ToString(); Constants.TIPO_DOC = tipo.ToString(); datosGenerales.Tipo = tipo.ToString(); } var identificador = reader["identificadorunico"]; if (identificador != null) { Constants.IDENTIFICADOR_DTE = identificador.ToString(); } } }
protected void VerificarMantenimiento() { try { BLDatosGenerales objGen = new BLDatosGenerales(); if (DatosGenerales.CalculateDateDiff(DatosGenerales.ObtieneFechaHora(objGen.ObtenerParametroSistema(DatosGenerales.ParamMtto)), DateTime.Now).TotalDays > Convert.ToDouble(DatosGenerales.VigenciaEstandarDocumentos)) { LimpiaTemporales(Server.MapPath("Forms/Reportes/" + DatosGenerales.RutaLocalReportesDinamicos)); } } catch { } }