private string obtieneNombreIP(string hostname) { string ipName = ""; // obtengo el nombre de la ip para la impresora con la que se va a imprimir UConnection DB = new UConnection(ConfigurationManager.AppSettings.Get("ipBD"), ConfigurationManager.AppSettings.Get("serverBD"), ConfigurationManager.AppSettings.Get("usuarioBD"), ConfigurationManager.AppSettings.Get("passBD")); string sql = "select SU_IMPRESORA from FRSALIDA_IMPNAME where SU_NAME = '" + hostname + "' and SU_TIPO = 'PASE'"; try { if (DB.EjecutaSQL(sql)) { while (DB.ora_DataReader.Read()) { ipName = Convert.ToString(DB.ora_DataReader["SU_IMPRESORA"]); } } } catch (Exception ex) { //MessageBox.Show("OCURRIÓ UN ERROR AL TRATAR DE OBTENER LA IMPRESORA PARA EL VOUCHER." + ex.Message, "FAVOR DE REPORTARLO A SU ÁREA DE SISTEMAS"); } finally { DB.Dispose(); } return(ipName); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ViewState["idioma"] = lang; ViewState["texto"] = "Please enter your bracelet number:"; lblBand.Text = "Please enter your bracelet number:"; lblTime.Text = DateTime.Now.ToString("ddd d MMMM hh:mm:ss tt", CultureInfo.CreateSpecificCulture("en-US")); DB = new UConnection("192.168.1.8", "cronos", "frgrand", "service"); } else { reserva = (string)ViewState["reserva"]; habitacion = (string)ViewState["habitacion"]; apellido = (string)ViewState["apellido"]; nombre = (string)ViewState["nombre"]; if (ViewState["fecont"] != null) { fecCont = (DateTime)ViewState["fecont"]; } lang = (bool)ViewState["idioma"]; lblBand.Text = (string)ViewState["texto"]; lblTime.Text = DateTime.Now.ToString("ddd d MMMM hh:mm:ss tt", CultureInfo.CreateSpecificCulture("en-US")); DB = new UConnection("192.168.1.8", "cronos", "frgrand", "service"); } //Verificar imrpesora verifica_impresora(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ViewState["idioma"] = lang; ViewState["texto"] = "Please enter your room and bracelet number:"; lblBand.Text = "Please enter your room and bracelet number:"; txthabi.Attributes["placeholder"] = "ROOM"; txtBrazalete.Attributes["placeholder"] = "BRACELET"; lblHeadOne.Text = "<h1>EXPRESS CHECK OUT</h1>"; btnEnviar.Text = "CHECK OUT"; //btnSalida.Text = "DO CHECK OUT"; lblTime.Text = DateTime.Now.ToString("ddd d MMMM hh:mm:ss tt", CultureInfo.CreateSpecificCulture("en-US")); DB = new UConnection(ConfigurationManager.AppSettings.Get("ipBD"), ConfigurationManager.AppSettings.Get("serverBD"), ConfigurationManager.AppSettings.Get("usuarioBD"), ConfigurationManager.AppSettings.Get("passBD")); } else { reserva = (string)ViewState["reserva"]; habitacion = (string)ViewState["habitacion"]; apellido = (string)ViewState["apellido"]; nombre = (string)ViewState["nombre"]; if (ViewState["fecont"] != null) { fecCont = (DateTime)ViewState["fecont"]; } lnames = new List <string>(); lnames = (List <string>)ViewState["lname"]; lang = (bool)ViewState["idioma"]; lblBand.Text = (string)ViewState["texto"]; lblTime.Text = DateTime.Now.ToString("ddd d MMMM hh:mm:ss tt", CultureInfo.CreateSpecificCulture("en-US")); DB = new UConnection(ConfigurationManager.AppSettings.Get("ipBD"), ConfigurationManager.AppSettings.Get("serverBD"), ConfigurationManager.AppSettings.Get("usuarioBD"), ConfigurationManager.AppSettings.Get("passBD")); } //Verificar imrpesora verifica_impresora(); }