Esempio n. 1
0
        public DS_TBC_SIS Detalle(string CodigoForma, string DescripcionForma, int OpcionConsulta)
        {
            DS_TBC_SIS objDataSet = new DS_TBC_SIS();

            try
            {
                ObjConnection = new SqlConnection(_ConexionData);
                ObjAdapter    = new SqlDataAdapter("PRAL_DATA_GLB_OPCIONES_SISTEMA", ObjConnection);
                ObjParam      = new SqlParameter();
                ObjAdapter.SelectCommand.CommandType = CommandType.StoredProcedure;

                ObjAdapter.SelectCommand.Parameters.AddWithValue("@CD_CODI_OPCI_SIST", CodigoForma);
                ObjAdapter.SelectCommand.Parameters.AddWithValue("@DS_CODI_OPCI_SIST", DescripcionForma);
                ObjAdapter.SelectCommand.Parameters.AddWithValue("@OPCI_CONS", OpcionConsulta);


                ObjAdapter.Fill(objDataSet, "GLB_OPCIONES_SISTEMA");

                ObjConnection.Close();

                if (ObjConnection.State != ConnectionState.Closed)
                {
                    ObjConnection.Close();
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }

            return(objDataSet);
        }
Esempio n. 2
0
        public DS_TBC_SIS Detalle(string Id, string NombreUsuario, string ClaveUsuario,
                                  string CodigoPerfil, string CorreoElectronico, char EstadoUsuario, int OpcionConsulta)
        {
            DS_TBC_SIS objDataSet = new DS_TBC_SIS();

            try
            {
                ObjConnection = new SqlConnection(_ConexionData);
                ObjAdapter    = new SqlDataAdapter("SP_TBC_USUARIO_GetByAll", ObjConnection);
                ObjParam      = new SqlParameter();
                ObjAdapter.SelectCommand.CommandType = CommandType.StoredProcedure;


                ObjAdapter.SelectCommand.Parameters.AddWithValue("@ID", Id);
                ObjAdapter.SelectCommand.Parameters.AddWithValue("@DS_NOMBRE_USUARIO", NombreUsuario);
                ObjAdapter.SelectCommand.Parameters.AddWithValue("@CD_CLAVE_USUARIO", ClaveUsuario);
                ObjAdapter.SelectCommand.Parameters.AddWithValue("@ID_PERFIL_USUARIO", CodigoPerfil);
                ObjAdapter.SelectCommand.Parameters.AddWithValue("@DS_DIRE_EMAIL", CorreoElectronico);
                ObjAdapter.SelectCommand.Parameters.AddWithValue("@CD_ESTADO_USUARIO", EstadoUsuario);
                ObjAdapter.SelectCommand.Parameters.AddWithValue("@OPCI_CONS", OpcionConsulta);

                ObjAdapter.Fill(objDataSet, "TBC_USUARIO");

                ObjConnection.Close();

                if (ObjConnection.State != ConnectionState.Closed)
                {
                    ObjConnection.Close();
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }

            return(objDataSet);
        }