private void btnEditar_Click(object sender, EventArgs e) { string estado = Convert.ToString(cbCategoria.SelectedItem); string estadoCrud = null; if (estado.Equals("0 - Inactiva")) { estadoCrud = "0"; } else { estadoCrud = "1"; } respuesta r; promocionController pc = new promocionController(); if (lblId.Text == "") { r = pc.agregar(Convert.ToInt32(numericDesde.Value), Convert.ToInt32(numericDescuento.Value), estadoCrud, txtDescripcion.Text); if (r.status) { refrescarGrilla(); reset(); } } else { r = pc.Editar(Convert.ToInt32(lblId.Text), Convert.ToInt32(numericDesde.Value), Convert.ToInt32(numericDescuento.Value), estadoCrud, txtDescripcion.Text); if (r.status) { refrescarGrilla(); reset(); } } }