protected void Page_Load(object sender, EventArgs e) { try { panelMensaje.CssClass = "OcultarMensaje"; if (!Page.IsPostBack && !Page.IsCallback) { getTipoPrestacion(); if (Request.QueryString["Id"] == null) throw new Exception("No se ha indicado identificador de la cuenta registrada"); int Id = int.Parse(Request.QueryString["Id"]); var trx = new TrxCONVENIO(); var objConvenio = trx.GetByIdWithReferences(Id); txtId.Text = objConvenio.ID.ToString(); ddlTipoPrestacion.SelectedIndex = int.Parse(objConvenio.TIPO_PRESTACION.ID.ToString()); txtNombre.Text = objConvenio.NOMBRE; } } catch (Exception ex) { ISException.RegisterExcepcion(ex); panelMensaje.CssClass = "MostrarMensaje"; lblMensaje.Text = ex.Message; return; } }
protected void Page_Load(object sender, EventArgs e) { try { panelMensaje.CssClass = "OcultarMensaje"; if (!Page.IsPostBack && !Page.IsCallback) { getTipoPrestacion(); if (Request.QueryString["Id"] == null) { throw new Exception("No se ha indicado identificador de la cuenta registrada"); } int Id = int.Parse(Request.QueryString["Id"]); var trx = new TrxCONVENIO(); var objConvenio = trx.GetByIdWithReferences(Id); txtId.Text = objConvenio.ID.ToString(); ddlTipoPrestacion.SelectedIndex = int.Parse(objConvenio.TIPO_PRESTACION.ID.ToString()); txtNombre.Text = objConvenio.NOMBRE; } } catch (Exception ex) { ISException.RegisterExcepcion(ex); panelMensaje.CssClass = "MostrarMensaje"; lblMensaje.Text = ex.Message; return; } }
protected void btnAceptar_Click(object sender, EventArgs e) { try { var Trx = new TrxCONVENIO(); int? TipoPrestacion = null; string Nombre = string.Empty; if (string.IsNullOrEmpty(ddlTipoPrestacion.SelectedValue)) { lblMensaje.Text = "debe seleccionar un tipo de prestacion para la creacion del convenio"; return; } else TipoPrestacion = int.Parse(ddlTipoPrestacion.SelectedValue); if (string.IsNullOrEmpty(txtNombre.Text)) { lblMensaje.Text = "debe indicar un nombre al convenio"; return; } else Nombre = txtNombre.Text; Trx.Add(TipoPrestacion.Value,Nombre); Response.Redirect("MensajeExito.aspx?t=Nuevo Convenio de Precios&m=Se ha registrado un nuevo convenio", false); } catch (Exception ex) { ISException.RegisterExcepcion(ex); panelMensaje.CssClass = "MostrarMensaje"; lblMensaje.Text = ex.Message; return; } }
private void MostrarConvenios() { try { TrxCONVENIO convenio = new TrxCONVENIO(); grdConvenios.DataSource = convenio.GetAllWithReferences(); grdConvenios.DataBind(); } catch (Exception ex) { ISException.RegisterExcepcion(ex); panelMensaje.CssClass = "MostrarMensaje"; lblMensaje.Text = ex.Message; return; } }
private void getConvenio() { TrxCONVENIO _trx = new TrxCONVENIO(); ddlConvenio.Items.Clear(); ddlConvenio.Items.Add(new ListItem("(Seleccionar)", "")); if (!string.IsNullOrEmpty(ddlTipoPrestacion.SelectedValue)) { ddlConvenio.DataSource = _trx.GetByFilter(int.Parse(ddlTipoPrestacion.SelectedValue), ""); } else { ddlConvenio.DataSource = _trx.GetAll(); } ddlConvenio.DataBind(); }
private void getConvenios() { try { panelMensaje.CssClass = "OcultarMensaje"; var trx = new TrxCONVENIO(); grdRegistroConvenioPrecio.DataSource = trx.GetAllWithReferences(); grdRegistroConvenioPrecio.DataBind(); } catch (Exception ex) { ISException.RegisterExcepcion(ex); panelMensaje.CssClass = "MostrarMensaje"; lblMensaje.Text = ex.Message; return; } }
private void getConvenios() { try { panelMensaje.CssClass = "OcultarMensaje"; var trx = new TrxCONVENIO(); grdRegistroConvenioPrecio.DataSource = trx.GetAllWithReferences(); grdRegistroConvenioPrecio.DataBind(); } catch (Exception ex) { ISException.RegisterExcepcion(ex); panelMensaje.CssClass = "MostrarMensaje"; lblMensaje.Text = ex.Message; return; } }
protected void btnAceptar_Click(object sender, EventArgs e) { try { var Trx = new TrxCONVENIO(); int? TipoPrestacion = null; string Nombre = string.Empty; if (string.IsNullOrEmpty(ddlTipoPrestacion.SelectedValue)) { lblMensaje.Text = "debe seleccionar un tipo de prestacion para la creacion del convenio"; return; } else { TipoPrestacion = int.Parse(ddlTipoPrestacion.SelectedValue); } if (string.IsNullOrEmpty(txtNombre.Text)) { lblMensaje.Text = "debe indicar un nombre al convenio"; return; } else { Nombre = txtNombre.Text; } Trx.Add(TipoPrestacion.Value, Nombre); Response.Redirect("MensajeExito.aspx?t=Nuevo Convenio de Precios&m=Se ha registrado un nuevo convenio", false); } catch (Exception ex) { ISException.RegisterExcepcion(ex); panelMensaje.CssClass = "MostrarMensaje"; lblMensaje.Text = ex.Message; return; } }
protected void btnGuardar_Click(object sender, EventArgs e) { try { panelMensaje.CssClass = "OcultarMensaje"; var Trx = new TrxCONVENIO(); int Id = int.Parse(txtId.Text); int TipoPrestacion = int.Parse(ddlTipoPrestacion.SelectedValue); string Nombre = txtNombre.Text; Trx.Update(Id, TipoPrestacion, Nombre); Response.Redirect("MensajeExito.aspx?t=Modificar Convenio de Precios&m=Se ha modificado la informacion del convenio " + Nombre, false); //Response.Redirect("RegistroConvenioPrecios.ascx", false); } catch (Exception ex) { ISException.RegisterExcepcion(ex); panelMensaje.CssClass = "MostrarMensaje"; lblMensaje.Text = ex.Message; return; } }
protected void btnGuardar_Click(object sender, EventArgs e) { try { panelMensaje.CssClass = "OcultarMensaje"; var Trx = new TrxCONVENIO(); int Id = int.Parse(txtId.Text); int TipoPrestacion = int.Parse(ddlTipoPrestacion.SelectedValue); string Nombre = txtNombre.Text; Trx.Update(Id,TipoPrestacion,Nombre); Response.Redirect("MensajeExito.aspx?t=Modificar Convenio de Precios&m=Se ha modificado la informacion del convenio " + Nombre, false); //Response.Redirect("RegistroConvenioPrecios.ascx", false); } catch (Exception ex) { ISException.RegisterExcepcion(ex); panelMensaje.CssClass = "MostrarMensaje"; lblMensaje.Text = ex.Message; return; } }
private void getConvenio() { TrxCONVENIO _trx = new TrxCONVENIO(); ddlConvenio.Items.Clear(); ddlConvenio.Items.Add(new ListItem("(Seleccionar)", "")); if (!string.IsNullOrEmpty(ddlTipoPrestacion.SelectedValue)) { ddlConvenio.DataSource = _trx.GetByFilter(int.Parse(ddlTipoPrestacion.SelectedValue), ""); } else { ddlConvenio.DataSource = _trx.GetAll(); } ddlConvenio.DataBind(); }
private void MostrarConvenios() { try { TrxCONVENIO convenio = new TrxCONVENIO(); grdConvenios.DataSource = convenio.GetAllWithReferences(); grdConvenios.DataBind(); } catch (Exception ex) { ISException.RegisterExcepcion(ex); panelMensaje.CssClass = "MostrarMensaje"; lblMensaje.Text = ex.Message; return; } }