Exemplo n.º 1
0
        private static DataTable CRUD(string trx, string UidUserLogin, ClassProceso VALUE, out string resultado, string EstadoExistencia = "A")
        {
            resultado = "";
            #region Parametros Entrada y Salida
            var ParamOut = new List <ParametersProcedure>();
            var ParamIn  = new List <ParametersProcedure>();


            ParamIn.Add(new ParametersProcedure(nameof(VALUE.uidproceso), VALUE.uidproceso, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.codproceso), VALUE.codproceso, Convert.ToInt32(0).GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.uidserviciotecnico), VALUE.uidserviciotecnico, "".GetType().ToString(), OrentationType.In));

            ParamIn.Add(new ParametersProcedure(nameof(trx), trx, trx.GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(UidUserLogin), UidUserLogin, UidUserLogin.GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(EstadoExistencia), EstadoExistencia, EstadoExistencia.GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(resultado), resultado, resultado.GetType().ToString(), OrentationType.Out));
            #endregion
            var table           = SqlProcedureExec.ExecProcedure("[dbo].[sp_proceso]", ParamIn, out ParamOut);
            var param_resultado = ParamOut.Where(x => x.Parameter == "resultado").FirstOrDefault();
            if (param_resultado != null)
            {
                if (param_resultado.TypeDate.Equals("".GetType().ToString()))
                {
                    resultado = Convert.ToString(param_resultado.Value);
                }
            }
            else
            {
                resultado = "";
            }
            return(table);
        }
Exemplo n.º 2
0
        private static DataTable CRUD(string trx, string UidUserLogin, ClassLoginuser VALUE, out string resultado, string EstadoExistencia = "A")
        {
            resultado = "";
            #region Parametros Entrada y Salida
            var ParamOut = new List <ParametersProcedure>();
            var ParamIn  = new List <ParametersProcedure>();


            ParamIn.Add(new ParametersProcedure(nameof(VALUE.uidsuario), VALUE.uidsuario, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.usuario), VALUE.usuario, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.email), VALUE.email, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.nombre), VALUE.nombre, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.contrasenia), VALUE.contrasenia, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.uidrol), VALUE.uidrol, "".GetType().ToString(), OrentationType.In));

            ParamIn.Add(new ParametersProcedure(nameof(trx), trx, trx.GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(UidUserLogin), UidUserLogin, UidUserLogin.GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(EstadoExistencia), EstadoExistencia, EstadoExistencia.GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(resultado), resultado, resultado.GetType().ToString(), OrentationType.Out));
            #endregion
            var table           = SqlProcedureExec.ExecProcedure("[db_security].[sp_loginuser]", ParamIn, out ParamOut);
            var param_resultado = ParamOut.Where(x => x.Parameter == "resultado").FirstOrDefault();
            if (param_resultado != null)
            {
                if (param_resultado.TypeDate.Equals("".GetType().ToString()))
                {
                    resultado = Convert.ToString(param_resultado.Value);
                }
            }
            else
            {
                resultado = "";
            }
            return(table);
        }
Exemplo n.º 3
0
        private static DataTable CRUD(string trx, string UidUserLogin, ClassErrores VALUE, out string resultado, string EstadoExistencia = "A")
        {
            resultado = "";
            #region Parametros Entrada y Salida
            var ParamOut = new List <ParametersProcedure>();
            var ParamIn  = new List <ParametersProcedure>();


            ParamIn.Add(new ParametersProcedure(nameof(VALUE.uid_error), VALUE.uid_error, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.cod_error), VALUE.cod_error, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.mensajeusuario), VALUE.mensajeusuario, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.mensajenativo), VALUE.mensajenativo, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.origenerror), VALUE.origenerror, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.tipoerror), VALUE.tipoerror, "".GetType().ToString(), OrentationType.In));

            ParamIn.Add(new ParametersProcedure(nameof(trx), trx, trx.GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(UidUserLogin), UidUserLogin, UidUserLogin.GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(EstadoExistencia), EstadoExistencia, EstadoExistencia.GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(resultado), resultado, resultado.GetType().ToString(), OrentationType.Out));
            #endregion
            var table           = SqlProcedureExec.ExecProcedure("[db_trazabilidad].[sp_errores]", ParamIn, out ParamOut);
            var param_resultado = ParamOut.Where(x => x.Parameter == "resultado").FirstOrDefault();
            if (param_resultado != null)
            {
                if (param_resultado.TypeDate.Equals("".GetType().ToString()))
                {
                    resultado = Convert.ToString(param_resultado.Value);
                }
            }
            else
            {
                resultado = "";
            }
            return(table);
        }
Exemplo n.º 4
0
        private static DataTable CRUD(string trx, string UidUserLogin, ClassInformetecnico VALUE, out string resultado, string EstadoExistencia = "A")
        {
            resultado = "";
            #region Parametros Entrada y Salida
            var ParamOut = new List <ParametersProcedure>();
            var ParamIn  = new List <ParametersProcedure>();


            ParamIn.Add(new ParametersProcedure(nameof(VALUE.uidinformetecnico), VALUE.uidinformetecnico, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.uidot), VALUE.uidot, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.uidserviciotecnico), VALUE.uidserviciotecnico, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.uidcliente), VALUE.uidcliente, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.uidequipo), VALUE.uidequipo, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.direccion), VALUE.direccion, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.email), VALUE.email, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.telefono), VALUE.telefono, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.fecha), VALUE.fecha, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.horallegada), VALUE.horallegada, TimeSpan.MinValue.GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.horadesalida), VALUE.horadesalida, TimeSpan.MinValue.GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.numvisitas), VALUE.numvisitas, Convert.ToInt32(0).GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.tipoaa), VALUE.tipoaa, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.tipodetrabajo), VALUE.tipodetrabajo, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.otros), VALUE.otros, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.area), VALUE.area, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.marca), VALUE.marca, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.modelo), VALUE.modelo, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.serieequipo), VALUE.serieequipo, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.capacidad), VALUE.capacidad, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.modoevaporador), VALUE.modoevaporador, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.serieevaporador), VALUE.serieevaporador, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.opciones), VALUE.opciones, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.modocondensador), VALUE.modocondensador, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.seriecondensador), VALUE.seriecondensador, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.observacionestecnico), VALUE.observacionestecnico, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.estatus), VALUE.estatus, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.repuestos), VALUE.repuestos, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.herramientas), VALUE.herramientas, "".GetType().ToString(), OrentationType.In));

            ParamIn.Add(new ParametersProcedure(nameof(trx), trx, trx.GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(UidUserLogin), UidUserLogin, UidUserLogin.GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(EstadoExistencia), EstadoExistencia, EstadoExistencia.GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(resultado), resultado, resultado.GetType().ToString(), OrentationType.Out));
            #endregion
            var table           = SqlProcedureExec.ExecProcedure("[dbo].[sp_informetecnico]", ParamIn, out ParamOut);
            var param_resultado = ParamOut.Where(x => x.Parameter == "resultado").FirstOrDefault();
            if (param_resultado != null)
            {
                if (param_resultado.TypeDate.Equals("".GetType().ToString()))
                {
                    resultado = Convert.ToString(param_resultado.Value);
                }
            }
            else
            {
                resultado = "";
            }
            return(table);
        }
Exemplo n.º 5
0
        private static DataTable CRUD(string trx, string UidUserLogin, ClassEmpleado VALUE, out string resultado, string EstadoExistencia = "A")
        {
            resultado = "";
            #region Parametros Entrada y Salida
            var ParamOut = new List <ParametersProcedure>();
            var ParamIn  = new List <ParametersProcedure>();


            ParamIn.Add(new ParametersProcedure(nameof(VALUE.uidempleado), VALUE.uidempleado, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.codido), VALUE.codido, Convert.ToInt32(0).GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.cedula), VALUE.cedula, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.nombres), VALUE.nombres, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.apellidos), VALUE.apellidos, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.uidestadocivil), VALUE.uidestadocivil, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.fechanacimiento), VALUE.fechanacimiento, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.uidsexo), VALUE.uidsexo, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.telefono), VALUE.telefono, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.num_hijos), VALUE.num_hijos, Convert.ToInt32(0).GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.uidnivelestudio), VALUE.uidnivelestudio, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.titulo_obtenido), VALUE.titulo_obtenido, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.direccion_domicilio), VALUE.direccion_domicilio, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.provincia), VALUE.provincia, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.ciudad), VALUE.ciudad, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.email), VALUE.email, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.email_trabajo), VALUE.email_trabajo, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.fecha_ingreso), VALUE.fecha_ingreso, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.uidsuario), VALUE.uidsuario, "".GetType().ToString(), OrentationType.In));

            ParamIn.Add(new ParametersProcedure(nameof(trx), trx, trx.GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(UidUserLogin), UidUserLogin, UidUserLogin.GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(EstadoExistencia), EstadoExistencia, EstadoExistencia.GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(resultado), resultado, resultado.GetType().ToString(), OrentationType.Out));
            #endregion
            var table           = SqlProcedureExec.ExecProcedure("[dbo].[sp_empleado]", ParamIn, out ParamOut);
            var param_resultado = ParamOut.Where(x => x.Parameter == "resultado").FirstOrDefault();
            if (param_resultado != null)
            {
                if (param_resultado.TypeDate.Equals("".GetType().ToString()))
                {
                    resultado = Convert.ToString(param_resultado.Value);
                }
            }
            else
            {
                resultado = "";
            }
            return(table);
        }
Exemplo n.º 6
0
        private static DataTable CRUD(string trx, string UidUserLogin, ClassProveedor VALUE, out string resultado, string EstadoExistencia = "A")
        {
            resultado = "";
            #region Parametros Entrada y Salida
            var ParamOut = new List <ParametersProcedure>();
            var ParamIn  = new List <ParametersProcedure>();


            ParamIn.Add(new ParametersProcedure(nameof(VALUE.uidproveedor), VALUE.uidproveedor, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.id_proveedor), VALUE.id_proveedor, Convert.ToInt32(0).GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.uidtipopersona), VALUE.uidtipopersona, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.identificacion), VALUE.identificacion, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.uidtipoidentificacion), VALUE.uidtipoidentificacion, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.razonsocial), VALUE.razonsocial, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.nombre), VALUE.nombre, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.contacto), VALUE.contacto, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.celular), VALUE.celular, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.telefono), VALUE.telefono, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.direccion), VALUE.direccion, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.provincia), VALUE.provincia, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.ciudad), VALUE.ciudad, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.email), VALUE.email, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.referencia), VALUE.referencia, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.observaciones), VALUE.observaciones, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.pagina_web), VALUE.pagina_web, "".GetType().ToString(), OrentationType.In));

            ParamIn.Add(new ParametersProcedure(nameof(trx), trx, trx.GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(UidUserLogin), UidUserLogin, UidUserLogin.GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(EstadoExistencia), EstadoExistencia, EstadoExistencia.GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(resultado), resultado, resultado.GetType().ToString(), OrentationType.Out));
            #endregion
            var table           = SqlProcedureExec.ExecProcedure("[dbo].[sp_proveedor]", ParamIn, out ParamOut);
            var param_resultado = ParamOut.Where(x => x.Parameter == "resultado").FirstOrDefault();
            if (param_resultado != null)
            {
                if (param_resultado.TypeDate.Equals("".GetType().ToString()))
                {
                    resultado = Convert.ToString(param_resultado.Value);
                }
            }
            else
            {
                resultado = "";
            }
            return(table);
        }
Exemplo n.º 7
0
        private static DataTable CRUD(string trx, string UidUserLogin, ClassOt VALUE, out string resultado, string EstadoExistencia = "A")
        {
            resultado = "";
            #region Parametros Entrada y Salida
            var ParamOut = new List <ParametersProcedure>();
            var ParamIn  = new List <ParametersProcedure>();


            ParamIn.Add(new ParametersProcedure(nameof(VALUE.uidot), VALUE.uidot, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.uidvendedor), VALUE.uidvendedor, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.cod_ot), VALUE.cod_ot, Convert.ToInt32(0).GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.uidcliente), VALUE.uidcliente, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.fechaapertura), VALUE.fechaapertura, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.fechacierre), VALUE.fechacierre, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.uidestado), VALUE.uidestado, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.subtotal), VALUE.subtotal, Convert.ToDecimal(0).GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.descuentos), VALUE.descuentos, Convert.ToDecimal(0).GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.impuestos), VALUE.impuestos, Convert.ToDecimal(0).GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.iva), VALUE.iva, Convert.ToDecimal(0).GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.total), VALUE.total, Convert.ToDecimal(0).GetType().ToString(), OrentationType.In));

            ParamIn.Add(new ParametersProcedure(nameof(trx), trx, trx.GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(UidUserLogin), UidUserLogin, UidUserLogin.GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(EstadoExistencia), EstadoExistencia, EstadoExistencia.GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(resultado), resultado, resultado.GetType().ToString(), OrentationType.Out));
            #endregion
            var table           = SqlProcedureExec.ExecProcedure("[dbo].[sp_ot]", ParamIn, out ParamOut);
            var param_resultado = ParamOut.Where(x => x.Parameter == "resultado").FirstOrDefault();
            if (param_resultado != null)
            {
                if (param_resultado.TypeDate.Equals("".GetType().ToString()))
                {
                    resultado = Convert.ToString(param_resultado.Value);
                }
            }
            else
            {
                resultado = "";
            }
            return(table);
        }
Exemplo n.º 8
0
        private static DataTable CRUD(string trx, string UidUserLogin, ClassFacturaventa VALUE, out string resultado, string EstadoExistencia = "A")
        {
            resultado = "";
            #region Parametros Entrada y Salida
            var ParamOut = new List <ParametersProcedure>();
            var ParamIn  = new List <ParametersProcedure>();


            ParamIn.Add(new ParametersProcedure(nameof(VALUE.uidfacturaventa), VALUE.uidfacturaventa, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.establecimiento), VALUE.establecimiento, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.puntoemision), VALUE.puntoemision, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.secuencial), VALUE.secuencial, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.uidusuario), VALUE.uidusuario, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.uidcliente), VALUE.uidcliente, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.fechafactura), VALUE.fechafactura, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.subtotal), VALUE.subtotal, Convert.ToDecimal(0).GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.iva_porc), VALUE.iva_porc, Convert.ToDecimal(0).GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.iva_valor), VALUE.iva_valor, Convert.ToDecimal(0).GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.descuentos), VALUE.descuentos, Convert.ToDecimal(0).GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.total), VALUE.total, Convert.ToDecimal(0).GetType().ToString(), OrentationType.In));

            ParamIn.Add(new ParametersProcedure(nameof(trx), trx, trx.GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(UidUserLogin), UidUserLogin, UidUserLogin.GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(EstadoExistencia), EstadoExistencia, EstadoExistencia.GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(resultado), resultado, resultado.GetType().ToString(), OrentationType.Out));
            #endregion
            var table           = SqlProcedureExec.ExecProcedure("[dbo].[sp_facturaventa]", ParamIn, out ParamOut);
            var param_resultado = ParamOut.Where(x => x.Parameter == "resultado").FirstOrDefault();
            if (param_resultado != null)
            {
                if (param_resultado.TypeDate.Equals("".GetType().ToString()))
                {
                    resultado = Convert.ToString(param_resultado.Value);
                }
            }
            else
            {
                resultado = "";
            }
            return(table);
        }
Exemplo n.º 9
0
        private static DataTable CRUD(string trx, string UidUserLogin, ClassRol VALUE, out string resultado, string EstadoExistencia = "A")
        {
            resultado = "";
            #region Parametros Entrada y Salida
            var ParamOut = new List <ParametersProcedure>();
            var ParamIn  = new List <ParametersProcedure>();


            ParamIn.Add(new ParametersProcedure(nameof(VALUE.uidrol), VALUE.uidrol, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.rol), VALUE.rol, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.permisolectura), VALUE.permisolectura, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.permisoescritura), VALUE.permisoescritura, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.permisoconsultar), VALUE.permisoconsultar, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.perisocrear), VALUE.perisocrear, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.permisoeditar), VALUE.permisoeditar, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.permisoeliminar), VALUE.permisoeliminar, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.permisototal), VALUE.permisototal, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.permisonulo), VALUE.permisonulo, "".GetType().ToString(), OrentationType.In));

            ParamIn.Add(new ParametersProcedure(nameof(trx), trx, trx.GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(UidUserLogin), UidUserLogin, UidUserLogin.GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(EstadoExistencia), EstadoExistencia, EstadoExistencia.GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(resultado), resultado, resultado.GetType().ToString(), OrentationType.Out));
            #endregion
            var table           = SqlProcedureExec.ExecProcedure("[db_security].[sp_rol]", ParamIn, out ParamOut);
            var param_resultado = ParamOut.Where(x => x.Parameter == "resultado").FirstOrDefault();
            if (param_resultado != null)
            {
                if (param_resultado.TypeDate.Equals("".GetType().ToString()))
                {
                    resultado = Convert.ToString(param_resultado.Value);
                }
            }
            else
            {
                resultado = "";
            }
            return(table);
        }
Exemplo n.º 10
0
        private static DataTable CRUD(string trx, string UidUserLogin, ClassFacturacompradetalle VALUE, out string resultado, string EstadoExistencia = "A")
        {
            resultado = "";
            #region Parametros Entrada y Salida
            var ParamOut = new List <ParametersProcedure>();
            var ParamIn  = new List <ParametersProcedure>();


            ParamIn.Add(new ParametersProcedure(nameof(VALUE.uidfactcompradetalle), VALUE.uidfactcompradetalle, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.uidfacturacompra), VALUE.uidfacturacompra, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.secuencial), VALUE.secuencial, Convert.ToInt32(0).GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.item), VALUE.item, Convert.ToInt32(0).GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.uidproducto), VALUE.uidproducto, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.cantidad), VALUE.cantidad, Convert.ToInt32(0).GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.preciounitario), VALUE.preciounitario, Convert.ToDecimal(0).GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.total), VALUE.total, Convert.ToDecimal(0).GetType().ToString(), OrentationType.In));

            ParamIn.Add(new ParametersProcedure(nameof(trx), trx, trx.GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(UidUserLogin), UidUserLogin, UidUserLogin.GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(EstadoExistencia), EstadoExistencia, EstadoExistencia.GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(resultado), resultado, resultado.GetType().ToString(), OrentationType.Out));
            #endregion
            var table           = SqlProcedureExec.ExecProcedure("[dbo].[sp_facturacompradetalle]", ParamIn, out ParamOut);
            var param_resultado = ParamOut.Where(x => x.Parameter == "resultado").FirstOrDefault();
            if (param_resultado != null)
            {
                if (param_resultado.TypeDate.Equals("".GetType().ToString()))
                {
                    resultado = Convert.ToString(param_resultado.Value);
                }
            }
            else
            {
                resultado = "";
            }
            return(table);
        }
Exemplo n.º 11
0
        private static DataTable CRUD(string trx, string UidUserLogin, ClassEmpresa VALUE, out string resultado, string EstadoExistencia = "A")
        {
            resultado = "";
            #region Parametros Entrada y Salida
            var ParamOut = new List <ParametersProcedure>();
            var ParamIn  = new List <ParametersProcedure>();


            ParamIn.Add(new ParametersProcedure(nameof(VALUE.uid_empresa), VALUE.uid_empresa, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.ruc), VALUE.ruc, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.nombre), VALUE.nombre, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.descripcion), VALUE.descripcion, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.direccion), VALUE.direccion, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.telefono), VALUE.telefono, "".GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(VALUE.representantelegal), VALUE.representantelegal, "".GetType().ToString(), OrentationType.In));

            ParamIn.Add(new ParametersProcedure(nameof(trx), trx, trx.GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(UidUserLogin), UidUserLogin, UidUserLogin.GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(EstadoExistencia), EstadoExistencia, EstadoExistencia.GetType().ToString(), OrentationType.In));
            ParamIn.Add(new ParametersProcedure(nameof(resultado), resultado, resultado.GetType().ToString(), OrentationType.Out));
            #endregion
            var table           = SqlProcedureExec.ExecProcedure("[dbo].[sp_empresa]", ParamIn, out ParamOut);
            var param_resultado = ParamOut.Where(x => x.Parameter == "resultado").FirstOrDefault();
            if (param_resultado != null)
            {
                if (param_resultado.TypeDate.Equals("".GetType().ToString()))
                {
                    resultado = Convert.ToString(param_resultado.Value);
                }
            }
            else
            {
                resultado = "";
            }
            return(table);
        }