public EncabezadoGrupoVarDependiente(int idEncabezadoGrupo, EstructuraArchivo datosArchivo, string descripcion, EstadoParametrizacion estado) { this.idEncabezadoGrupo = idEncabezadoGrupo; this.datosArchivo = datosArchivo; this.descripcion = descripcion; this.estado = estado; }
public DatosEstructuraArchivo(int idValPermitido, string valor, string descripcion, EstructuraArchivo estructuraArchivo, TipoValor tipoValor) { this.idValPermitido = idValPermitido; this.estructuraArchivo = estructuraArchivo; this.valor = valor; this.descripcion = descripcion; this.tipoValor = tipoValor; }
public void tableToEncabezadoGrupoVarDependiente(System.Data.DataRow myDataRow, EstructuraArchivo datosArchivo, EstadoParametrizacion estado) { if (myDataRow != null) { try { this.idEncabezadoGrupo = Convert.ToInt32(myDataRow["id_enc_grupo"]); this.descripcion = myDataRow["descripcion"].ToString(); this.estado = estado; this.datosArchivo = datosArchivo; } catch (Exception ex) { throw ex; } } }
public void tableToDatosEstructuraArchivo(System.Data.DataRow myDataRow, EstructuraArchivo estructuraArchivo, TipoValor tipoValor) { if (myDataRow != null) { try { this.idValPermitido = int.Parse(myDataRow["ID_VAL_PERMITIDO"].ToString()); this.valor = (string)myDataRow["VALOR"]; this.descripcion = (string)myDataRow["DESCRIPCION"]; this.estructuraArchivo = estructuraArchivo; this.tipoValor = tipoValor; } catch (InvalidCastException ex) { throw ex; } } }
/// <summary> /// Permite Manejar Insert, Update o Delete sobre la Tabla RIPS_ESTRUCTURA_ARCHIVO /// </summary> /// <param name="e">Estructura Parametrizada</param> /// <param name="codOperacion">Código de la Operacion a ejecutar 2) Insert - 3) Update - 4) Delete</param> public void IUDestructuraArchivo(EstructuraArchivo e, Int16 codOperacion) { objDataLayer.AddGenericParameter("@tipo_operacion", DbType.Int16, ParameterDirection.Input, codOperacion); objDataLayer.AddGenericParameter("@cod_archivo", DbType.String, ParameterDirection.Input, e.parametrizacionArchivo.codArchivo); objDataLayer.AddGenericParameter("@idusuario", DbType.Int32, ParameterDirection.Input, u.idUsuario); objDataLayer.AddGenericParameter("@numero_columna", DbType.Int32 , ParameterDirection.Input, e.numeroColumna); objDataLayer.AddGenericParameter("@nombre_columna", DbType.String, ParameterDirection.Input, e.nombreColumna); objDataLayer.AddGenericParameter("@descripcion", DbType.String, ParameterDirection.Input, e.descripcion); objDataLayer.AddGenericParameter("@longitud", DbType.Int32, ParameterDirection.Input, e.longitud); objDataLayer.AddGenericParameter("@longitud_max", DbType.Int32, ParameterDirection.Input, e.longitudMaxima); objDataLayer.AddGenericParameter("@valor_requerido", DbType.Boolean, ParameterDirection.Input, e.valorRequerido); objDataLayer.AddGenericParameter("@validar", DbType.Boolean, ParameterDirection.Input, e.validar); objDataLayer.AddGenericParameter("@cod_tipo_dato", DbType.Int16, ParameterDirection.Input, e.tipoDato.codTipoDato); objDataLayer.AddGenericParameter("@cod_estado", DbType.Int16, ParameterDirection.Input, e.estadoParametrizacion.codEstado); if (e.rangoIni != -1) { objDataLayer.AddGenericParameter("@rango_ini", DbType.Single, ParameterDirection.Input, e.rangoIni); } if (e.rangoFin != -1) { objDataLayer.AddGenericParameter("@rango_fin", DbType.Single, ParameterDirection.Input, e.rangoFin); } if (e.formatoFecha != null && e.formatoFecha.codFormatoFecha != -1) { objDataLayer.AddGenericParameter("@cod_formato_fecha", DbType.Int16, ParameterDirection.Input, e.formatoFecha.codFormatoFecha); } try { objDataLayer.ExecuteStoredProcedure("P_RIPS_ESTRUCTURA_ARCHIVO", DataLayer.ReturnType.NothingType); } catch (Exception ex) { throw ex; } }
private void guardarDatos() { EstructuraArchivo e = new EstructuraArchivo(); RipsValidadorDao.ConnectionDB.AutenticationProvider.Consulta c = new RipsValidadorDao.ConnectionDB.AutenticationProvider.Consulta(); InsertUpdateDelete i = new InsertUpdateDelete(c.consultarUsuarioXnombre(User.Identity.Name)); Consulta c1 = new Consulta(); try{ e.numeroColumna = int.Parse(this.txtNumColumna.Text); e.nombreColumna = this.txtNombreColumna.Text; e.longitud = int.Parse(this.txtLongitudMin.Text); e.descripcion = this.txtDescripcion.Text; e.longitudMaxima = int.Parse(this.txtLongitudMax.Text); e.validar = this.chValidar.Checked; e.valorRequerido = this.chValorRequerido.Checked; e.estadoParametrizacion = new EstadoParametrizacion(int.Parse(this.ddlEstado.SelectedValue), this.ddlEstado.SelectedText); e.tipoDato = new RipsValidadorDao.Model.TipoDato(int.Parse(this.ddlTipoDato.SelectedValue), this.ddlTipoDato.SelectedText); e.formatoFecha = new FormatoFecha(int.Parse(this.ddlFormatoFecha.SelectedValue), this.ddlFormatoFecha.SelectedText); e.rangoIni = this.txtRangoIni.Text == string.Empty ? -1 : Single.Parse(this.txtRangoIni.Text, System.Globalization.CultureInfo.CreateSpecificCulture("es-CO")); e.rangoFin = this.txtRangoFin.Text == string.Empty ? -1 : Single.Parse(this.txtRangoFin.Text, System.Globalization.CultureInfo.CreateSpecificCulture("es-CO")); e.parametrizacionArchivo = c1.consultarArchivoParametrizado(this.ddlTipoArchivo.SelectedValue); Int16 codOperacion = 3; string mensaje = "Estructura Actualizada Correctamente"; if (this.txtNumColumna.Enabled) { codOperacion = 2; mensaje = "Estructura Guardada Correctamente"; } i.IUDestructuraArchivo(e, codOperacion); cargarGrilla(); this.myPanel3.Visible = false; this.RadWindowManager1.RadAlert(mensaje, 400, 200, Utilities.windowTitle(TypeMessage.information_message), null, Utilities.pathImageMessage(TypeMessage.information_message)); }catch(InvalidCastException ex) { Logger.generarLogError(ex.Message, new System.Diagnostics.StackFrame(true), ex); this.RadWindowManager1.RadAlert(Utilities.errorMessage(), 400, 200, Utilities.windowTitle(TypeMessage.error_message), null, Utilities.pathImageMessage(TypeMessage.error_message)); } catch (Exception ex) { Logger.generarLogError(ex.Message, new System.Diagnostics.StackFrame(true), ex); this.RadWindowManager1.RadAlert(Utilities.errorMessage(), 400, 200, Utilities.windowTitle(TypeMessage.error_message), null, Utilities.pathImageMessage(TypeMessage.error_message)); } }
private void cargarPanelDatos(EstructuraArchivo e = null) { if (e == null) { try { PanelASP.limpiarPanel(ref this.myPanel3); } catch (Exception ex) { throw ex; } cargarComboTipoDato(); cargarComboEstado(); cargarComboFormatoFecha(); this.txtCodArchivo.Text = this.ddlTipoArchivo.SelectedText; this.txtNumColumna.Enabled = true; } else { cargarComboTipoDato(); cargarComboEstado(); cargarComboFormatoFecha(); this.txtNumColumna.Enabled = false; cargarDatos(e); validarCampos(int.Parse(this.ddlTipoDato.SelectedValue)); } this.myPanel3.Visible = true; }
private void cargarDatos(EstructuraArchivo e) { try { this.txtCodArchivo.Text = e.parametrizacionArchivo.codArchivo; this.txtNumColumna.Text = Convert.ToString(e.numeroColumna); this.txtNombreColumna.Text = e.nombreColumna; this.txtDescripcion.Text = e.descripcion; this.txtLongitudMin.Text = Convert.ToString(e.longitud); this.txtLongitudMax.Text = Convert.ToString(e.longitudMaxima); this.chValorRequerido.Checked = e.valorRequerido; this.chValidar.Checked = e.validar; DropDownListASP.selectIndexByValue(ref this.ddlTipoDato, Convert.ToString(e.tipoDato.codTipoDato)); DropDownListASP.selectIndexByValue(ref this.ddlEstado, Convert.ToString(e.estadoParametrizacion.codEstado)); if (e.rangoIni != -1) { this.txtRangoIni.Text = Convert.ToString(e.rangoIni); } if (e.rangoFin != -1) { this.txtRangoFin.Text = Convert.ToString(e.rangoFin); } if (e.formatoFecha != null) { DropDownListASP.selectIndexByValue(ref this.ddlFormatoFecha, Convert.ToString(e.formatoFecha.codFormatoFecha)); } } catch (Exception ex) { Logger.generarLogError(ex.Message, new System.Diagnostics.StackFrame(true), ex); this.RadWindowManager1.RadAlert(Utilities.errorMessage(), 400, 200, Utilities.windowTitle(TypeMessage.error_message), null, Utilities.pathImageMessage(TypeMessage.error_message)); } }
private void cargarComboValoresAceptados(EstructuraArchivo e, ref Telerik.Web.UI.RadDropDownList r) { Consulta c = new Consulta(); try { DropDownListASP.llenarDropDownList(c.consultarValoresAceptados(e), "value", "text", ref r); DropDownListASP.AddItemToDropDownList(ref r, "SELECCIONE>>", "-1", true); DropDownListASP.selectIndexByValue(ref r, "-1"); DropDownListASP.AddItemToDropDownList(ref r, "Otro Valor", "-2", false); DropDownListASP.AddItemToDropDownList(ref r, "Validar Contra el mismo", "-3", false); } catch (Exception ex) { Logger.generarLogError(ex.Message, new System.Diagnostics.StackFrame(true), ex); this.RadWindowManager1.RadAlert(Utilities.errorMessage(), 400, 200, Utilities.windowTitle(TypeMessage.error_message), null, Utilities.pathImageMessage(TypeMessage.error_message)); } }