private void btn_AbrirCaja_Click(object sender, EventArgs e) { if (MessageBox.Show("Esta seguro de Realizar la apertura de caja", "¡¡¡ ATENCION !!!", MessageBoxButtons.YesNo) == DialogResult.Yes) { Caja caja = new Caja(); caja.AbrirCaja(_UsuarioId); MessageBox.Show("Caja Abierta con exito.!!!", "INFORMACION"); btn_ImprimirEntrada.Enabled = true; } }
protected void Button1_Click(object sender, EventArgs e) { try { Terceros ter = (Terceros)Session["tercero"]; cj.terceros_idterceros_reg_caj = Validar.validarsession(ter.idterceros); if (cj.AbrirCaja(cj)) { ScriptManager.RegisterStartupScript(this, this.GetType(), "hwa", "activarcajalert();", true); cargarestado(); cargartabla(); } else { ScriptManager.RegisterStartupScript(this, this.GetType(), "hwa", "elimalertCAJA();", true); cargarestado(); cargartabla(); } } catch (Exception) { ScriptManager.RegisterStartupScript(this, this.GetType(), "hwa", "alerterror();", true); } }