protected void btn_Pago_Cola_Click(object sender, EventArgs e) { try { this.partidaIn = new Partida(); this.partidaIn.Opc = 1; this.partidaIn.Numero_partida = this.txt_numero_partida.Text; this.partidaIn.Descripcion = this.txt_descripcion.Text; this.partidaIn.Fecha_inicio = fechainicio.Value; this.partidaIn.Fecha_final = fechafinal.Value; this.partidaIn.Perido = int.Parse(this.Dptyear.SelectedValue); this.partidaIn.Estado = "Activo"; this.partidahelperIn = new Partida_Helper(partidaIn); this.partidahelperIn.Agrergar_partida(); this.txt_numero_partida = null; this.txt_descripcion = null; ScriptManager.RegisterStartupScript(this, typeof(Page), "mmensajeDeconfirmacion", "mensajeDeconfirmacion('" + "" + "');", true); } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, typeof(Page), "mensajeError", "mensajeError('" + "" + "');", true); } }
protected void btn_modificar_Click(object sender, EventArgs e) { try { this.partidaIn = new Partida(); this.partidaIn.Numero_partida = this.txt_numero_partida.Text; this.partidaIn.Descripcion = this.txt_descripcion.Text; this.partidaIn.Fecha_inicio = fechainicio.Value; this.partidaIn.Fecha_final = fechafinal.Value; this.partidaIn.Estado = dptestado.SelectedValue; this.partidaIn.Opc = 2; this.partidahelperIn = new Partida_Helper(partidaIn); this.partidahelperIn.Modificar_Partida(); ScriptManager.RegisterStartupScript(this, typeof(Page), "mmensajeDeconfirmacion", "mensajeDeconfirmacion('" + "" + "');", true); } catch (Exception) { ScriptManager.RegisterStartupScript(this, typeof(Page), "mensajeError", "mensajeError('" + "" + "');", true); } }
public void buscaperiodo() { try { this.Partidas = new Partida(); this.Partidas.Opc = 4; this.Partidas.Numero_partida = id_partida; this.PartidasHelper = new Partida_Helper(Partidas); this.datos = new DataTable(); this.datos = this.PartidasHelper.Consulta_Partidas(); if (datos.Rows.Count >= 0) { DataRow fila = datos.Rows[0]; periodo = int.Parse(fila["periodo"].ToString()); } } catch (Exception) { ScriptManager.RegisterStartupScript(this, typeof(Page), "mensajeError", "mensajeError('" + "" + "');", true); } }