예제 #1
0
        //Metodo genérco de insercion de clientes. Con esto generamos un mantenedor de clientes (reutilizacion de codigo) ,y no caemos en redundancia de datos
        public bool CEDICSEM_INSERTA_CLIENTE()
        {
            bool   estado = false;
            String nombreProcedimiento = "[XIUX_CEDICSEM_INSERTA_CLIENTE]";

            SqlParameter[] parameter =
            {
                new SqlParameter("@CEDICSEM_C_CONNID",              GEN_Connid.ToUpper()),
                new SqlParameter("@CEDICSEM_C_txtNombre",           txtNombre.ToUpper()),
                new SqlParameter("@CEDICSEM_C_TxtTelefono1",        TxtTelefono1.ToUpper()),
                new SqlParameter("@CEDICSEM_C_TxtTelefono2",        TxtTelefono2.ToUpper()),
                new SqlParameter("@CEDICSEM_C_TxtCelular",          TxtCelular.ToUpper()),
                new SqlParameter("@CEDICSEM_C_TxtEmail",            TxtEmail.ToUpper()),
                new SqlParameter("@CEDICSEM_C_TxtDocumento",        TxtDocumento.ToUpper()),
                new SqlParameter("@CEDICSEM_C_txtNcontrato",        txtNcontrato.ToUpper()),
                new SqlParameter("@CEDICSEM_C_txtVigencia",         txtVigencia.ToUpper()),
                new SqlParameter("@CEDICSEM_C_txtCategorizacion",   txtCategorizacion.ToUpper()),
                new SqlParameter("@CEDICSEM_C_txtAsignado",         txtAsignado.ToUpper()),
                new SqlParameter("@CEDICSEM_C_txtTramo",            txtTramo.ToUpper()),
                new SqlParameter("@CEDICSEM_C_txtNCuota",           txtNCuota.ToUpper()),
                new SqlParameter("@CEDICSEM_C_txtEstadoCuota",      txtEstadoCuota.ToUpper()),
                new SqlParameter("@CEDICSEM_C_txtFechaEmision",     txtFechaEmision.ToUpper()),
                new SqlParameter("@CEDICSEM_C_txtFechaVencimiento", txtFechaVencimiento.ToUpper()),
                new SqlParameter("@CEDICSEM_C_txtBanco",            txtBanco.ToUpper()),
                new SqlParameter("@CEDICSEM_C_txtAporte",           txtAporte.ToUpper()),
                new SqlParameter("@CEDICSEM_C_txtAporteIGV",        txtAporteIGV.ToUpper()),
                new SqlParameter("@CEDICSEM_C_txtFpago",            txtFpago.ToUpper()),
                new SqlParameter("@CEDICSEM_C_txtdescuento",        txtdescuento.ToUpper()),
                new SqlParameter("@CEDICSEM_C_txtEmpresa",          txtEmpresa.ToUpper()),
                new SqlParameter("@CEDICSEM_C_txtcargo",            txtcargo.ToUpper()),
                new SqlParameter("@CEDICSEM_C_txtCodigoPlan",       txtCodigoPlan.ToUpper()),
                new SqlParameter("@CEDICSEM_C_txtNombrePlan",       txtNombrePlan.ToUpper()),
                new SqlParameter("@CEDICSEM_C_txtCodigoAsesor",     txtCodigoAsesor.ToUpper()),
                new SqlParameter("@CEDICSEM_C_txtNombreAsesor",     txtNombreAsesor.ToUpper()),
                new SqlParameter("@CEDICSEM_C_txtPreexistencias",   txtPreexistencias.ToUpper()),
                new SqlParameter("@CEDICSEM_C_txtRenovacion",       txtRenovacion.ToUpper())
            };
            try
            {
                estado = SqlHelper.executeProcedure(nombreProcedimiento, parameter);
                return(estado);
            }
            catch (Exception error)
            {
                // Extract some information from this exception, and then
                // throw it to the parent method.
                if (error.Source != null)
                {
                    Console.WriteLine("IOException source: {0}", error.Source);
                }
                return(estado);

                throw;
            }
        }
예제 #2
0
        //Metodo genérico de insercion de tipificaciones , independientemente del área.
        public bool CEDICSEM_INSERTA_TIPIFICACIONES()
        {
            bool   estado = false;
            String nombreProcedimiento = "[XIUX_CEDICSEM_INSERTA_TIPIFICACION]";

            SqlParameter[] parameter =
            {
                new SqlParameter("@CEDICSEM_T_CONNID",             GEN_Connid.ToUpper()),
                new SqlParameter("@CEDICSEM_T_ANI",                GEN_Origen.ToUpper()),
                new SqlParameter("@CEDICSEM_T_DNIS",               GEN_Destino.ToUpper()),
                new SqlParameter("@CEDICSEM_T_HORA_IN_LLAMADA",    GEN_FechaInicioCall.ToUpper()),
                new SqlParameter("@CEDICSEM_T_HORA_OUT_LLAMADA",   GEN_FechaTerminoCall.ToUpper()),
                new SqlParameter("@CEDICSEM_T_DURACION_LLAMADA",   GEN_DuracionCall.ToUpper()),
                new SqlParameter("@CEDICSEM_T_AGENTE",             GEN_Agente.ToUpper()),
                new SqlParameter("@CEDICSEM_T_TIPO_INTERACCION",   GEN_TipoInteraccion.ToUpper()),
                new SqlParameter("@CEDICSEM_T_NOMBRE_CAMP",        GEN_NombreCamp.ToUpper()),
                new SqlParameter("@CEDICSEM_T_cmbEfectividad",     cmbnivel1.ToUpper()),
                new SqlParameter("@CEDICSEM_T_cmbAccion",          cmbnivel2.ToUpper()),
                new SqlParameter("@CEDICSEM_T_cmbMotivos",         cmbnivel3.ToUpper()),
                new SqlParameter("@CEDICSEM_T_OBSERVACIONES",      Observaciones.ToUpper()),
                new SqlParameter("@CEDICSEM_T_ESTADOINTERACCION",  GEN_EstadoInteraccion.ToUpper()),
                new SqlParameter("@CEDICSEM_T_ESTADOTIPIFICACION", GEN_EstadoTipificacion.ToUpper()),
                new SqlParameter("@CEDICSEM_T_FECHAACCION",        FechaAccion.ToUpper())
            };
            try
            {
                estado = SqlHelper.executeProcedure(nombreProcedimiento, parameter);
                return(estado);
            }
            catch (Exception error)
            {
                // Extract some information from this exception, and then
                // throw it to the parent method.
                if (error.Source != null)
                {
                    Console.WriteLine("IOException source: {0}", error.Source);
                }
                return(estado);

                throw;
            }
        }